Prompt caching explained: how it cuts API bills, provider by provider
Prompt caching charges 2% to 25% of the normal input price for repeated prompt text. How it works, what each provider charges, and when cache writes pay off.

Prompt caching lets an API provider reuse the start of a prompt it has already processed, and charge much less for it: between 2% and 25% of the normal input price, depending on the provider and model. For apps that send the same long instructions, documents or chat history again and again, it is often the largest saving available after choosing a cheaper model.
How it works
Many requests begin with the same text: a long system prompt, a set of tool definitions, a reference document, or the earlier turns of a conversation. The model has to process all of it before it can answer. With caching, the provider keeps the processed form of that shared beginning for a while. When a new request starts with exactly the same text, that part is read from the cache and billed at the cached rate; only the new part at the end is billed at the full input price.
Two rules follow from this. The cached part must be an exact, identical prefix, so put the stable content first and the changing content last. And the cache expires, so it pays off for traffic that repeats within minutes or an hour, not for one-off requests.
What each provider charges for cached input
| Model | Input | Cached input | Cached as share of input |
|---|---|---|---|
| Claude Fable 5.1 | $10.00 | $0.25 | 2.5% |
| Claude Opus 5.5 | $4.00 | $0.20 | 5% |
| Claude Sonnet 5.5 | $2.00 | $0.10 | 5% |
| GPT-6 Astra | $10.00 | $1.00 | 10% |
| GPT-6.1 Sol | $2.00 | $0.10 | 5% |
| GPT-6 Luna | $0.10 | $0.01 | 10% |
| Gemini 4 Argon | $2.00 | $0.10 | 5%, plus storage |
| Gemini 3.8 Flash | $0.75 | $0.075 | 10%, plus storage |
| DeepSeek-V4-Pro (peak) | $1.32 | $0.044 | 3.3% |
| DeepSeek-V4.1-Flash (peak) | $0.30 | $0.006 | 2% |
| Grok 4.7 | $2.00 | $0.50 | 25% |
| Grok 4.3 | $1.25 | $0.20 | 16% |
Prices per million tokens, standard tier. Mistral lists a cached price for Mistral Large 4 ($0.14 against $1.36) but none for Medium 3.5 or Small 4.
Cache writes: Anthropic’s extra step
Anthropic charges for putting text into the cache as well as for reading it. For Sonnet 5.5, a write that lasts 5 minutes costs $2.50 per million tokens, 1.25 times the normal input price, and a 1-hour write costs $4, twice the input price. Opus 5.5 and Fable 5.1 follow the same ratios. Google adds a storage charge for context caching on Gemini.
The write premium is easy to recover. With a 5-minute cache on Sonnet 5.5, the first request costs 25% more than without caching, and every later request that hits the cache saves 95% of that part of the prompt. One hit pays back the premium almost four times over. A 1-hour cache costs an extra 100% up front, so it pays off from the second hit. If your prompt is reused even twice within the window, caching saves money.
A worked example
A coding assistant sends 40,000 tokens per request: 28,000 tokens of instructions, tool definitions and project files that stay the same, and 12,000 tokens of new conversation. It writes 2,000 tokens back. On Claude Sonnet 5.5, 3,000 requests a month:
- Without caching: 40,000 × $2 + 2,000 × $10, per million, is $0.10 a request, or $300 a month.
- With caching, every request after the first hitting the cache: 12,000 × $2 + 28,000 × $0.10 + 2,000 × $10, per million, is about $0.047 a request, or about $140 a month, plus the cost of cache writes whenever the cache expires.
Caching more than halves the bill here, because 70% of each prompt is repeated text. Set the cache share in the API cost calculator to see the effect on any model.
How to get more cache hits
- Put what never changes at the top: system prompt, tool definitions, reference documents.
- Keep that block byte-for-byte identical. A timestamp or a user name inside it breaks the match.
- Add new content at the end of the prompt, so the shared prefix stays as long as possible.
- Match the cache lifetime to your traffic: short caches for busy apps, longer ones for requests that come minutes apart.
Sources
- Anthropic, API pricing.
- OpenAI, API pricing.
- Google, Gemini API pricing.
- DeepSeek, models and pricing.
- xAI, models and pricing.
- Mistral, Mistral Large 4.
All pages read on October 26, 2026.
Free toolWhat will 10,000 chats a month cost?Estimate my bill

