HiAPI
  • Models
  • Pricing
Search

Search HiAPI models, tools, and resources.

LoginGet Started
  • Models
  • Pricing
HiAPI

One API, All AI Models

Generate images, video, and audio with leading models through one production-ready API.

Get a free API key

AI Image API

  • All image models
  • GPT Image 2
  • Nano Banana 2
  • Seedream 5.0 Pro
  • Qwen Image 2.0 Pro
  • FLUX 1.1 Pro

AI Video API

  • All video models
  • Seedance 2.5
  • FLUX.3 Video
  • Seedance 2.0
  • Veo 3.1
  • Kling 3.0

AI Audio API

  • All audio models
  • MiniMax Music 2.6
  • MiniMax Music 1.5
  • ElevenLabs v3
  • Text to music
  • Text to speech

Product

  • Model marketplace
  • Playground
  • Pricing
  • Image API Cost Calculator
  • Free GPT Image 2 Generator
  • Free Nano Banana Image Generator
  • Outfit Preview
  • Product Photo Lab

Developers

  • Documentation
  • API Reference
  • Agent Skills
  • LLM integration index
  • Blog

Company

  • About
  • Contact support
  • Terms of Service
  • Privacy Policy

© 2026 hiapi. All rights reserved.

Open source on GitHubPython SDK on PyPI
  • Know exactly what unit you're paying for
  • Treat pricing tiers as a feature, not fine print
  • For video, duration is the multiplier
  • Draft cheap, finalize premium
  • Batch through the async task API
  • Don't pay for the same output twice
  • A cost-control checklist
GuideJul 5, 20269 min read

Controlling AI Image and Video API Costs: Tiers, Batching, and Model Choice

The cheapest and priciest model on the same task differ by 34-50x. Cost control is mostly knowing when each tier earns its price.

hiapiPricingCost OptimizationBatchingGuide

Latest models

Explore models

Contents
  • Know exactly what unit you're paying for
  • Treat pricing tiers as a feature, not fine print
  • For video, duration is the multiplier
  • Draft cheap, finalize premium
  • Batch through the async task API
  • Don't pay for the same output twice
  • A cost-control checklist

Generate it with HiAPI

Choose a model, enter your prompt, and see the result.

HiAPI Blog

Related articles

HiAPI

Generate it with HiAPI

Nobody blows an AI media budget in one dramatic API call. Spend leaks out quietly, through three habits: paying premium rates for throwaway drafts, not knowing which unit you are actually billed in, and iterating serially on an expensive model because the workflow was never set up to fan out cheap variants first.

This guide walks through the cost levers that actually matter when you generate images and video through hiapi: pricing units, quality tiers, video duration, a draft-then-upgrade workflow, and batching through the async task API. All prices below were pulled from the live pricing page in July 2026 — treat them as a snapshot and check current prices before you budget anything.

Know exactly what unit you're paying for

hiapi bills media models in flat, per-output units — there is no token math to reverse-engineer:

  • Image models charge per image, regardless of how complex the prompt is.
  • Video models charge per second of generated output.
  • Audio models (e.g. elevenlabs/text-to-dialogue-v3) charge per 1,000 characters of input text.

Here is the per-image landscape across the text-to-image lineup:

ModelPrice per image
flux-schnell/text-to-image$0.005
gpt-image-2/text-to-image@ext$0.007
z-image$0.008
gpt-image-2/text-to-image@beta$0.02
qwen-image-2.0$0.025
gpt-image-2/text-to-image$0.03
nano-banana$0.05
flux-1.1-pro$0.05
flux-2/text-to-image$0.05
nano-banana-2$0.051
wan2.7-image/text-to-image$0.08
nano-banana-pro$0.17

And per second for video:

ModelPrice per second
grok-imagine (text-to-video / image-to-video)$0.0114
kling-3.0-omni (text-to-video / image-to-video)$0.129
seedance-2.0$0.136
seedance-2.0-mini$0.147
wan2.7-video@pro (text-to-video / image-to-video)$0.167
happyhorse-1.0$0.168
happyhorse-1.1 (all endpoints)$0.21
seedance-2.0-fast$0.2357
veo-3.1-fast$0.25
veo-3.1$0.57

Two numbers worth internalizing: the image lineup spans 34× from cheapest to most expensive ($0.005 → $0.17), and video spans 50× ($0.0114 → $0.57 per second). Model choice is not a tuning knob — it is the single biggest line item decision you make.

