Context
The dynamic pricing system (PR #209) added ProviderPricing formulas to all 22 model definitions. During implementation, we already found one inaccuracy — Kling's formula ignored the generate_audio flag ($0.112/sec vs $0.14/sec), which was fixed in 37b3875.
There may be similar issues with other models. Each formula should be verified against the current provider pricing page.
What needs to be done
For each model definition in src/definitions/models/*.ts, verify:
- Rate accuracy — does the per-unit cost match the provider's current pricing?
- Parameter coverage — are all price-affecting parameters accounted for? (e.g. resolution tiers, audio toggles, model variants)
- Bounds correctness — do
minUsd and maxUsd reflect the actual min/max possible costs?
- Description clarity — does the
description string accurately describe the pricing without mentioning features that aren't modeled?
Models to review
| Model |
Provider |
Pricing type |
Verify against |
| kling |
fal |
per-second + audio toggle |
fal.ai/kling-video |
| wan |
fal |
per-second |
fal.ai/wan |
| reve |
fal |
per-second |
fal.ai pricing page |
| ltx-a2v |
fal |
per-second |
fal.ai pricing page |
| veed-fabric |
fal |
per-second |
fal.ai pricing page |
| omnihuman |
fal |
per-second |
fal.ai pricing page |
| seedance |
piapi |
per-second |
piapi pricing |
| flux |
fal |
per-image |
fal.ai pricing page |
| flux-schnell |
fal |
per-image (flat) |
fal.ai pricing page |
| nano-banana-2 |
fal |
per-image (varies by mode) |
fal.ai pricing page |
| nano-banana-pro |
fal |
per-image |
fal.ai pricing page |
| phota |
fal |
per-image (varies by variant) |
fal.ai pricing page |
| qwen-image-2 |
fal |
per-image |
fal.ai pricing page |
| recraft-v4 |
fal |
per-image |
fal.ai pricing page |
| soul |
higgsfield |
per-image |
higgsfield pricing |
| llama |
fal |
per-image |
fal.ai pricing page |
| elevenlabs-tts |
elevenlabs |
per-character |
elevenlabs.io/pricing |
| heygen-avatar |
heygen |
per-second |
heygen pricing |
| sonauto |
elevenlabs |
flat |
elevenlabs pricing |
| whisper |
groq, fireworks |
per-minute |
groq/fireworks pricing |
Known gaps
- Some models have multiple provider variants with different pricing tiers (e.g. Kling v2, v2.5, v2.6, v3, O3 all map to the same formula). These may actually have different per-second rates.
- The gateway maps ~50 model IDs to SDK model definitions in
gateway/src/services/pricing/dynamic.ts. If provider rates differ per variant, we may need per-variant pricing in the SDK.
- HeyGen pricing uses an estimated
$0.10/sec and speech-rate heuristic (12.5 chars/sec) — needs verification against actual HeyGen invoices.
Related
Context
The dynamic pricing system (PR #209) added
ProviderPricingformulas to all 22 model definitions. During implementation, we already found one inaccuracy — Kling's formula ignored thegenerate_audioflag ($0.112/sec vs $0.14/sec), which was fixed in37b3875.There may be similar issues with other models. Each formula should be verified against the current provider pricing page.
What needs to be done
For each model definition in
src/definitions/models/*.ts, verify:minUsdandmaxUsdreflect the actual min/max possible costs?descriptionstring accurately describe the pricing without mentioning features that aren't modeled?Models to review
Known gaps
gateway/src/services/pricing/dynamic.ts. If provider rates differ per variant, we may need per-variant pricing in the SDK.$0.10/secand speech-rate heuristic (12.5 chars/sec) — needs verification against actual HeyGen invoices.Related