All guides
Cost optimization

Prompt Caching Explained: How It Bills and How Much It Saves

How prompt caching works, what providers charge for cache reads and writes, typical discounts across 150 tracked models, and a worked example of savings at different cache-hit rates.

Prompt caching lets a provider reuse work it has already done on the start of your prompt and charge you much less for those tokens. For apps that resend the same instructions, tools or documents on every call, it is often the largest single saving available. It is also easy to configure so that it never hits.

Prices are per 1 million tokens, as of November 2026, from the data on this site. Provider rules change, so confirm details in your provider's documentation.

How caching works

When you send a prompt, the model processes every input token before it can start writing. If the beginning of your next prompt is identical to the previous one, that work can be skipped. The provider stores the processed state of the shared beginning, called a prefix, and reuses it. You pay a reduced price for the reused tokens, and the response usually starts sooner.

The match must be an exact prefix. The cache covers everything up to the first token that differs. If your prompt starts with a stable system prompt followed by a changing document, only the system prompt is cached. Put anything that changes early, and the whole thing after it misses.

How it is billed

Providers differ in the details, but the structure is similar:

  • Cache read. Tokens served from the cache are billed at a fraction of the normal input price. This is the number in our data.
  • Cache write. The first time a prefix is stored, some providers charge a premium over the normal input price. Anthropic, for example, has charged 1.25× the input rate to write its default short-lived cache. Other providers cache automatically and do not add a write fee, and some charge a storage fee for caches you manage explicitly. Check your provider.
  • Expiry. Cached prefixes live for a limited time, often minutes, and many providers refresh the timer when the cache is used. After expiry, the next request pays full price and rebuilds the cache.
  • Output tokens are never discounted. Caching affects only input.

Our price data lists the cache-read price. It does not capture write premiums or storage fees, so model your bill with those added where they apply.

What the discounts look like in the data

We compared each model's cached-read price to its normal input price, across the 150 non-batch models we track, as of November 25, 2026.

  • Median discount: 90%. A cached token costs about one tenth of a normal input token.
  • Middle half of models: 83% to 90%.
  • Deepest: about 99%. Xiaomi's MiMo-V2.6-Pro-UltraSpeed lists $0.036 against a normal input price of $4.35. Among the larger Western providers, Anthropic has models at 98% off (Claude Fable 5.1 and 5.2).
  • Shallowest: 0% to 50%. Two models are below 50%: Gemma 4 31B (no discount listed) and Qwen3 Coder Next (42%). Command A+ sits at exactly 50%.
  • 95 of 150 models discount cached input by 90% or more. 135 offer 80% or more.

By provider:

ProviderModelsTypical discountNotes
Anthropic1290%90% to 98%. Claude Opus 5.5 and Sonnet 5.5 list 95%; Fable 5.1 and 5.2 list 98%.
OpenAI2990%90% to 95%. GPT-6.1 Terra and Sol list 95%.
Google1890%Gemini 4 Argon, Carbon, Hydrogen and Neon list 95%. Gemma 4 31B lists no discount.
xAI675% to 85%Grok 4.6 and 4.7 list 75%.
DeepSeek774% to 98%Wide spread; V4 Pro 0423 lists 74%, while V4.1 Flash and V4.1 Flash 1017 list 98%.
Z.AI1180% to 90%

The biggest providers cluster at 90% or deeper, while smaller and open-weight models vary a lot. Don't assume a discount for a model you have not checked.

A worked example: savings at different hit rates

Take a document assistant. Each request has 6,000 input tokens: a 5,000-token fixed prefix (instructions, tools and a reference document) plus a 1,000-token user turn. Output is 500 tokens. It handles 10,000 requests a day, or 300,000 a month. Because only 5,000 of 6,000 tokens can be cached, the best case is about an 83% cache share.

Monthly bill by cache share (share of input tokens read from cache):