One caution: don't infer price from a model's name. In the Veo family, the -fast variant is the cheaper tier ($0.25/s vs $0.57/s), but seedance-2.0-fast is a premium turbo tier that costs more per second than base seedance-2.0 ($0.2357 vs $0.136). Read the price list; never assume.

Three pricing tiers: draft, standard, and premium models each earn their price at a different stage of the workflow

Treat pricing tiers as a feature, not fine print

Most model families ship in tiers, and the tiers exist precisely so you don't pay flagship rates for every job:

  • Draft tier ($0.005–$0.008): flux-schnell, z-image, and the @ext channel of gpt-image-2. Use these for prompt iteration, composition tests, and anything a human will look at once and discard.
  • Standard tier ($0.02–$0.05): gpt-image-2/text-to-image, qwen-image-2.0, nano-banana, flux-2. Production quality for blog covers, product shots, and UI assets.
  • Premium tier ($0.08–$0.17): wan2.7-image and nano-banana-pro. Reserve these for final hero assets where detail and instruction-following are the point.

The same logic applies to channel variants: the pricing page lists @beta and @ext versions of gpt-image-2/text-to-image at $0.02 and $0.007 against $0.03 for the standard channel. If your workload tolerates a preview channel's terms, that is a 33–77% discount on an identical prompt. We cover how per-image cost interacts with resolution and retry rates in more depth in Cheapest Image Generation API: How to Compare Real Cost Per Image.

For video, duration is the multiplier

Video cost is simply rate × seconds, which means every default you don't question gets multiplied. The same 8-second clip costs:

Model8-second clip
grok-imagine/text-to-video$0.09
kling-3.0-omni/text-to-video$1.03
veo-3.1-fast/text-to-video$2.00
veo-3.1/text-to-video$4.56

Two habits follow directly:

  1. Request the shortest duration that serves the shot. Trimming a veo-3.1 clip from 8 to 5 seconds saves $1.71 — per clip, every time.
  2. Iterate on a cheap model, render on the expensive one. Six 4-second draft iterations on grok-imagine cost about $0.27 in total — less than what half a second of veo-3.1 output costs. Burn your prompt experiments there, then spend the $4.56 exactly once.

Draft cheap, finalize premium

The single highest-leverage workflow change is separating exploration from delivery. Worked example for a product image:

  • 20 draft iterations on z-image at $0.008 = $0.16
  • 3 final renders on nano-banana-pro at $0.17 = $0.51
  • Total: $0.67

Running all 23 generations on nano-banana-pro would cost $3.91. Same number of API calls, same final asset, roughly 83% less spend — and the draft loop is faster, too, because draft-tier models return in seconds.

The one thing to watch: prompts don't transfer perfectly between families. Keep the draft loop on the model you'll finalize with for the last one or two iterations, so you catch family-specific quirks before committing the premium budget.

Batching: fan out many cheap draft tasks in parallel, then promote only the winner to a premium render

Batch through the async task API

Every media model on hiapi runs through the async task endpoint: POST /v1/tasks returns a task ID immediately, and you poll for the result. There is no per-request discount for batching — the win is architectural. Because submission is decoupled from completion, you can fan out a whole draft batch at once instead of waiting on each generation serially, which is what makes the draft-then-upgrade loop practical:

import requests, time

API = "https://api.hiapi.ai/v1/tasks"
HEADERS = {"Authorization": "Bearer YOUR_API_KEY"}

def create_task(model: str, prompt: str) -> str:
    r = requests.post(API, headers=HEADERS, json={
        "model": model,
        "input": {"prompt": prompt, "aspect_ratio": "1:1"},
    })
    r.raise_for_status()
    return r.json()["data"]["taskId"]

def wait_task(task_id: str, timeout: int = 600) -> str:
    deadline = time.time() + timeout
    while time.time() < deadline:
        task = requests.get(f"{API}/{task_id}", headers=HEADERS).json()["data"]
        if task["status"] == "success":
            return task["output"][0]["url"]  # expiring URL — download it now
        if task["status"] == "fail":
            raise RuntimeError(task.get("error"))
        time.sleep(5)
    raise TimeoutError(task_id)

# Fan out 12 draft variations on a $0.008 model: ~$0.10 for the whole batch
variations = [f"studio product shot of a ceramic mug, camera angle {i}" for i in range(12)]
task_ids = [create_task("z-image", p) for p in variations]
urls = [wait_task(t) for t in task_ids]

