DEV Community

DevToolsmith
DevToolsmith

Posted on • Originally published at aistackpicker.xyz

Your LLM bill is a routing problem: the July 2026 token-cost math

Your LLM bill is not a pricing problem, it's a routing problem. At prices read from official vendor pages in July 2026, "GPT-4-class" output tokens span two orders of magnitude — from $0.28 per million (DeepSeek V4-Flash) to $50 per million (Claude Fable 5). If every call in your app hits the same frontier model, you are paying frontier prices for work a $0.40 model clears just fine.

Here is the math I wish more teams ran before their first invoice.

The July 2026 price spread (USD per 1M tokens, standard tier)

Model Input Output
DeepSeek V4-Flash $0.14 ($0.0028 cache hit) $0.28
Gemini 2.5 Flash-Lite $0.10 $0.40
gpt-oss-120B (hosted) $0.15 $0.60
Llama 3.3 70B (Groq) $0.59 $0.79
GPT-5.4-nano $0.20 $1.25
GPT-5.4-mini $0.75 $4.50
Claude Haiku 4.5 $1.00 $5.00
Claude Sonnet 5 (intro to Aug 31) $2.00 $10.00
GPT-5.4 $2.50 $15.00
Claude Opus 4.8 $5.00 $25.00
GPT-5.5 $5.00 $30.00
Claude Fable 5 $10.00 $50.00

(Prices verified on official vendor pricing pages, 7 July 2026. Full table with provider links and quarterly refresh here.)

One caveat before you screenshot this: tokenizers differ. Anthropic notes its newest models tokenize roughly 30% more tokens for the same text than earlier ones. The honest unit is cost per task, not per token — use the table as a first-pass filter, then measure your own workload.

The three discounts that reorder the whole table

1. Prompt caching. DeepSeek's cache-hit input rate on V4-Flash is $0.0028/MTok — effectively free context reuse. Anthropic bills cache reads at 0.1× base input. Any chat or agent workload that resends a large system prompt on every call should be cache-optimized before you even think about switching models. This is routinely a 5-10× saving on input costs and it requires zero quality trade-off.

2. Batch APIs. OpenAI, Anthropic and Google all list 50% off for asynchronous batch processing. If your pipeline is offline — summarization backfills, classification runs, embeddings prep — and you are paying standard rates, you are donating half your budget.

3. Time-boxed pricing. Claude Sonnet 5 runs $2/$10 through August 31, 2026, then moves to $3/$15. In this market, budgets need date stamps.

Routing: the only lever that scales

The pattern that actually cuts bills in production is boring:

  1. Classify calls by required capability, not by habit. In most products, 80-90% of calls are mechanical: extraction, reformatting, classification, short summaries. A $0.28-$1.25 output tier clears them.
  2. Route the residual 10-20% — multi-step reasoning, tricky synthesis, customer-visible long-form — to a frontier model.
  3. Put caching and batch on by default, and treat any standard-rate offline job as a bug.

A worked example: 10,000 summaries at ~1,000 input + 300 output tokens each is ~13M tokens. On DeepSeek V4-Flash that's about $2.24. On a $5/$25 frontier model, the same batch is ~$140 — before the batch discount you probably forgot to enable. Same workload, ~60× spread, and for summarization the quality delta is often invisible in evals.

None of this requires a platform migration. Most teams get there with a thin router function and two model clients.

Run the numbers on your own shape

Per-million prices abstract away workload shape: input/output ratio, cache hit rate, batch share. If you want the cost-per-task math without building a spreadsheet, I maintain a free token cost calculator and a quarterly-refreshed price comparison with per-provider source links — no signup, just the tables.

What's your current router setup? I'm collecting real-world routing splits (what % of calls you send to frontier vs budget tiers) — drop yours in the comments.

Top comments (0)