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

Best AI Video Generation API in 2026: Comparing hiapi's Four Video Models
hiapi ships four video generation models spanning almost 5× in per-second cost at 1080p: wan2.7-t2v / wan2.7-i2v at $0.167/sec, happyhorse-1-0 at $0.288/sec, and seedance-2-0 at $0.823/sec. wan2.7 (t2v and i2v) is the price floor for HD output on the platform — use it as your default unless your project specifically needs cinematic stylization or premium polish. seedance-2-0 is the only model that handles both text-to-video and image-to-video in one integration, plus offers a cheap 480p tier ($0.15/sec) that's great for storyboarding before HD render. Once you factor in real acceptance rates (1 in 4 takes kept), the cost gap between cheap and premium widens fast — making model choice a real unit-economics decision, not just an aesthetics one.

FLUX-Schnell Prompt Recipes: Copy-Paste Templates With Real Outputs
FLUX-Schnell on hiapi is about $0.005 per image and ~30 seconds end-to-end via the unified /v1/tasks endpoint — the cheap-and-fast tier of the FLUX family. Seven prompt recipes covering hero imagery, e-commerce flat lay, avatars, landscapes, isometric SaaS, food, and concept sketches — three with real outputs you can inspect. Includes the structural prompt pattern that consistently produces clean outputs on a 1-4 step model, plus the two API quirks (no resolution field; only five supported aspect ratios) that trip up first-time users.

GPT Image 2 Pricing Drivers and Production Examples
GPT Image 2 cost depends on model choice, resolution, output volume, and retry behavior. Use live pricing for current numbers instead of copying static tables into articles or code. For production, create async tasks from your backend and use callbacks for terminal status. GPT Image 2 is a strong fit for long prompts, readable text, posters, and layout-heavy images.

Text-to-Video vs Image-to-Video API Workflow
Use text-to-video for storyboards, ideation, and prompt-first creative exploration. Use image-to-video when the subject, product, character, or first frame must stay close to a source asset. Seedance 2.0 is the broad default; Wan 2.7 Image-to-Video is the focused first-frame workflow. Video jobs should use callback-based completion in production.

How to Call Multiple Image Models with One API Key
Use one server-side API key for model testing, billing visibility, and production routing. Route model choice through the request body instead of hard-coding separate provider clients. Start prompt iteration on a lower-cost model, then move final assets to a higher-fidelity image model. Use callbacks or task polling depending on your production volume.

The AI Image Prompt Library: 10 Production-Ready Prompts by Use Case
Ten prompts organized by the five use cases that account for most production image work: e-commerce hero shots, social covers, avatars, product display, and editorial illustration. Every prompt is paired with the hiapi model and aspect ratio it was tested at, plus a one-paragraph explanation of why the wording works — so the prompts can be adapted rather than just copied. Pick the model by job: qwen-image-2.0 ($0.025) for volume stylized work, gpt-image-2 ($0.03) for text-heavy layouts, Nano-Banana ($0.05) for portrait consistency, flux-1.1-pro ($0.05) for photorealism.

Adding AI Image Generation to a Next.js App With the hiapi API
Image generation takes 60–120 seconds — too long for a single client request, so the app must split the work across a route handler that creates a task and a polling endpoint that surfaces progress without holding a serverless invocation. Calling hiapi directly from a React component leaks the API key to the browser. A Next.js route handler keeps the key on the server and gives you one auditable place to rate-limit and validate prompts. Output URLs returned by hiapi are signed and short-lived. Apps that store them directly will serve 404s on refresh — mirror every successful result to R2 (or S3 / Supabase Storage) before persisting. Cumulative Layout Shift on AI-image apps is fixed by reserving the result container's aspect ratio with CSS and matching it to the ratio sent to hiapi.

Consistent Characters with Nano-Banana on hiapi: A Working Workflow for Storyboards and E-Commerce
Three Nano-Banana models on hiapi all tagged for character consistency: Nano-Banana ($0.05 flat), Nano-Banana-2 ($0.085 / $0.076 / $0.114 across 1K/2K/4K — 2K is cheaper than 1K), and Nano-Banana-Pro ($0.17 at 1K/2K, $0.30 at 4K). The technique is a character bible — a dense, repeatable, deterministic prompt prefix that anchors face geometry, skin/hair markers, wardrobe, and vibe across all renders. No reference image, no fine-tune, no LoRA. Storyboard demo: one engineer character ('Mira') across cover, model sheet, warm-tungsten workshop, and cold-overcast rooftop. Same beanie, same toolbelt, same beauty mark stays on the right cheek through both scenes. E-commerce demo: one fashion model ('Aria') in three full-body look-book shots — frontal hero, three-quarter angle, then a wardrobe swap to a camel double-breasted overcoat. Face, hair parting, beauty mark, and gold studs all hold across renders. Flat Nano-Banana rejects the resolution field with a 400 — only set it for Pro and -2. Output URLs have an expireAt; download bytes immediately rather than hot-linking. Total cost for all 8 images in the article: $0.52 (7 × $0.05 Nano-Banana + 1 × $0.17 Nano-Banana-Pro hero).

hiapi Image and Video Generation APIs: The Complete Platform Guide
hiapi is an image and video generation API gateway: one Bearer-auth endpoint fronts FLUX 1.1 Pro, Nano-Banana, GPT-Image-2, Qwen-Image, Wan2.7, Seedance, and HappyHorse. Pricing is flat per task — $0.02 for gpt-image-2-beta, $0.05 for Nano-Banana or flux-1.1-pro, up to $0.823 for a 1080p Seedance clip. No token billing, no surge. All generation runs through the async POST /v1/tasks endpoint. Same shape for text-to-image, image-to-image, text-to-video, image-to-video. Most image models accept input.prompt + input.aspect_ratio. qwen-image-2.0 uses a DashScope-style nested schema with literal pixel sizes — keep a model→payload adapter map. Four sample images in this post — cover illustration, photoreal portrait, CJK calligraphy signboard, layout poster — were all rendered through hiapi for a total of $0.155.

FLUX 1.1 Pro on hiapi: Capabilities, Pricing, and a Working Code Example
FLUX 1.1 Pro is on hiapi at $0.05 per image, flat across aspect ratios — no resolution multiplier. It is served on the async /v1/tasks endpoint, not /v1/chat/completions; use `aspect_ratio` not `size`. Photoreal portraits, product flat-lays, and short headline text render reliably; unprompted text on objects is still hallucinated. Older FLUX.1 Dev and the original FLUX Pro are not on hiapi — the catalogue carries only the 1.1 Pro flagship.
Build with the models you just read about.
Compare image, video, and audio models, then use the same API workflow in production.