Submit all twelve first, then poll — the tasks generate concurrently on the platform side while your code waits once. Input fields beyond prompt vary per model (some accept resolution, some only aspect_ratio), so check the model's parameter table before batching; the gpt-image-2 walkthrough shows the pattern end to end.

When you scale fan-out up, respect the platform's concurrency ceiling — bursts that trip 429s just add retry latency. Image Generation API Rate Limits Explained covers how the limits behave and how to back off cleanly.

A ten-line budget guard turns "we'll watch spend" into an actual invariant:

PRICES = {"z-image": 0.008, "gpt-image-2/text-to-image": 0.03, "nano-banana-pro": 0.17}
BUDGET_USD = 5.00
spent = 0.0

def spend(model: str, images: int = 1) -> None:
    global spent
    cost = PRICES[model] * images
    if spent + cost > BUDGET_USD:
        raise RuntimeError(f"budget cap: ${spent + cost:.2f} would exceed ${BUDGET_USD:.2f}")
    spent += cost

Call it before every create_task and a runaway loop fails loudly at $5 instead of appearing on next month's invoice.

Don't pay for the same output twice

The subtler cost leak is regeneration — paying full price for an output you already had:

  • Download results immediately. Task output URLs are time-limited. If you store the hot link instead of the file and the link expires, the only fix is paying to regenerate. Details and a download pattern here.
  • Distinguish "task failed" from "my poll gave up". A task that succeeds after your client times out is money spent on an output nobody collected. Set poll timeouts generously above the model's real completion time — here's how to diagnose hanging tasks before assuming failure.
  • Reuse your own library. Before generating "a clean studio shot on a white background" for the fifth time, check the assets you already paid for. A shared bucket with searchable prompts is the cheapest model in your stack.

A cost-control checklist

  1. Budget in the model's native unit: per image, per second, per 1,000 characters.
  2. Pick one draft-tier and one delivery-tier model per media type; route by job stage.
  3. For video, question every duration default — seconds are the multiplier.
  4. Fan out drafts through /v1/tasks; promote only winners to premium renders.
  5. Enforce a hard spend cap in code, not in a dashboard you check weekly.
  6. Download every output immediately; never store expiring URLs.

Model prices shift as new versions land, so start from the live pricing page, pick your draft and delivery tiers from the model catalog, and wire the fan-out pattern above into your pipeline — the first batch you run will tell you exactly what your cost per usable asset really is.

Cost planning tool

Use the current HiAPI model price to estimate cost per generation, monthly spend, and annual budget.

Latest models

View all models
  • GPT Image 2From $0.007/image
  • Nano Banana 2From $0.051/image
  • Seedream 5.0 ProFrom $0.050/image
  • Seedance 2.5From $0.121/s

Explore models

TextImageVideoAudio
Back to blog
GPT Image 2From $0.007/image
Nano Banana 2From $0.051/image
Seedream 5.0 ProFrom $0.050/image
Seedance 2.5From $0.121/s
View all models
TextChat and reasoning
ImageGenerate and edit
VideoText and image to video
AudioSpeech and music
Start generating
View model pricing
View all articles
Seedance 2.5 Text-to-Video: Build Short-Form Clips with the hiapi API

Seedance 2.5 Text-to-Video: Build Short-Form Clips with the hiapi API

Seedance 2.5 Reference-to-Video for Short-Form TikTok and Reels Clips

Seedance 2.5 Reference-to-Video for Short-Form TikTok and Reels Clips

Grok Imagine Image 2.0 Image-to-Image Prompts: 4 Recipes With Real Outputs

Grok Imagine Image 2.0 Image-to-Image Prompts: 4 Recipes With Real Outputs

Grok Imagine 2.0 Text-to-Image Prompt Recipes: Copy-Paste Prompts With Real Outputs

Grok Imagine 2.0 Text-to-Image Prompt Recipes: Copy-Paste Prompts With Real Outputs

Using flux-2-klein-9b/text-to-image for E-Commerce Product Images via the hiapi API

Using flux-2-klein-9b/text-to-image for E-Commerce Product Images via the hiapi API

Flux-2-Klein-9b Image-to-Image for E-Commerce Product Photos

Flux-2-Klein-9b Image-to-Image for E-Commerce Product Photos

Start generating
Open the AI image generation cost calculator