Same prompt, different bill: the three accounting bases for tokens
Here is how the budget spreadsheet is built: about 20K input tokens and 500 output tokens per request, 1,000 requests a day, at $2 per million input and $10 per million output — that is $45. The invoice arrives at about $10. Or the other way around: you turned on caching expecting a 10× drop and got 30%.
Both directions are wrong for the same reason. This article answers one question: which bases does a request's cost actually follow? Three of them — how tokens are counted, how many price tiers input has, and how many price tiers output has.
Basis 1: tokens are not characters, and Chinese is not double
Start with a widely repeated claim. Using tiktoken 0.14.0 with the o200k_base encoding, I ran three paired sets of equivalent Chinese and English text (a deployment note, a product requirement, a support reply). The sample: 205 Chinese characters and 131 English words.
| Sample | Size | Tokens | Conversion |
|---|---|---|---|
| Chinese, 3 passages | 205 characters | 157 | 1,000 characters ≈ 766 tokens |
| English, 3 passages (equivalent) | 131 words | 149 | 1,000 English words ≈ 1,137 tokens |
| Paired comparison | — | 157 vs 149 | about 5% apart |
Two conclusions. First, equivalent content costs almost the same in either language — "Chinese is twice as expensive" does not hold on this sample. Second, estimating from characters or words both drift: 1,000 Chinese characters are about 766 tokens, so a "1 character = 1 token" estimate overshoots by 30%; 1,000 English words are about 1,137 tokens, so "1 word = 1 token" undershoots by more than 10%.
Stated basis: three samples, one tokenizer, natural language only, small sample — this shows direction, not calibration. Code, numbers, proper nouns and tables deviate noticeably from that ratio. Trust your own request logs for the real bill.
Basis 2: input has three prices, not one
This is the main source of invoice divergence. The same input tokens may be billed at full price, at the cache-read price or at the cache-write price — a 10–20× spread. Table compiled from official pricing docs fetched on 2026-11-27, in USD per million tokens:
| Line item | GPT-6.2 Sol | GPT-6.2 Astra | Claude Opus 4.7 | Claude Sonnet 4.6 |
|---|---|---|---|---|
| Uncached input | $2 | $8 | $5 | $3 |
| Cache read | $0.10 (0.05×) | $0.40 (0.05×) | $0.50 (0.1×) | $0.30 (0.1×) |
| Cache write (short TTL) | $2.50 (1.25×) | $10 (1.25×) | $6.25 (1.25×) | $3.75 (1.25×) |
| Output | $10 | $40 | $25 | $15 |
Details that are easy to miss:
- OpenAI caching is on by default — no switch to flip. The read price is 0.05× for Astra, Sol, GPT-6.1 Sol and GPT-6.1 Terra, and 0.1× for other models. Write fees apply only from GPT-5.6 onward (1.25× for the 30-minute TTL, 2.5× for the 12-hour Responses API TTL); older models pay no write fee.
- Anthropic's tiers map cleanly: 5-minute write 1.25×, 1-hour write 2×, read 0.1×.
- Both sides have a minimum cacheable length: OpenAI from GPT-5.6 onward requires 1,024 visible input tokens (hidden system content does not count); Anthropic requires 4,096 tokens for Opus 4.7 / 4.6 / 4.5 and Haiku 4.5, and 1,024 for Sonnet 4.6 / 4.5 / 4.1 / 4. Below the threshold nothing is cached, silently, with no error — you believe caching is on while not a single hit ever happens.
Basis 3: output is always full price, and it becomes the main line once caching works
Run the budget scenario again: GPT-6.2 Sol, fixed 20,000-token prefix (system prompt plus knowledge base), 200 new input tokens and 500 output tokens per request, 1,000 requests a day, 30-minute TTL, roughly 48 writes a day:
| No cache | All hits | |
|---|---|---|
| Input | $40.40 | read $1.90 + write $2.40 + uncached $0.40 = $4.70 |
| Output | $5.00 | $5.00 |
| Total | $45.40 | $9.70 |
| Output share | 11% | 52% |
That is a 79% saving. But if the hit rate is only 90% (long-tail requests, expired cache, routing to another machine), input becomes read $1.80 + miss $4.00 + write $2.40 + new input $0.40 = $13.60. The extra four dollars all come from the 10% that missed; dropping from 100% to 90% hit rate raises cost by 40%.
More notable is output moving from 11% to 52%. Once input is cheap, the money is in output — max_tokens, output structure (JSON rather than long prose), and stopping the model from restating the source become the real levers. If output was short to begin with, caching stays the main lever.
The three most common leaks
- Reusable instructions in the wrong place. OpenAI states explicitly that from GPT-6.2 onward the top-level
instructionsfield is appended afterinput, outside all cache breakpoints, so those tokens are billed at the uncached price even on a cache hit. Reusable instructions belong in the firstdevelopermessage insideinput. - Estimating from the wrong usage field. Anthropic's
input_tokenscounts only content after the last cache breakpoint. Total input =cache_read_input_tokens+cache_creation_input_tokens+input_tokens. Readinginput_tokensalone systematically underestimates. - The cache is not global. OpenAI's cache lives on a single machine, is not shared across organizations or regions, and traffic above 15 requests per minute may be spilled to a machine that lacks the entry. Anthropic looks back only 20 blocks for a hit, so a breakpoint placed on content that changes every turn (a timestamp, the current user message) means rewriting at full price each round and never reading a hit.
Closing
Budget a request as four columns — uncached input, cache read, cache write, output — each multiplied by its own price, then blended by hit rate. A number produced from "input × price + output × price" will never match the real invoice.