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

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.
hiapi bills media models in flat, per-output units — there is no token math to reverse-engineer:
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:
| Model | Price 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:
| Model | Price 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.

Most model families ship in tiers, and the tiers exist precisely so you don't pay flagship rates for every job:
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.gpt-image-2/text-to-image, qwen-image-2.0, nano-banana, flux-2. Production quality for blog covers, product shots, and UI assets.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.
Video cost is simply rate × seconds, which means every default you don't question gets multiplied. The same 8-second clip costs:
| Model | 8-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:
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.The single highest-leverage workflow change is separating exploration from delivery. Worked example for a product image:
z-image at $0.008 = $0.16nano-banana-pro at $0.17 = $0.51Running 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.

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.
The subtler cost leak is regeneration — paying full price for an output you already had:
/v1/tasks; promote only winners to premium renders.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.
Key Takeaways