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

How to Use grok-imagine/text-to-image via the hiapi API: curl, Python, and a Working Request
grok-imagine/text-to-image runs on hiapi's unified task API: POST /v1/tasks to create, poll GET /v1/tasks/<id>, download data.output[0].url before it expires. input.prompt is the only required field; optional aspect_ratio spans 13 values including ultra-wide 2:1, 20:9 and 19.5:9 - but 21:9 is rejected. resolution must be lowercase '1k' or '2k', output_format is jpeg/png/webp, and the schema is strict: n, seed, negative_prompt and size are all rejected. For batches, add callback: {url, when: "final"} instead of polling - only 'final' is supported, so make your handler idempotent on taskId.

How to use seedream-4.5/image-to-image via the hiapi API: curl, Python, and a working request
seedream-4.5/image-to-image runs on hiapi's unified task API: POST /v1/tasks to create, poll GET /v1/tasks/<id>, download data.output[0].url before it expires. The input schema is strict and takes exactly four fields: prompt, image_urls (public URLs, max 14), aspect_ratio (8-value enum), and resolution (2K or 4K only). This guide includes a working curl request, a complete Python polling script, multi-reference editing, callback setup, and the real 400/401 error shapes.

How to Use the Hailuo 2.3 Text-to-Video API: curl, Python, and a Working Request
Call MiniMax's hailuo-2.3 text-to-video model through hiapi's unified async /v1/tasks endpoint with a schema-correct request: prompt, duration as a string enum ('6'/'10'), and prompt_optimizer — plus working curl and Python examples, callback setup, idempotent retries, and the real error responses.

How to Use the hailuo 2.3 Fast Image to Video API: curl, Python, and a Working Request
Integrate hailuo-2.3-fast/image-to-video through hiapi's async task API: POST /v1/tasks with prompt, a single image_url, and a string duration, then poll or register a callback and download the MP4 before the temp URL expires. Every schema rule here was checked against the live validator: image_url is singular, duration must be the string '6' or '10', and resolution/aspect_ratio/seed are rejected as unknown fields.

Seedream 5.0 Pro Text-to-Image Prompts: 6 Copy-Paste Recipes With Real Outputs
Six copy-paste prompt recipes for seedream-5.0-pro/text-to-image, each shown with the real, first-take output it produced. 13 of 13 quoted text strings rendered correctly across the set — movie-poster type hierarchy, curved label text, a magazine masthead and vertical katakana. Includes the task-API call, the 1K ($0.075) vs 2K ($0.15) price lever, and a five-rule cheatsheet for writing your own prompts.

Seedream 5.0 Pro Image-to-Image Prompts: 6 Copy-Paste Recipes With Real Outputs
Six copy-paste editing recipes for seedream-5.0-pro/image-to-image, each shown with the real, unretouched output it produced. Covers the pro tier's headline skill — multi-reference editing — plus precision recolors, background swaps with relighting, style transfer and chained edits. Every schema claim verified against the live API: four required fields, up to 10 reference images, 1K/2K output, $0.15 per image.

How to use seedream-5.0-pro/text-to-image via the hiapi API: curl, Python, and a working request
seedream-5.0-pro/text-to-image runs on hiapi's async /v1/tasks endpoint: POST to create, poll data.status or use a callback, then download data.output[0].url before it expires. The input schema is strict and minimal: exactly three required fields — prompt, aspect_ratio (8-value enum), resolution (1K or 2K) — and anything extra (n, seed, size) is rejected with a 400. Copy-paste curl and stdlib-only Python examples included, plus text-rendering prompt tips and the exact 400/401 error messages with fixes.

How to use seedream-5.0-pro/image-to-image via the hiapi API: curl, Python, and a working request
seedream-5.0-pro/image-to-image runs on hiapi's unified async /v1/tasks endpoint: create a task, poll data.status (or use a callback), download data.output[0].url before it expires. All four input fields are required and the schema is strict: prompt, image_urls (array of 1-10 public URLs), aspect_ratio (9-value enum incl. match_input_image), resolution (1K or 2K only). Copy-paste curl and stdlib-only Python examples included, plus the exact 400/401 error messages the API returns and how to fix each.

Short-Form Video From Product Stills: grok-imagine/image-to-video on the hiapi API
grok-imagine/image-to-video turns catalog stills into 6-30s cinematic clips via one async task call; multiple reference images lock product consistency across lifestyle scenes. Pricing is per second ($0.0114/s at 480p, $0.0214/s at 720p), which makes a draft-at-480p, reship-winners-at-720p pipeline the economic default for feed content. Three real first-take clips embedded: a 720p hero orbit, a two-reference lifestyle push-in, and a 12s 480p draft-tier clip, each with the exact prompt and settings.

Build an AI Image Prompt Enhancer: LLM Prompt Expansion for ideogram-v4 and flux-2
Prompt expansion -- a cheap LLM pass that enriches short prompts before the image API -- is now a standard step in image pipelines, and this recipe builds it in ~80 lines of Python. ideogram-v4 and flux-2/text-to-image have no built-in expander (unlike qwen-image-2.0's prompt_extend or flux-1.1-pro's prompt_upsampling), so you bring your own -- with one expander system prompt per model family. Both models run through hiapi's unified async task API: POST /v1/tasks, poll or callback, download output[0].url before it expires; schemas differ per model and are validated strictly.
Build with the models you just read about.
Compare image, video, and audio models, then use the same API workflow in production.