How to Read LLM API Pricing: Input, Output, Cached Tokens and Batch Discounts Explained
An LLM API bill has four parts that matter: input tokens, output tokens, cached input tokens and a batch discount. The headline price per million tokens covers only the first two. Cache and batch rules decide whether a repetitive workload costs full price or a fraction of it, and the same list price can produce very different invoices. This guide explains each line item using the vendors' own documentation, so you can estimate a bill before you commit to a model.
Key facts
- Anthropic lists prices per million tokens (MTok) in five columns: base input, 5-minute cache write, 1-hour cache write, cache hit and output. Claude Sonnet 5.5 is listed at $2 input and $10 output, checked on 10 November 2026.
- Anthropic's cache multipliers: a 5-minute cache write costs 1.25x the base input price, and a cache hit costs 0.1x on most models and 0.05x on Claude Opus 5.5 and Claude Sonnet 5.5.
- Anthropic's Batch API takes 50 percent off both input and output tokens, and the pricing page says the cache multipliers stack with the batch discount.
- OpenAI enables prompt caching by default on supported models. For GPT-5.6 and later, a prefix must reach 1,024 tokens, and cache reads cost 0.1x the ordinary input rate on most of these models.
- Anthropic states that Claude 4.7 and later models use a newer tokenizer that produces approximately 30 percent more tokens for the same text.
Input and output are priced separately
Every vendor charges one rate for the tokens you send and a higher rate for the tokens the model writes. On the Anthropic pricing page, Claude Sonnet 5.5 lists at $2 per million input tokens and $10 per million output tokens, a ratio of 1 to 5. For a chat product, output tokens often dominate the bill even though there are fewer of them, so estimate both before you compare two models.
Cached input is the biggest lever
Most production prompts start with the same material: instructions, tool definitions, reference documents. Prompt caching lets the vendor reuse the processing of that shared prefix, and it bills the reused part at a fraction of the normal input rate.
The two big vendors implement it differently. With Anthropic you mark the prefix to cache. A 5-minute write costs 1.25x the base input price, a 1-hour write costs more, and each later hit costs 0.1x on most models. Anthropic's page says a 5-minute cache pays for itself after one read. OpenAI's guide says caching is automatic on supported models: the first request writes an eligible prefix and later requests reuse the longest matching prefix. For GPT-5.6 and later, reads cost 0.1x the input rate on most models, a write costs 1.25x for the default 30-minute lifetime, and the prefix needs at least 1,024 tokens.
Both vendors give the same layout advice. Put stable content first and anything that changes, such as a timestamp or a user's name, at the end. OpenAI warns that a change before a cache breakpoint blocks reuse of everything after it.
A worked example
This is our own arithmetic from the Sonnet 5.5 list prices above, not a vendor figure. Take 10,000 requests a month. Each has a 6,000-token shared prefix, 500 tokens of new input and a 400-token answer.
- No caching: 65 million input tokens at $2 per million is $130, and 4 million output tokens at $10 per million is $40. Total $170.
- With caching, assuming every request lands inside the cache lifetime: one write of the prefix at $2.50 per million is about $0.02, 9,999 cache hits on 6,000 tokens at $0.10 per million is about $6, the new input is 5 million tokens at $2 per million, or $10, and output stays at $40. Total about $56.
The same workload costs about a third as much. Output did not change, which caps the saving: caching only touches input.
Batch pricing trades speed for 50 percent
If a task can wait, both Anthropic and OpenAI offer a batch interface at half price. Anthropic applies 50 percent to input and output tokens and says its cache multipliers stack with the discount. OpenAI describes its batch API as 50 percent cheaper than synchronous calls, with a 24-hour completion window. A companion guide on this site covers when that trade fits.
Price per token is a poor proxy for price per task
Two things can raise a bill without any change in the price table. First, tokenizers: Anthropic says its 4.7 and later models produce approximately 30 percent more tokens for the same text, so a prompt that had a fixed size before can be larger now. Second, cache multipliers differ between model families, as the 0.05x rate on Opus 5.5 and Sonnet 5.5 against 0.1x elsewhere shows. Recalculate on every model switch, using your own logged token counts.
What to do before you pick a model
- Log real input, output and cached token counts for one week of traffic.
- Split the prompt into a stable prefix and a dynamic tail, then move the stable part to the front.
- Price the workload on each candidate with its own cache and batch rules, not the headline rate.
- Mark which jobs can wait a day, and move them to batch.
- Re-read the vendor's pricing page on the day you sign. Prices and multipliers change.
For the market backdrop, see our analysis of how token prices and vendor margins are moving and of why per-seat pricing is breaking. To compare products built on these models, browse the AI tool directory or the full article archive.
Questions people ask
What is a cached token?
It is an input token from a prompt prefix the vendor has already processed and stored. A later request that starts with the same prefix reads it from the cache and pays a lower rate: 0.1x the input price on most Anthropic models and on most OpenAI models from GPT-5.6 on.
Do batch discounts and caching combine?
On Anthropic, yes: the pricing page says the cache multipliers stack with the Batch API discount. Anthropic's batch documentation adds that cache hits inside a batch are best effort, because requests run concurrently.
Why is my bill higher on a newer model at the same price?
A newer tokenizer can split the same text into more tokens. Anthropic says its 4.7 and later models produce approximately 30 percent more tokens for the same text, and the exact increase depends on the content.
Sources