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

Remove Image Backgrounds with an API: Prompt-Based Editing
Prompt-based background removal replaces the background in one call instead of just cutting the subject out. seedream-5.0-lite/image-to-image is the cheapest capable option for single-image and batch background swaps. seedream-5.0-pro adds match_input_image for exact framing preservation, critical for product catalogs. Covers the full task lifecycle, callbacks, idempotency, and the three distinct error shapes you need to handle separately.

Using grok-imagine/text-to-image for E-Commerce Product Images via the hiapi API
grok-imagine/text-to-image generates e-commerce product photos at a flat $0.03/image on hiapi, with a 13-value aspect_ratio enum that includes two ultra-wide formats (2:1, 20:9) built for banner work. The input schema is strict (no extra fields) and resolution is lowercase-only ('2k', not '2K') — both are easy first-request 400s. A 500-SKU catalog run (hero + lifestyle + banner per SKU) costs about $45 at the base tier, or ~$80 upgrading just the hero shots to grok-imagine-quality at 2K.

Hailuo 2.3 Text-to-Video: A Short-Form Video Workflow With the hiapi API
hailuo-2.3/text-to-video turns a single prompt into a 6- or 10-second clip through hiapi's /v1/tasks endpoint, with no reference image needed — its motion physics handle fast action like a skateboard trick without warping. Every clip renders landscape at a fixed 1366x768 with no aspect_ratio or resolution parameter — plan a crop or pad step if the destination is a vertical feed like TikTok or Reels. Pricing is flat and per-video: $0.40 for 6 seconds, $0.80 for 10 seconds, confirmed against hiapi's live pricing endpoint — there is no cheaper 'fast' tier for text-to-video, only for image-to-video. A full generation cycle is create task, poll for completion, then download the output URL immediately, since the delivered link expires.

MiniMax Hailuo 3 (H3) API: How It Compares to Kling 3.0 Omni, Seedance 2.0, and Hailuo 2.3 on hiapi
MiniMax H3 (aka Hailuo 3) launched July 31, 2026 and is already live on hiapi as `minimax-h3` at $0.118872/s — below MiniMax's own $0.13/s rate. Kling 3.0 Omni offers the most granular resolution/audio cost control, from $0.10/s (720p, silent) to $0.479/s (4K). Seedance 2.0 is the only model of the four with reference-video input, and its ref-guided tier is cheaper at every resolution, up to 4K at $0.915/s. Hailuo 2.3 is priced per-video, not per-second — a flat $0.40 (6s) or $0.80 (10s) with just three input fields.

Wan 3.0 API: Release Status and a Working Wan 2.7 Alternative
Wan 3.0 API access is not live on hiapi (or confirmed anywhere) as of August 2026 — industry reports on an exact release date still conflict. hiapi already runs Wan 2.7, Alibaba's current-generation video and image model, through the same task-based API pattern a Wan 3.0 endpoint would likely use. Wan 2.7 Video generates up to 15 seconds of 1080p footage with native audio for $0.167/second (or $0.10/second at 720p). Wan 2.7 Image Pro produces up to 4K output for a flat $0.08 per image, with strong prompt adherence in both English and Chinese. If you're building against a 'Wan 3.0 API' today, Wan 2.7 on hiapi is the closest thing that actually ships — same request/response shape you'd expect from a task-based video API.

Kling AI Short Video API: Batch-Test TikTok Hooks
kling-3.0-turbo/text-to-video takes a prompt, duration (3-15s), resolution (720p or 1080p), and aspect_ratio -- no other parameters, so every variant is just a prompt swap. hiapi's task API is async and stateless per call: submit all your variants back to back, then poll each taskId independently. Nothing blocks anything else. Four 5-second 9:16 clips at 720p cost $0.65 each -- $2.60 for a full batch of hook candidates, cheaper than a single stock video license. Batching isn't free of curation: every clip still needs a human eyeball pass before anything ships, especially for lettering or fine motion. The pattern scales past 4 clips -- the only real ceiling is your account balance and how many hook ideas you can write.

Batch Short-Form Video with hailuo-2.3-fast/image-to-video on hiapi
hailuo-2.3-fast/image-to-video turns a single still into a 6s or 10s MP4 clip, priced flat per video ($0.27 / $0.46) rather than per second — built for high-volume TikTok/Reels workflows on hiapi's async /v1/tasks API. The verified schema is narrow: prompt, a singular image_url, a string duration enum ("6"/"10"), and optional prompt_optimizer — no aspect_ratio, resolution, or seed fields are accepted. This guide includes a real generated clip, the exact request/response shapes, a reusable Python batch helper, and the two schema mistakes (array image_url, numeric duration) that return a 400.

How to Use qwen-audio-3.0-tts-flash via the hiapi API: curl, Python, and a Working Request
qwen-audio-3.0-tts-flash is a low-latency text-to-speech model on hiapi, built for AI assistants and voice agents. It runs through hiapi's unified /v1/tasks endpoint: submit text + a voice, poll (or get a callback) for an audio URL. Required fields are just text and voice; format, sample_rate, and volume are optional with fixed enums. Output audio is temp storage — download it within about 7 days before the URL expires.

How to Use qwen-audio-3.0-tts-plus via the hiapi API: Text-to-Speech with curl and Python
qwen-audio-3.0-tts-plus is a text-to-speech model reached via hiapi's unified async POST /v1/tasks queue, not a dedicated audio endpoint. Minimal working curl and Python examples: create task, poll to a terminal status, download the resulting MP3. Full verified input schema: required text + voice (2-value enum), optional format/sample_rate enums and pitch/volume ranges, with the exact 400 errors the API returns for invalid values. Covers callback vs. polling, the Idempotency-Key header for safe retries, storage:temp (~7 day) vs persistent output retention, and the 401/400/task-fail error shapes. Links to hiapi's async task docs, authentication, rate limits, the audio models collection, and the live pricing page instead of hardcoding costs.

How to Use DeepSeek V4 Flash via the hiapi API: curl, Python, and a Working Request
deepseek-v4-flash is a reasoning chat model reached via hiapi's OpenAI-compatible POST /v1/chat/completions — not the async /v1/tasks queue used by image/video models. Minimal working curl and Python examples using the bare model id and Bearer auth. Two verified production gotchas: max_tokens caps reasoning+answer combined (too-low values yield empty content with finish_reason=length), and reasoning:{enabled:false} disables chain-of-thought for cheap, fast, deterministic tasks. Covers streaming (SSE with delta.content, terminated by [DONE]), retry/backoff on 429 and 5xx, and the exact 401 permission_denied error shape. Links to hiapi's authentication and rate-limit docs plus the model's live pricing page instead of hardcoding costs.
Build with the models you just read about.
Compare image, video, and audio models, then use the same API workflow in production.