Chapter 1.11 of 14 in this part

What you are actually paying for

Output costs 5× input. Cache reads cost a tenth of input. Cache writes cost more than input. Three published ratios, and almost every app-layer decision follows from them.

4 min read·revised 2026-08-05

Almost every conversation about AI cost starts in the wrong place. Someone opens a pricing page, compares two dollar figures per million tokens, picks the smaller one, and calls it an optimisation. Then the bill goes up anyway, and nobody can say why.

The reason is that "per million tokens" is not one price. It is at least four, and they differ from each other by up to 50×.

Here is what a frontier vendor actually charges, from Anthropic's public pricing page on 2026-08-05:

Sonnet 5 Per million tokens Ratio to input
Input $2.00
Output $10.00
Cache write $2.50 1.25×
Cache read $0.20 0.1×

Four prices for what a newcomer would call the same thing. Everything below follows from the gaps between them.

Ratio one: output costs 5× input

This holds across the range and across vendors. Haiku 4.5 is $1 in / $5 out — the same 5×. Google's Gemini 3.1 Pro is $2 in / $12 out, a ratio. Gemini 3.5 Flash-Lite is $0.30 in / $2.50 out, 8.3×.

The direction is consistent because the cause is physical: generating a token requires streaming every active parameter out of memory, once per token, while your prompt is processed in parallel. That asymmetry is the subject of memory bandwidth is the product, and it is why no vendor will ever price the two the same.

The practical consequence: a verbose model is not slightly more expensive, it is multiples more expensive. Cutting average response length by a third takes roughly five times more off your bill than trimming your prompt by the same proportion. Most teams optimise the prompt, because the prompt is the part they wrote.

Ratio two: cache reads cost a tenth of input

$0.20 against $2.00 — a 90% discount on any prompt prefix the vendor has already seen.

That is the largest published discount anywhere in the app layer, and it applies to precisely what most applications resend on every single call: system prompts, tool definitions, few-shot examples, retrieved documents that do not change between turns.

Ratio three: cache writes cost more than input — and it still pays immediately

$2.50 to write against $2.00 to send normally: a 25% premium. This is the number that makes people hesitate, and the hesitation is misplaced. Work it out.

  • Write once, read once: $2.50 + $0.20 = $2.70
  • Send the same thing twice, uncached: $2.00 + $2.00 = $4.00

Caching is already cheaper on the first reuse. You do not need a busy endpoint to justify it — the break-even lands at 0.28 reads, which is to say there isn't one. Every reuse after that costs a tenth of the alternative.

The real trap is not the write premium. It is that caching keys on an exact prefix match, so anything varying early in the prompt — a timestamp, a user ID, a session token sitting above the system prompt — silently voids the whole thing. You keep paying the 25% write premium and never collect the 90% discount. Nothing in your code looks wrong. It is visible only in the bill, which is why reading your first bill comes before optimising anything.

The fourth thing you pay for: time

Two published numbers make this concrete, and both are easy to miss.

Anthropic's $2/$10 is introductory pricing. The page states it runs through 31 August 2026, reverting to $3/$15 after — a 50% increase, on a specific date, about four weeks from this writing. A unit-cost model built on $2/$10 breaks on 1 September.

Google charges double for long context. Gemini 3.1 Pro is $2/$12 up to 200K input tokens and $4/$18 above it. A context window is not a flat-rate container; crossing the threshold reprices every token in the request.

Prices at this layer move on weeks, and in both directions. A cost model without a refresh date is already wrong.

Before you change anything

  1. Find your input:output token ratio — tokens, not request counts. If output exceeds ~20% of token volume, output pricing dominates your bill and prompt trimming is nearly irrelevant.
  2. Check whether you get cache hits at all. Vendors report this. Cache writes with no matching reads means an unstable prefix: you are paying the premium and collecting nothing.
  3. Diarise 31 August 2026 — or whatever the equivalent date is when you read this.
  4. Know which side of 200K you sit on if you are on Gemini. The answer doubles your input rate.

The rest of Part 1 refines these numbers. If you take only one thing: output is 5×, cache reads are 0.1×. That alone gets you most of a defensible app-layer cost model, and it is two facts rather than a methodology.

Sources & methodcaptured 2026-08-05

Sources, captured 2026-08-05: Anthropic's public pricing page — Sonnet 5 at $2/$10 per million input/output with cache write $2.50 and cache read $0.20; Haiku 4.5 at $1/$5 with cache write $1.25 and read $0.10; the introductory-pricing expiry of 31 August 2026 reverting to $3/$15; and the 1.1× multiplier for US-only inference — are quoted from that page. Google figures from the Vertex AI generative-AI pricing page: Gemini 3.1 Pro Preview $2/$12 at ≤200K input tokens and $4/$18 above, Gemini 3.5 Flash $1.50/$9, Gemini 3.5 Flash-Lite $0.30/$2.50. The caching break-even arithmetic is mine, computed from those published rates. OpenAI is absent from this chapter: its pricing page renders rates client-side and carries no figures in retrievable HTML, and rather than quote a number I could not verify, I have left it out — check it against your own account. Re-verify everything here before building a model on it; this layer reprices faster than any other in this book.

Want this done on your account rather than by you?

The handbook is the method, written out in full so you can run it yourself — that is the point of publishing it. If you would rather someone else did the first pass, the teardown is free and you keep the findings either way.