Blog
AI Image & Video API Guides
Hands-on model tests, production tutorials, prompt techniques, and current API pricing for generative media teams.

Best Image-to-Image API in 2026: Same Edit, Three Models, Real Results
We ran the identical background-swap edit through gpt-image-2/image-to-image@ext, nano-banana-2, and nano-banana-pro using one source image and one verbatim prompt Nano Banana 2 and Pro preserved the product's exact matte glaze and shape; gpt-image-2 followed the instruction fully but re-rendered the glaze glossier and added a tan rim - identity drift gpt-image-2 i2i starts at $0.007/image (low, 1K) and tops at $0.76 (high, 4K); nano-banana-2 runs $0.076-0.114; nano-banana-pro $0.17-0.2992 Input schemas differ per family: image_urls + required quality/resolution for GPT Image 2, image_input + aspect_ratio for Nano Banana All three run through the same POST /v1/tasks async endpoint, so re-running the test on your own image is three POSTs with the model string swapped

Wan 2.7 Text-to-Image for E-Commerce Product Photos: 4K Studio Shots via One API Call
wan2.7-image/text-to-image generates up to 4096x4096 product photos at a flat $0.08 per image on hiapi, with no 4K surcharge. The async task API returns in 60-90 seconds per image: POST /v1/tasks, poll the task ID, download output[0].url before it expires. Aspect ratios are strictly limited to 1:1, 16:9, 4:3, 21:9, 3:4, 9:16, 8:1, 1:8 — common photo ratios like 3:2 and 4:5 return 400 INVALID_REQUEST. Short quoted brand text renders reliably on packaging shots, but unspecified labels come out as gibberish — quote exact strings or prompt for unlabeled products.

Using Nano-Banana for E-Commerce Product Images via the hiapi API
An anchor-and-restage e-commerce workflow on hiapi: nano-banana generates the $0.05 white-background listing shot, then Nano-Banana-2 restages that exact bottle — and even the same human model — into lifestyle, packaging, and campaign scenes via the image_input reference array. Every image was generated during writing with the exact prompt shown, and all prices are checked against the live pricing page.

FLUX 1.1 Pro for E-Commerce Product Images: A hiapi API Guide
A working e-commerce recipe for flux-1.1-pro on hiapi — every image generated from the exact prompt printed above it, via the async /v1/tasks endpoint. The verified parameter surface: aspect_ratio, width/height (256-1440px), seed, output_format, prompt_upsampling, safety_tolerance — and the 400 you get if you send steps/guidance (they don't exist on this schema). Fixed-seed colourway variants: keep seed and prompt structure identical, swap only the colour word, and get the same composition in a new SKU colour. Batch catalog script with retry handling for transient TASK_FAILED errors, plus flat $0.05/image pricing verified against /api/pricing.

How to Use the Grok Imagine API for Text-to-Video: curl, Python, and a Working Request
Call xAI's Grok Imagine text-to-video model through HiAPI's unified /v1/tasks endpoint with a working curl request, a Python polling client, and the production callback pattern. The exact live-verified input schema — prompt, duration 6-30s, fun/normal mode, five aspect ratios, 480p/720p — plus the 400s you hit when you guess field names.

How to Use grok-imagine/image-to-video via the hiapi API: curl, Python, and a Working Request
grok-imagine/image-to-video runs on hiapi's unified task API: POST /v1/tasks to create, poll GET /v1/tasks/<id>, download data.output[0].url. input.image_urls (an array of public HTTPS URLs) is required; duration is an integer from 6 to 30 seconds. For batches, add callback: {url, when: "final"} instead of polling - only 'final' is supported, so make your handler idempotent on taskId. Output URLs are signed with expireAt: download the MP4 immediately, never store the hot link.

Using z-image for E-Commerce Product Images via the hiapi API
z-image is a Turbo text-to-image model priced at $0.008/image with unusually reliable in-image text rendering — the property that matters most for e-commerce assets like price tags, promo banners, and packaging labels. Five real recipes with unretouched outputs: hero shot with a price tag, 16:9 promo banner, vertical discount card, macro packaging label, and a no-text colorway lineup — every image was generated from the exact prompt shown beside it. Verified API facts: /v1/tasks endpoint; input takes prompt + aspect_ratio only (sending resolution returns 400); valid ratios are 1:1, 4:3, 3:4, 16:9, 9:16; output URLs expire, so download immediately. Batch economics: 600 catalog images cost $4.80 on z-image vs $18 on gpt-image-2 — cheap enough to build an OCR-verify-and-retry loop into the pipeline.

Short-Form Video with wan2.7-video/text-to-video@pro: An End-to-End hiapi API Workflow
wan2.7-video/text-to-video@pro generates up to 1080P MP4 clips with native AAC audio, 2-15 seconds, in five aspect ratios including vertical 9:16 — all through hiapi's async /v1/tasks endpoint. The guide includes a verified full input schema, working curl and Python examples, and two real clips generated by the exact code shown.

How to Use seedance-2.0-fast via the hiapi API: curl, Python, and a Working Request
seedance-2.0-fast is a text-to-video model on hiapi's unified async /v1/tasks endpoint: POST to create a task, poll GET /v1/tasks/<id> or register a callback, then download data.output[0].url before the signed link expires. The input schema is strict — only prompt (required), duration (integer 4–15), resolution (480p/720p), and aspect_ratio are accepted; every request shape and error message in this guide was verified against the live API.

Kling AI Image-to-Video API in Python
Copy a complete Python script for creating, polling, and downloading a Kling image-to-video task through HiAPI. Choose between the current callable Omni and Turbo image-to-video model IDs without duplicating the shared task workflow. Verify model-specific schema fields and follow live pricing instead of relying on a static rate table.
Build with the models you just read about.
Compare image, video, and audio models, then use the same API workflow in production.