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 the flux-3 API for Text-to-Video, Audio, and Continuation
flux-3 (FLUX.3 Video) is a task-API model on hiapi: POST /v1/tasks, then poll or use a callback for the result. Only `prompt` is required — a bare request is still a real, billed clip, so always set `draft:true` while testing. Draft mode is a flat $0.09/s at 720p; real renders are $0.25/s (720p) or $0.42/s (1080p). image_urls animates a still image; start_video continues an existing clip as a new scene. generate_audio embeds synced audio directly in the output .mp4.
hiapi
Tutorial · Aug 21, 2026


minimax-music-3 API: curl & Python Guide
minimax-music-3 takes just two required inputs, prompt and lyrics, through the same POST /v1/tasks endpoint every hiapi model uses. This guide captures a real request and response: task creation, polling, and the final audio URL. The input schema is strict, so extra fields like sample_rate get rejected with a 400 instead of being silently ignored. Output files sit in temporary storage for about a week, so download them immediately.

Seedance 2.5 Text-to-Video: Build Short-Form Clips with the hiapi API
seedance-2.5/text-to-video turns a single prompt into a finished 9:16 clip with synced audio via one async API call. A real 8-second 720p clip costs about $2.42; the same clip at 480p costs about $1.12 - a 2.2x price gap worth exploiting for drafts. The endpoint tops out at 720p today - no 1080p tier - and every clip carries native ambient audio generated by the model, not added in post. Batch generation is idempotent when jobs are keyed by a prompt hash, so a crash mid-run never double-bills a clip.

Seedance 2.5 Reference-to-Video for Short-Form TikTok and Reels Clips
Three real seedance-2.5/reference-to-video clips show subject-swap, motion-transfer, and full video+image+audio patterns for short-form TikTok/Reels output. aspect_ratio is a genuine per-request field — set it to 9:16 for native vertical output, no post-crop needed. reference_video_urls is the only required field; reference_image_urls and reference_audio_urls are optional layers for subject swaps and audio-timed sync. Pricing is flat at $0.2714 per output second regardless of resolution or how many reference files are attached — a 4-second clip costs about $1.09. Combined reference video input and output duration are both capped at 30 seconds, which shapes short-form planning.

How to use grok-imagine-image-2.0/image-to-image via the hiapi API: curl, Python, and a working request
Step-by-step recipe for calling grok-imagine-image-2.0/image-to-image on hiapi's async task API. Covers the exact input schema, including the required single-string `image` field. Working curl and Python examples, plus production patterns for callbacks, idempotency, and error handling.

How to Use grok-imagine-image-2.0/text-to-image via the hiapi API: curl, Python, and a Working Request
A working recipe for the grok-imagine-image-2.0/text-to-image API on hiapi: create a task on POST /v1/tasks, poll or use a callback, and download the image from output[0].url before it expires. Covers the exact input schema (prompt, aspect_ratio, resolution, quality), a copy-paste curl and Python example, callback vs polling, idempotency, and the 401/400 error shapes you'll actually hit.

Grok Imagine Image 2.0 Image-to-Image Prompts: 4 Recipes With Real Outputs
grok-imagine-image-2.0/image-to-image edits a single reference photo — swap environments, add small details, or change one material/color attribute — while keeping the rest of the shot intact. Pricing is flat at $0.065 per image (as of 2026-08) whether you output 1K or 2K, and the model only accepts one reference image per call. A two-clause prompt structure (keep-clause first, change-clause second) is what keeps edits from drifting into the rest of the frame — all 4 recipes below use it.

Grok Imagine 2.0 Text-to-Image Prompt Recipes: Copy-Paste Prompts With Real Outputs
Five copy-paste grok-imagine-image-2.0 prompts — an app icon, a product shot, a wide banner, a phone wallpaper and a mountain landscape — each paired with the exact prompt and the raw first-take output it produced on the live hiapi API. The live-verified schema is just four fields: prompt, resolution (1k/2k), quality (low/medium) and aspect_ratio (14 fixed ratios plus auto) — unknown fields are rejected outright. Pricing is flat at $0.052 per image regardless of resolution, quality or aspect ratio, as of 2026-08. 1k/low renders in about 15 seconds; 2k/medium takes roughly 70-76 seconds — use low-quality 1k for icons and quick drafts, 2k/medium for anything that leaves the screen. Covers icon design, product photography, ultra-wide banners, vertical wallpapers and landscape composition, each with the exact aspect_ratio value that produced it.

Using flux-2-klein-9b/text-to-image for E-Commerce Product Images via the hiapi API
flux-2-klein-9b/text-to-image is a flat $0.00858/image model tagged Text Rendering, High Fidelity — it renders clean brand labels and promo headlines in the same generation, no second pass needed. Its aspect_ratio enum is a strict 5-value list (1:1, 4:3, 3:4, 16:9, 9:16) and it always rejects the resolution field — narrower than some other hiapi image models. The cheaper sibling flux-2-klein-4b/text-to-image is about 6x less ($0.00143) but isn't tagged for text rendering, making klein-9b the safer pick for anything with on-image copy.

Flux-2-Klein-9b Image-to-Image for E-Commerce Product Photos
flux-2-klein-9b/image-to-image turns one existing product photo into a studio-clean master, then chains color and lifestyle variants from that master — no reshoot needed. Each edit costs $0.03143 per image at hiapi's current pricing, about 4.4x the smaller flux-2-klein-4b/image-to-image tier, in exchange for higher-fidelity detail and color edits. The image-to-image schema is deliberately minimal: one prompt, one reference image (image_urls capped at 1), no resolution or aspect_ratio parameter — output dimensions follow the input photo. Anchoring prompts on what stays the same (shape, cap, proportions) before describing the change is what keeps product identity locked across chained edits. A batch script pattern (submit_edit + wait_and_download over a list of image/prompt tuples) scales the same workflow across a full product catalog.
Build with the models you just read about.
Compare image, video, and audio models, then use the same API workflow in production.