lesson 3 of 3 · the cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youlesson 3 of 3 · the cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youlesson 3 of 3 · the cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youlesson 3 of 3 · the cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youlesson 3 of 3 · the cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youlesson 3 of 3 · the cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youlesson 3 of 3 · the cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youlesson 3 of 3 · the cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youlesson 3 of 3 · the cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youlesson 3 of 3 · the cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youlesson 3 of 3 · the cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts youthe cost math — when ai video is viable and when it bankrupts you
Checkpoint
One last thing before we move on. pass this to mark the lesson done, or skip and keep moving.
Final footage 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 |
|---|---|---|
| Veo 3.1 Lite (720p+audio) | ai_flavored | 0.05 |
| Runway gen4_turbo I2V | ai_flavored | 0.05 |
| Omni 1.1 Flash (720p) | client_grade | 0.10 |
| Veo 3.1 Fast (720p+audio) | client_grade | 0.10 |
| Runway gen4.5 | client_grade | 0.12 |
| Veo 3.1 Standard (audio) | premium | 0.40 |
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:
$3 + ai_flavored + 1.0x -> Veo 3.1 Lite (720p+audio)
$8 + ai_flavored + 2.5x -> Veo 3.1 Lite (720p+audio)
$6 + client_grade + 1.0x -> Omni 1.1 Flash (720p)
$24 + premium + 1.0x -> Veo 3.1 Standard (audio)
$2 + client_grade + 1.0x -> NO MATCH