Prompt Caching Explained: How Much Can You Save?
Prompt caching lets the provider reuse text it has already processed, such as a long system prompt or a document. You pay a much lower price for the reused part.
Typical cache prices
Per million tokens, as of November 2026:
- Claude Sonnet 5.5: cache read $0.10 (reduced from $0.20), 5-minute cache write $2.50, versus $2 normal input
- Claude Opus 5.5: cache read $0.20
- Claude Haiku 5.5: cache read $0.01 for prompts up to 100K tokens
- GPT-6 Sol: cached input $0.20, versus $2 normal input
- Grok 4.5: cached input $0.50, versus $2 normal input
When it pays off
Writing to the cache costs a little more than normal input. On Claude Sonnet that is $2.50 versus $2. Each later read saves around $1.90 per million tokens, so the extra write cost is recovered after a single reuse.
Caching works best when:
- The same long prefix appears in many requests
- Requests arrive close together, since caches expire after minutes
- The reused part is large, such as documentation or a long agent prompt
When it does not help
If every prompt is unique, or calls are hours apart, you pay the write price without reading it back.
How caching works
When you send a prompt, the provider processes every token. With caching, the provider stores the processed form of the beginning of your prompt for a short time. If a later request starts with exactly the same text, it reuses the stored work and bills that portion at a much lower rate. The key word is exactly: the match works on the prefix, so a single changed character early in the prompt breaks the cache for everything after it.
Structure your prompt for caching
- Put stable content first: instructions, tool definitions, reference documents.
- Put changing content last: the user's question, today's date, per-user details.
- Avoid timestamps or random IDs at the top of the prompt.
- Keep the order of examples and documents the same between calls.
A worked example: an agent with a large context
An agent works with a 50,000-token context and takes 20 steps. Without caching, it sends 50,000 tokens 20 times, which is 1 million input tokens, or about $2.00 on a $2 per million model. With caching on Claude Sonnet 5.5, the first step writes the cache at $2.50 per million, about $0.125. The other 19 steps read it at $0.10 per million, about $0.095 in total. The context costs about $0.22 instead of $2.00, roughly 89% less, before counting the new tokens each step adds.
Cache lifetime
Caches expire. A common default is five minutes, refreshed each time the cache is used. Some providers offer longer lifetimes at a higher write price. If your traffic is bursty, with long gaps between calls, you may pay to write the cache and never read it.
Pitfalls
- Tiny prompts: providers set a minimum size, so short prompts are not cached.
- Dynamic prefixes: anything that changes early invalidates the cache.
- Different settings: changing model, tools or system prompt creates a new cache.
- No monitoring: if you do not check cache hit rates, you will not know whether it works.
How to verify it works
API responses report how many tokens were read from or written to the cache. Log those numbers. A healthy setup shows most of the repeated prefix as cache reads after the first call.
Frequently asked questions
Is caching automatic?
It depends on the provider. Some require you to mark what to cache, while others apply it automatically to repeated prefixes. Check the documentation for your model.
Does caching change the answer?
No. It only changes how the input is processed and billed.
Is caching worth it for chatbots?
Yes when each turn resends a long system prompt and history, since that repeated prefix is exactly what gets cached. See how to calculate LLM API cost for the math.
Check your savings
Use the LLM cost calculator to see your baseline cost first. For the other big lever, see the batch API guide.
Prices checked November 4, 2026; cache rules differ by provider.
Track spend by team and project: the AI Spend Tracker spreadsheet is launching soon.