ModelPrice in / out / cached0%25%50%80%
Claude Sonnet 5.5$2 / $10 / $0.10$5,100$4,245$3,390$2,364
GPT-6.1 Terra$1 / $5 / $0.05$2,550$2,123$1,695$1,182
Claude Haiku 5.5$0.10 / $0.50 / $0.01$255$215$174$125
Grok 4.6$2 / $6 / $0.50$4,500$3,825$3,150$2,340

Savings for Sonnet 5.5: 17% at a 25% share, 34% at 50% and 54% at 80%. Terra is the same in percent terms. Haiku 5.5 saves slightly less in percent (51% at 80%) because its cache discount is 90%, not 95%. Grok 4.6 saves 48% at 80%, with a 75% discount.

Even at a very high cache share you do not save 90%, because the uncached part of the input and the whole output still cost full price. Each 10 points of cache share is worth about the same amount, so the first improvement you make is as valuable as the last. If your hit rate is 25% and a reordering gets you to 80%, that is worth more than switching models.

Now the write premium. Suppose a provider charges 1.25× to write the cache and 0.1× to read it. For a prefix reused N times, the cost is 1.25 + 0.1 × (N − 1) prefix-units, compared with N without caching. At N = 1 caching costs 25% more. At N = 2 it is 1.35 against 2.0. At N = 10 it is 2.15 against 10. One reuse inside the expiry window is enough to come out ahead.

Pitfalls that kill hit rates

Putting variable content first. Timestamps, user names or per-request IDs at the top of the system prompt change the prefix every call. Put them at the end.

Non-deterministic prompts. Randomly ordered few-shot examples, unsorted tool lists or dictionaries serialized in varying order all break an exact match. Keep prompts byte-identical.

Editing the middle of a long prompt. A change in the middle invalidates everything after it, so keep stable content ahead of volatile content.

Traffic that outlasts the TTL. If requests with the same prefix arrive further apart than the cache lifetime, every request is a miss and you pay write premiums for nothing. Bursty or low-volume traffic benefits less.

Prompts below the minimum length. Providers apply caching only above a minimum prefix size, commonly around a thousand tokens or more and varying by model. Short prompts are billed normally.

Assuming it is on. Some providers cache automatically. Others need you to mark the prefix. Check the usage fields in the API response, which report cached tokens, and track your actual hit rate.

Forgetting growing history. In chat, each turn is a longer prefix. That works in your favour when history is appended and old turns are never edited.

When caching helps most

  • Agents and tool loops. System instructions and tool schemas repeat on every step.
  • Document Q&A. One large document with many questions.
  • Multi-turn chat. Each turn extends the previous prefix.
  • Large few-shot prompts. Many examples at the start of every call.

It helps little for one-off, highly varied prompts and for output-heavy work, where most of the bill is output that caching can't touch. See Input vs Output Token Pricing.

How to plan around it

Measure your real shared-prefix share, then use the calculator to set a cache percentage and see the result for every model. The cache savings tool ranks models by how much they save on your workload. When you build the estimate, count caching conservatively, as described in How to Estimate LLM Costs Before You Build. For other levers, such as batch pricing and routing, see Cut LLM API Costs.

Frequently asked questions

Does prompt caching change the model's answers?

No. It reuses the stored result of processing identical input, so outputs should be the same as without caching, apart from the usual sampling variation.

Is a cache hit ever worse than no caching?

Yes, if you pay a write premium and never reuse the prefix before it expires. A prefix used exactly once costs more with caching than without on providers that charge a write fee.

How do I know if my cache is hitting?

Read the usage object in the API response. It reports how many input tokens were served from cache. If that number is zero on repeated calls, something in the prefix is changing between requests.

Can I combine caching with batch pricing?

Some providers allow it, and the batch listings in our data show cached prices halved too. Rules differ by provider, and batch jobs can take hours, so cache hits are less predictable. Check the documentation before relying on both.