The cost math — when AI video is viable and when it bankrupts you — step 6 of 6
One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.
Final drill. Synthesize price + retake + quality into a router:
route_to_model(budget, quality_floor, retake_tolerance) that
takes:
budget(float): max dollars per finished minute the user can spend.quality_floor(str): minimum acceptable quality, one of"ai_flavored","client_grade","premium".retake_tolerance(float): the retake multiplier the user expects to hit.
Each model has a quality_tier per this table:
| Model | quality_tier | $/sec |
|---|---|---|
| Hailuo 02 (768p) | ai_flavored | 0.045 |
| Veo 3.1 Lite (720p) | ai_flavored | 0.05 |
| Kling 3.0 standard | client_grade | 0.084 |
| Sora 2 (720p) | client_grade | 0.10 |
| Sora 2 Pro (720p) | premium | 0.30 |
| Veo 3 (with audio) | premium | 0.40 |
| Sora 2 Pro (1024p) | premium | 0.50 |
Quality ordering (each tier accepts higher tiers as substitutes):
ai_flavored < client_grade < premium. So if
quality_floor == "client_grade", both client_grade and
premium models are eligible.
Algorithm:
- Filter models down to those whose
quality_tieris >=quality_floor. - Compute each eligible model's
$/min real = price_per_sec × 60 × retake_tolerance. - Keep only models where
$/min real <= budget. - From the remaining set, return the CHEAPEST one (lowest
$/min real). On a tie, prefer the model that appears EARLIER in the PRICES dict order. - If no model fits, return
"NO MATCH".
Five scenarios run. Expected output:
$10 + ai_flavored + 2.5x -> Hailuo 02 (768p)
$20 + client_grade + 3.0x -> Kling 3.0 standard
$50 + premium + 1.5x -> Sora 2 Pro (720p)
$200 + premium + 4.0x -> Sora 2 Pro (720p)
$2 + client_grade + 5.0x -> NO MATCH
One last thing before we move on. Same surface as a write step — but the lesson doesn't complete until this passes.
Final drill. Synthesize price + retake + quality into a router:
route_to_model(budget, quality_floor, retake_tolerance) that
takes:
budget(float): max dollars per finished minute the user can spend.quality_floor(str): minimum acceptable quality, one of"ai_flavored","client_grade","premium".retake_tolerance(float): the retake multiplier the user expects to hit.
Each model has a quality_tier per this table:
| Model | quality_tier | $/sec |
|---|---|---|
| Hailuo 02 (768p) | ai_flavored | 0.045 |
| Veo 3.1 Lite (720p) | ai_flavored | 0.05 |
| Kling 3.0 standard | client_grade | 0.084 |
| Sora 2 (720p) | client_grade | 0.10 |
| Sora 2 Pro (720p) | premium | 0.30 |
| Veo 3 (with audio) | premium | 0.40 |
| Sora 2 Pro (1024p) | premium | 0.50 |
Quality ordering (each tier accepts higher tiers as substitutes):
ai_flavored < client_grade < premium. So if
quality_floor == "client_grade", both client_grade and
premium models are eligible.
Algorithm:
- Filter models down to those whose
quality_tieris >=quality_floor. - Compute each eligible model's
$/min real = price_per_sec × 60 × retake_tolerance. - Keep only models where
$/min real <= budget. - From the remaining set, return the CHEAPEST one (lowest
$/min real). On a tie, prefer the model that appears EARLIER in the PRICES dict order. - If no model fits, return
"NO MATCH".
Five scenarios run. Expected output:
$10 + ai_flavored + 2.5x -> Hailuo 02 (768p)
$20 + client_grade + 3.0x -> Kling 3.0 standard
$50 + premium + 1.5x -> Sora 2 Pro (720p)
$200 + premium + 4.0x -> Sora 2 Pro (720p)
$2 + client_grade + 5.0x -> NO MATCH
this step needs the editor
on desktop today; in the app (coming soon). save your spot and we'll bring you back here when you're ready.