Prompt caching lets an LLM provider keep the processed form of a prompt prefix so that the next request starting with the same text skips that work, and as of September 2026 Anthropic, OpenAI and Google all bill those reused tokens at around a tenth of the normal input rate. It works because almost every request resends the same system prompt, tool definitions and conversation history. The catch is that it is a prefix cache: change one byte early in the prompt and everything after it is processed, and billed, from scratch.

How does prompt caching work?

Every request is a sequence of blocks, and the provider processes them in a fixed order. Anthropic documents that cache prefixes are created in the order tools, then system, then messages, and that on each request the system checks whether the prefix up to a breakpoint is already cached, uses it if so, and otherwise processes the full prompt and caches the prefix.

OpenAI describes the same mechanism from the other direction: prompt caching preserves that state for a reusable prefix, and when a later request has the same prefix the model reuses the saved state instead of processing those tokens again. Google's Gemini API calls the automatic version implicit caching and says it is enabled by default for all Gemini 2.5 and newer models, with savings passed on automatically when a request hits the cache.

The word to hold onto is prefix. The cache is not a lookup of paragraphs anywhere in your prompt; it is the longest identical run from the very first byte.

What does a cached token cost in September 2026?

All figures per million tokens, checked on 7 September 2026 on the official pricing pages linked in each row.

Model Base input Cache write Cache read Read as share of base
Claude Opus 5 $5 $6.25 (5 min) or $10 (1 h) $0.50 10% (Anthropic)
Claude Sonnet 5 $2 $2.50 (5 min) or $4 (1 h) $0.20 10% (Anthropic)
Claude Fable 5.1 $10 $12.50 (5 min) or $20 (1 h) $0.25 2.5% (Anthropic)
GPT-5.6 Sol $4 1.25x base on GPT-5.6 and later $0.40 10% (OpenAI)
GPT-5.5 $5 not listed separately $0.50 10% (OpenAI)
Gemini 3.1 Pro Preview $2 storage $4.50 per 1M tokens per hour $0.20 10% (Google)
Gemini 3.8 Flash $0.75 storage $0.50 per 1M tokens per hour $0.075 10% (Google)

Anthropic's multipliers are explicit: a 5 minute cache write costs 1.25 times base input, a 1 hour write costs 2 times, and a read costs 0.1 times. It also states the break-even: caching pays off after one read for the 5 minute duration and after two reads for the 1 hour duration. OpenAI's guide says that for GPT-5.6 and later, cache writes cost 1.25 times the standard input rate and subsequent reads cost 0.1 times. Google's model is different: a read is a tenth of base, but explicit caches also accrue storage billed per million tokens per hour, so a cache that sits idle costs money.

What are the minimum sizes and lifetimes?

Small prompts do not cache, and none of the providers throw an error when that happens. Anthropic's minimums are 512 tokens on Claude Opus 5 and Fable 5.1, 1,024 on Sonnet 5 and Opus 4.8, and 4,096 on Haiku 4.5 and Opus 4.6, and its documentation is blunt that requests below the minimum are processed without caching and no error is returned. OpenAI's floor is 1,024 tokens for GPT-5.6 and later and 2,048 for earlier models, rounded down to a multiple of 128. Gemini's implicit cache needs 4,096 tokens on the 3.x models and 2,048 on Gemini 2.5.

Lifetimes are short by default. Anthropic's cache lives 5 minutes and is refreshed at no extra cost each time it is used, with a paid 1 hour option, and you can place up to 4 cache breakpoints for sections that change at different rates. OpenAI's entries typically remain active for around 5 to 10 minutes of inactivity, up to one hour, with a 24 hour extended retention option. The practical rule: caching rewards steady traffic. A system prompt used once an hour on the 5 minute tier pays the write premium every time and never collects the discount.

What silently breaks the cache?

Anything that changes the prefix. The usual offenders are a timestamp or user name in the system prompt, JSON serialized in a different key order, and a tool list that varies between calls. Anthropic publishes an invalidation table showing that modifying tool definitions invalidates the entire cache, and toggling web search or citations changes the system prompt and invalidates everything after it.

You do not need to guess. Every response reports what happened. Anthropic returns cache_creation_input_tokens, cache_read_input_tokens and input_tokens, and the three add up to total input. OpenAI reports usage.input_tokens_details.cached_tokens, and Gemini reports usage.total_cached_tokens. If reads stay at zero across repeated requests, something upstream of the breakpoint is changing.

How do you structure a prompt to cache well?

Put the stable material first and the volatile material last. OpenAI's advice is one line: put stable developer instructions and shared reference material first. In practice that means tool definitions, then the system prompt, then any reference documents, then conversation history, then the current question. For chat, Anthropic's automatic caching mode moves the breakpoint forward as the conversation grows, so each turn reads the previous turns from cache.

A worked example shows the size of the win. Suppose a support assistant carries a 20,000 token knowledge base and answers 500 questions an hour on Claude Sonnet 5 at $2 base input, $2.50 five minute write and $0.20 read per million. Uncached, the knowledge base alone costs 500 × 20,000 × $2 per million, which is $20 an hour. Cached, with requests arriving inside the 5 minute window, it is one write at $0.05 plus 499 reads at $0.004 each, about $2.05 an hour. Same model, same answers, a tenth of the input bill. The systems we build at Qubba are laid out in this order from day one, because retrofitting prefix stability into a prompt that was written casually is slower than writing it correctly.

One limit is worth stating. Cached tokens are cheaper, not smaller: Anthropic notes that cached prompt prefixes still occupy the context window. Caching fixes cost, not context rot.

Frequently asked questions

Does prompt caching make responses faster as well as cheaper?

Yes.
A cache hit skips processing of the prefix, which Anthropic describes as reducing processing time and costs.
The gain is largest on long prefixes such as big system prompts and document sets, where time to first token is dominated by reading the input.

Is prompt caching automatic or do I have to enable it?

It depends on the provider.
OpenAI states that prompt caching is enabled by default for supported models, and Google's implicit caching is on by default for Gemini 2.5 and newer.
Anthropic requires a cache_control field, either at the top level of the request for automatic breakpoints or on individual blocks.

Does caching stack with batch discounts?

At Anthropic, yes.
Its pricing page says the caching multipliers stack with other pricing modifiers, including the Batch API discount, so a cached read inside a batch job is billed at the batch rate times 0.1.
Check each provider's page before assuming the same elsewhere.

What is the difference between a cache write and a cache read?

A write happens the first time a prefix is stored and is charged at a premium: 1.25 times base for 5 minutes or 2 times for 1 hour at Anthropic.
A read happens when a later request reuses that prefix and is charged at 0.1 times base.
You want many reads per write.