Why cache-aware pricing matters
Claude Code records token counters but not cost. The tempting shortcut is to add the counters up and multiply by an input rate. On real logs that is wrong by a factor of five. The gap is not a rounding bug. It is the whole product.
The reason is prompt caching. Measured across 66 MB of local session files:
Plain input 27,978
Output 11,173,900
Cache creation 132,373,139
Cache read 2,891,133,596
Cache reads dominate everything else and are billed at a tenth of the base input rate. A spreadsheet that treats “input tokens” as one column will bill the cache-read mountain at full price and then wonder why the vendor invoice is smaller. TokensLab keeps all five token classes separate and prices each one:
- Cache read — 0.1× base input
- 5-minute write — 1.25×
- 1-hour write — 2×
Same logs, correct arithmetic: $3,123.97. Naive arithmetic: $15,680.35. The $12,556.38 in the middle is not savings you can pocket by switching models. It is the error you stop making once the rate card is applied the way Anthropic bills it.
Models missing from the rate card are reported as unpriced, never as free. The dashboard says so, and the total is labelled a lower bound. That is the same honesty as the idle-session list and the graph: if we cannot price it, we will not pretend.
If your finance spreadsheet still uses a single input multiplier, it is not conservative. It is fiction. Download TokensLab and price the files you already have.