The Practitioner's LLM Curriculum ← Week 9 · Inference Cost Calculator
Interactive · Week 9 · Section 7

Where the money actually goes.

Set the workload — model, context length, output length, traffic. The calculator computes per-request and per-year cost using real 2026 hosted-API pricing, with toggles for prompt caching and the Batch API. The visceral lesson: small changes to model choice and caching strategy produce 10-50× cost differences. The team that ships at scale isn't the team with the best model — it's the team with the best routing. Use this to project your monthly bill before you build something at 1000 RPS only to discover it costs $5M/year.

Workload

Model
Requests per second 10
10 req/s · 864k req/day · 26M req/month

Per-request shape

Input tokens 4,000
system prompt + retrieved chunks + user query
Output tokens 200
model's generated response
Cache hit ratio 0%
fraction of input that hits the cache
Per request
input + output
Per month
at current RPS
Per year
the headline number
Savings vs no-opt
vs same model, no cache, no batch

Cost breakdown · per request

cached input
uncached input
output

Same workload, all six models

cheapest highlighted · current model has accent border

What's happening here