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

HiAPI 400 Bad Request: How to Fix Invalid Parameter Errors on the Task API
A 400 on the unified /v1/tasks API means the request was rejected during schema validation, before any model ran — it is a request problem, not an auth (401) or balance (402) problem. HiAPI returns a flat body: code 400, error_code INVALID_REQUEST (schema) or MODEL_UNAVAILABLE (bad model id), and a field-level message like 'invalid input: aspect_ratio: value must be one of ...'. Common triggers: malformed JSON, missing required fields, unknown/renamed field names, invalid enum values, wrong value types, and non-existent model ids. Read the message literally — it names the exact field and the allowed value or expected type, so you can fix one field per pass. A rejected 400 never creates a task, so it is never billed.

Stable Diffusion API Alternatives in 2026: flux-2, nano-banana-2, z-image and flux-schnell Compared
Stable Diffusion is still a solid open model, but running it in production means managing GPUs, cold starts, and aging SDXL weights — a hosted API skips all of that. On hiapi, four text-to-image models cover the same ground: flux-2 for fidelity and prompt adherence, nano-banana-2 for 4K output and clean text, z-image for near-free turbo drafts, and flux-schnell for the cheapest fast batches. In same-prompt tests, flux-2 and nano-banana-2 led on detail and text rendering; z-image held up remarkably well for $0.008 per image; flux-schnell traded accuracy for speed and price. Starting prices as of 2026-10: flux-schnell $0.005, z-image $0.008, nano-banana-2 from $0.036, flux-2 from $0.0375 per image — all pay-as-you-go behind one key. There is no separate Stable Diffusion endpoint to port field-by-field: you POST to one async /v1/tasks API and pick the model that fits the job.
HeyGen Avatar IV API Pricing: $0.15 per Second
HeyGen Avatar IV on HiAPI is billed per second of output video at $0.15, with 720p and 1080p at the same price; a 10-second clip costs $1.50. An estimate is held when the task starts and settled to the actual seconds when it finishes; failed tasks are refunded in full, and $10 buys about 66 seconds. HeyGen Avatar V costs the same: use Avatar IV for your own photo, Avatar V for preset avatars, transparent backgrounds, captions or 4K.
HeyGen Avatar IV Examples: 7 Scripts, Real Videos
Seven use cases, each with the input photo, a real HeyGen Avatar IV output, the full script and its voice and aspect-ratio settings, plus a link that opens the model page with the script filled in. Every example notes the few words to change for your own product, course or practice; the structure carries over. The audio-driven example needs no script, just a photo and a recording; for a vertical video from a landscape photo, fill the gap with a background image.
HeyGen Avatar IV vs Avatar V: Photo or Preset?
Pick Avatar IV when you have a photo and want that person on screen; pick Avatar V for transparent backgrounds, SRT captions or 4K without your own likeness. Both speak the same way: a script with the same 102 voices, or your own audio, with up to 5,000 characters of script. Pricing is identical at $0.15 per second: $1.50 for 10 seconds, $4.50 for 30, at any resolution.

Nano Banana 2.1 Prompts: 5 Ready-to-Use Templates with Real Outputs
Five everyday scenarios, each with a real Nano Banana 2.1 output, its settings and the full prompt, plus a link that opens the model page with the prompt filled in. Every template notes the few lines to change for your own product, event or furniture; the rest of the structure carries over. The outfit swap is a reference edit: upload the original photo, then state what changes and what stays in separate sentences.

Nano Banana 2.1 API Pricing: $0.022 per Image at 1K
Nano Banana 2.1 on HiAPI costs $0.022 per image at 1K, $0.036 at 2K and $0.058 at 4K, about 29%–49% below Google's standard price; the Programmers' Day 50%-off price brings 1K down to $0.011. Price depends only on output resolution: text-to-image and reference-image edits cost the same, failed tasks are refunded, and $10 buys about 450 images at 1K. On HiAPI it is about 33%–39% cheaper than Nano Banana 2 and costs about 44%–48% of GPT Image 2.5 at the same resolution.

Nano Banana 2.1 vs GPT Image 2.5: Which Should You Use?
Pick Nano Banana 2.1 for high-volume, budget-first work and for 1:8 banners or 4:5 crops; pick GPT Image 2.5 for transparent PNGs or more than 10 reference images. At the same resolution Nano Banana 2.1 costs 44%–48% as much: about 450 images at 1K per $10, versus 200 on GPT Image 2.5. Both run on POST /v1/tasks with one API key, so switching means changing the model and reference fields.
How to Use HeyGen Avatar IV API in 5 Minutes
HeyGen Avatar IV turns one portrait photo plus a script or audio track into an MP4 of that person talking. On HiAPI it costs $0.15 per second at 720p or 1080p; a 10-second clip is $1.50 and failed tasks are refunded in full. Call POST https://api.hiapi.ai/v1/tasks with model heygen-avatar-iv, then poll or use a callback and take the output item whose type is video.

How to Use gemini-nano-banana-2.1 via the hiapi API: curl, Python, and a Working Request
gemini-nano-banana-2.1 runs on hiapi's unified async task API: POST /v1/tasks, then poll GET /v1/tasks/{id} or use a callback, and download data.output[0].url before it expires. Only prompt is required; aspect_ratio (15 values, default auto), resolution (1K/2K/4K), and output_format (jpg/png) are optional, but resolution changes the price per image. Reference images for image-to-image go in image_input as a list of public URLs — not image_urls, which belongs to a different tier in the same family. Pricing scales by resolution: roughly $0.022 (1K), $0.036 (2K), and $0.058 (4K) per image at the time of writing. For production, use a callback with when:'final' instead of polling, and persist the taskId since task creation is not idempotent.
Build with the models you just read about.
Compare image, video, and audio models, then use the same API workflow in production.