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

Using Nano-Banana-2-Lite for E-Commerce Product Images via the hiapi API
Nano-Banana-2-Lite generates 1K product images for $0.033 each on hiapi's async task API — the budget tier for bulk e-commerce catalogs. The model id is case-sensitive, aspect_ratio is a 15-value enum, and there is no resolution field; output URLs are signed and expire. A reusable white-background hero prompt template plus 'no text, no logo' produces marketplace-ready listings reliably. Up to 10 reference images via image_urls let you restage one canonical product shot into lifestyle and premium scenes with the design intact. A 1,000-SKU catalog at three shots per SKU costs $99 on Lite vs $510 on nano-banana-pro — run the long tail on Lite, re-shoot top SKUs on Pro.

Grok Imagine 1.5 Image-to-Video Prompt Recipes: Copy-Paste Prompts With Real Outputs
Four copy-paste grok-imagine-1.5 image-to-video prompt recipes, each paired with its source still and the real clip it generated on the live hiapi API - raw first outputs, hosted permanently. The model exposes no motion parameters: the live-verified schema is prompt + image_urls plus optional duration (1-15s), resolution (480p/720p), and aspect_ratio - all camera and motion control is prompt wording. Covers camera language (push-in, lateral track with parallax), subject-driven portrait micro-motion in 9:16, and static-camera ambient scenes. Pricing is per second only: $0.0114/s at 480p, $0.0214/s at 720p - a 6s 720p clip is ~$0.13, and re-animating a still you already have adds zero image cost. Includes a ready-to-run Python snippet (submit, poll, download) and the exact cost math for keeping iteration under a nickel per try.

How to use seedream-5.0-lite/text-to-image via the hiapi API: curl, Python, and a working request
seedream-5.0-lite/text-to-image runs on the unified async /v1/tasks endpoint: POST to create, then poll GET /v1/tasks/{id} or receive a callback. The input schema is strict: prompt, aspect_ratio, and resolution are all required, and any extra field (seed, n, negative_prompt, size) is rejected with a 400. resolution accepts only 2K or 4K -- there is no 1K tier on this model, unlike most other hiapi image models. The finished image is at data.output[0].url with an expireAt timestamp; download the bytes immediately and store them on your own infrastructure.

How to Use seedream-5.0-lite Image-to-Image via the hiapi API
Call seedream-5.0-lite/image-to-image via POST /v1/tasks; all four input fields are required: prompt, image_urls, aspect_ratio, resolution. resolution only accepts 2K or 4K on this model — payloads with 1K that work elsewhere get a 400. image_urls takes 1-14 HTTPS reference URLs, enabling multi-reference edits in one request. Prefer callbacks (callback.url + when:final) over polling in production, and download output[0].url immediately — it expires.

How to Use the Nano Banana 2 Lite API: curl, Python, and a Working Request
Nano-Banana-2-Lite runs on hiapi's unified async task API: POST /v1/tasks, poll GET /v1/tasks/{id}, download data.output[0].url before it expires. Required input is prompt + aspect_ratio; the model id is case-sensitive (lowercase returns 400 MODEL_UNAVAILABLE). Reference images go in image_urls (max 10) — unlike Nano-Banana-2/Pro which use image_input; this rename is the main porting gotcha. Lite accepts no resolution/seed/n fields; step up to Nano-Banana-2 or Pro for 1K/2K/4K control. For production use callback.url with when:'final' instead of polling, persist taskId for idempotent retries, and store image bytes rather than expiring URLs.

How to use ideogram-v4 via the hiapi API: curl, Python, and a working request
ideogram-v4 runs on hiapi's unified task API: POST /v1/tasks to create, poll GET /v1/tasks/<id>, download data.output[0].url before the signed URL expires. The schema accepts exactly four input fields - prompt and rendering_speed (TURBO/BALANCED/QUALITY) are required; aspect_ratio (1:1, 16:9, 4:3, 9:16, 3:4) and integer seed are optional. Ideogram-native parameters like style_type, magic_prompt, negative_prompt and num_images are rejected with 400 - typography control lives entirely in the prompt. For batches, add callback: {url, when: "final"} instead of polling, and make the handler idempotent on taskId.

How to use qwen-image-2.0-pro via the hiapi API: curl, Python, and a working request
qwen-image-2.0-pro runs on hiapi's async task endpoint: POST /v1/tasks to create, GET /v1/tasks/<id> to poll, image at data.output[0].url. The input schema is strict: required prompt, a five-value size enum with * separators, plus negative_prompt, seed, watermark, and prompt_extend — no aspect_ratio, no n, no image input. Pro and base qwen-image-2.0 share an identical schema, so iterate cheaply on base and rerun the locked prompt on Pro for final assets.

How to use grok-imagine-1.5/image-to-video@preview via the hiapi API: curl, Python, and a working request
Step-by-step integration of grok-imagine-1.5/image-to-video@preview through hiapi's async task API: create with POST /v1/tasks, poll or register a callback, download the MP4 before the temp URL expires. Every schema constraint in this guide was verified against the live validator: one image_urls entry, duration 1-15 s, resolution 480p/720p, six aspect ratios, prompt-only motion control.

Short-Form Video with seedance-2.0-mini: An End-to-End hiapi API Workflow
End-to-end workflow for TikTok/Reels-style vertical clips with seedance-2.0-mini on hiapi: first curl call, reusable Python client, I2V first-frame control, and a batch script for a week of content. Verified against the live API: prompt, duration (4-15s) and resolution (480p/720p) are required; aspect_ratio supports 9:16 for vertical; the schema is strict and rejects unknown fields. 480p drafts cost $0.068/second (~$0.27 for 4s), so the draft-at-480p / re-render-keepers-at-720p loop stays cheap; output MP4s include native synced AAC audio. The demo clips embedded in the article are real outputs from the exact requests shown, including a vertical 9:16 clip with native audio.

Controlling AI Image and Video API Costs: Tiers, Batching, and Model Choice
Media models bill in flat units - per image, per second of video, per 1,000 characters of audio - and the spread across models is 34x for images and 50x for video. The biggest savings come from workflow, not negotiation: iterate on draft-tier models, batch through the async /v1/tasks API, and promote only winners to premium renders. The quiet cost leak is paying twice - expired output URLs, abandoned polls, and regenerating assets you already own.
Build with the models you just read about.
Compare image, video, and audio models, then use the same API workflow in production.