AI Spend LedgerCalculatorGuidesMethodologyAbout

Prompt Caching Explained: How Much Can You Save?

Updated November 4, 2026

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:

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:

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

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

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.

Check the source: official pricing pages: Anthropic · OpenAI · Google Gemini · xAI · Mistral · DeepSeek · Amazon Bedrock · Cohere. See our methodology.

Free tool: compare 34 LLM models in the API cost calculator.
Track spend by team and project: the AI Spend Tracker spreadsheet is launching soon.