Skip to content
rareconnections

How Much Does Prompt Caching Actually Save?

Prompt caching is sold as 90% off. Here's what it takes off a real bill for chatbots, coding agents, and documents on Claude, OpenAI, Gemini, and DeepSeek.

By Matt
Updated
First published
On this page

Prompt caching saves 66% to 70% of the whole bill on a typical chatbot conversation and 83% to 87% on a coding agent with Claude or OpenAI models. That's a big saving, but it isn't the 90% to 95% on the price list.

The headline discount only applies to input tokens that repeat. Output tokens are never discounted, new input is full price, and Claude and OpenAI charge extra the first time a prompt goes into the cache. I build AI chatbots and agents for a living, and caching is the first thing I turn on, so I worked out what it takes off a real bill on each provider, using prices from their own pricing pages.

How much does prompt caching actually save?

Prompt caching saves about two-thirds of the bill on a chatbot conversation and about 85% on a coding agent or a long document you ask lots of questions about. It costs more on a prompt that's only sent once. Here's the saving on the whole bill, input and output together, for four common jobs:

JobInput tokens read from the cacheSaved with Claude or OpenAISaved across all nine models
A 10-message chatbot conversation88%66% to 70%60% to 77%
A 40-step coding agent96%83% to 87%71% to 92%
20 questions about one long document95%82% to 86%70% to 91%
A prompt sent once and never reused0%Costs 19% moreNo change

Each job is priced on nine models from Anthropic, OpenAI, Google, xAI, and DeepSeek, with every request sent before the cache expires:

  • The chatbot conversation has 5,000 tokens of instructions and product info, then 10 customer messages of 60 tokens and 10 replies of 200 tokens. The whole chat is sent again with every message.
  • The coding agent starts with 30,000 tokens of instructions, tools, and code. Each of its 40 steps adds 2,000 tokens and writes 500.
  • The long document is 50,000 tokens, with 20 separate questions of 100 tokens and answers of 300 tokens.

To price your own numbers, my LLM cost calculator has a setting for how much of your prompt is cached.

How much does prompt caching save on each model?

DeepSeek V4.1 Flash saves the most with prompt caching, 77% on a chatbot conversation and 92% on a coding agent, because its cached input costs 98% less and it doesn't charge for cache writes. Grok 4.7 saves the least, at 60% and 71%. Here's the saving on the whole bill for all nine models:

ModelInput per 1M tokensCached input per 1M tokensChatbot conversationCoding agentLong document
Claude Haiku 5.5$0.10$0.01 (90% off)66%83%82%
Claude Sonnet 5.5$2.00$0.10 (95% off)70%87%86%
Claude Opus 5.5$4.00$0.20 (95% off)70%87%86%
GPT-6 Luna$0.10$0.01 (90% off)66%83%82%
GPT-6.1 Terra$1.00$0.05 (95% off)70%87%86%
GPT-6.1 Sol$2.00$0.10 (95% off)70%87%86%
Gemini 3.8 Flash$0.75$0.075 (90% off)68%83%83%
Grok 4.7$2.00$0.50 (75% off)60%71%70%
DeepSeek V4.1 Flash$0.30$0.006 (98% off)77%92%91%

In dollars, the 40-step coding agent costs $5.72 on Claude Sonnet 5.5 without prompt caching and $0.74 with it. On Claude Opus 5.5, it drops from $11.44 to $1.47. One chatbot conversation on Claude Sonnet 5.5 drops from 14.5 cents to 4.4 cents, which is $1,446 against $440 over 10,000 conversations.

The models with a 95% discount don't save much more than the ones with 90%. The cache write and the output tokens matter more than the last five points of discount. For the full prices, here are the cheapest LLM APIs compared.

Which AI providers support prompt caching?

Anthropic, OpenAI, Google, xAI, DeepSeek, Fireworks AI, Amazon Bedrock, and OpenRouter all support prompt caching, and so do Mistral, Alibaba, and Groq. The discount on cached input runs from 50% to 98%, and only Anthropic and OpenAI charge extra to write to the cache. Here's how eight providers compare:

ProviderCached input discountCost to write to the cacheShortest prompt it cachesHow to turn it on
Anthropic (Claude)90% off, or 95% off on Sonnet 5.5 and Opus 5.51.25x the input price for 5 minutes, 2x for 1 hour512 tokensAdd one cache_control field
OpenAI90% off, or 95% off on GPT-6.1 Sol and Terra1.25x the input price for 30 minutes, 2.5x for 12 hours1,024 tokensOn by default
Google (Gemini)90% offNo extra charge4,096 tokensOn by default
xAI (Grok)75% off on Grok 4.7, 84% off on Grok 4.3No extra chargeNot listedOn by default
DeepSeek98% off on DeepSeek V4.1 FlashNo extra chargeNot listedOn by default
Fireworks AI50% off by default, varies by modelNo extra chargeNot listedOn by default
Amazon BedrockSet per modelSet per model, for 5 minutes or 1 hour512 to 4,096 tokens, by modelAdd cache checkpoints
OpenRouterThe provider's own discountThe provider's own priceThe provider's own minimumAutomatic on most models

A few details from each provider's own docs are worth knowing:

  • Claude: the cache lasts 5 minutes and the timer restarts for free every time it's read. Cache reads cost 97.5% less on Claude Fable 5.1 and 5.2. The 512-token minimum is for the current models, and older Claude models need 1,024 to 4,096 tokens.
  • OpenAI: caching is on by default, so GPT-5.6 and later models charge the 1.25x cache write on any prompt of 1,024 tokens or more, even one that's never sent again. Older OpenAI models don't charge for cache writes.
  • Gemini: Gemini 4 models only cache automatically. Some Gemini 3 models can also store a cache on purpose, for a storage fee per hour. On Gemini 4, a follow-up request has to add at least 2,050 tokens for the whole previous request to be cached.
  • DeepSeek: the cache is "best-effort", so a hit isn't guaranteed, and unused caches are cleared within a few hours to a few days.
  • Fireworks AI: cached prompts usually stay for at least several minutes, and up to several hours.
  • OpenRouter: it keeps sending a conversation to the same provider so the cache gets hit, and that "sticky" routing lasts 60 minutes after the last request.

Does prompt caching really save 90%?

No. Prompt caching takes 90% off the price of cached input tokens on most models, but a prompt has to be reused about 100 times before the saving on those tokens gets close to 90%, and the rest of the bill isn't discounted at all. Three things eat into the headline number:

  1. The first send costs more. Claude and OpenAI charge 1.25 times the normal input price to write a prompt to the cache.
  2. Output is full price. Output tokens usually cost five times as much as input tokens, and no provider discounts them for caching.
  3. New input is full price. Every new message, tool result, or question is fresh input, and on Claude and OpenAI it's written to the cache at 1.25x so the next request can reuse it.

Here's the saving on the repeated part of a prompt, by how many times it's sent before the cache expires:

Times the prompt is sent90% discount, 1.25x write (Claude Haiku 5.5, GPT-6 Luna)95% discount, 1.25x write (Claude Sonnet 5.5, GPT-6.1 Terra)90% discount, free write (Gemini)
OnceCosts 25% moreCosts 25% moreNo change
Twice32.5%35%45%
3 times51.7%55%60%
5 times67%71%72%
10 times78.5%83%81%
25 times85.4%90.2%86.4%
100 times88.8%93.8%89.1%

OpenAI's own docs give the same sums: one write and nine reads cost 2.15 times the price of sending the prompt once, against 10 times without caching. That's a 78.5% saving.

When does prompt caching cost more?

Prompt caching costs more when a prompt is written to the cache and never read again. On Claude and OpenAI, that's 25% extra on the input, or about 19% extra on a request with 5,000 input tokens and 300 output tokens. It happens in four ways:

  • One-off prompts. A prompt that's sent once pays for a cache write and gets nothing back.
  • Gaps longer than the cache lasts. If a prompt is used every 10 minutes and Claude's cache lasts 5, every request is a new write at 1.25x.
  • Something changes near the top. The cache only matches from the first token. A date, a customer name, or a shuffled tool list at the start of the prompt means nothing after it can be reused.
  • A setting changes. On Claude, switching between fast and standard speed throws the cache away.

Prompts under the minimum length aren't cached at all, so they cost the normal price. Gemini, Grok, DeepSeek, and Fireworks AI don't charge for cache writes, so caching never costs extra there.

With Claude, you choose what gets cached, so leave caching off for one-off jobs. OpenAI caches by default. To stop paying for writes on a one-off job, set prompt_cache_options.mode to explicit and don't add any breakpoints.

Is a 1-hour or 12-hour prompt cache worth it?

A longer cache is worth it when your requests are more than a few minutes apart but still come at least three times within the longer window. It costs more to write, so it pays for itself on the third send, not the second:

CacheCost to writePays for itself onSaved after 10 sends
Claude, 5 minutes1.25xThe 2nd send78.5%
Claude, 1 hour2xThe 3rd send71%
OpenAI, 30 minutes1.25xThe 2nd send78.5%
OpenAI, 12 hours2.5xThe 3rd send66%

The 10-send savings are for a model with a 90% discount on cached input. A customer who replies every few minutes is fine on the short cache, because every read restarts the timer. A support bot that gets a question every 20 minutes loses Claude's 5-minute cache every time, and that's where the 1-hour cache at 2x earns its price.

How to save more with prompt caching

To save more with prompt caching, put everything that stays the same at the start of the prompt and everything that changes at the end. Here's what makes the biggest difference:

  1. Order the prompt by how often each part changes. Instructions and tools go first, then reference material like product info, then the conversation, then the new message.
  2. Keep dates and names out of the top. One changing word at the start means the whole prompt is processed again at full price.
  3. Don't cut the chat history to save money. Cached history costs a tenth of the price or less, and a bot that remembers the whole chat sells better than one that forgets what the customer said three messages ago.
  4. Check the numbers in the response. Claude reports cache_read_input_tokens, OpenAI reports cached_tokens, and DeepSeek reports prompt_cache_hit_tokens. If they're zero, the cache isn't being hit.
  5. Get the prompt over the minimum. A 400-token prompt can't be cached on any of the big three. Gemini needs 4,096 tokens, so short prompts never get its discount.
  6. Stack it with the batch discount. Anthropic applies the cache discount on top of its 50% batch discount for jobs that can wait.

Caching is one of several ways to cut the bill. The rest are in my guide to the cheapest LLM APIs, and if you'd rather pay nothing per token, here's how to run an LLM locally.

How does prompt caching reduce inference costs?

Prompt caching reduces inference costs by letting the provider skip work it has already done. When a model reads a prompt, it processes every token in order, and that processing is most of what input tokens cost. With caching, the provider stores the result for the start of your prompt.

When the next request starts with exactly the same text, the model picks up from the stored result and only processes what's new. The provider uses less computing power, so it charges less for those tokens: 50% to 98% less, depending on the provider.

Nothing about the answer is cached. The model still writes every reply from scratch, which is why output tokens stay full price and why the same prompt can still give a different answer each time.

Does prompt caching reduce latency?

Yes. Prompt caching reduces latency because a cached prompt skips most of the input processing, so the reply starts sooner. The longer the cached part, the bigger the difference.

Anthropic says you generally see a faster first token on long documents, and OpenAI lists less time spent processing input as one of the three benefits. OpenAI adds that a cache read gets the lower price even when it doesn't come back faster.

What is prompt caching?

Prompt caching is a feature of LLM APIs that stores the start of a prompt after it's first sent, so later requests that begin with the same text are cheaper and faster. The stored part is usually the instructions, tools, documents, and earlier messages that get sent again with every request.

It matters because LLM APIs don't remember anything between requests. A chatbot sends its full instructions and the whole conversation with every message, and a coding agent sends your code again on every step. Without caching, you pay full price for the same tokens over and over. If you're new to how these models read text, my guide to natural language processing covers the basics.

Questions people ask

Frequently asked questions

How much does prompt caching actually save?

Prompt caching saves 66% to 70% of the whole bill on a typical 10-message chatbot conversation and 83% to 87% on a 40-step coding agent with Claude or OpenAI models. That's less than the 90% to 95% discount on the price list, because the discount only applies to input tokens that repeat, and output tokens are never discounted.

Does prompt caching really save 90%?

No. Cached input tokens cost 90% less on most models, but the first time a prompt is sent, Claude and OpenAI charge 25% more to write it to the cache. A prompt sent twice saves 32.5% on those tokens, 10 times saves 78.5%, and 100 times saves 88.8%. New input and output tokens are still full price.

How does prompt caching reduce inference costs?

Prompt caching reduces inference costs by letting the provider skip work. The model's processing of the start of your prompt is stored after the first request, so later requests that begin with the same text reuse it. The provider spends less computing power on those tokens and charges 50% to 98% less for them.

Which AI providers support prompt caching?

Anthropic (Claude), OpenAI, Google (Gemini), xAI (Grok), DeepSeek, Mistral, Alibaba, Fireworks AI, Groq, Amazon Bedrock, and OpenRouter all support prompt caching. OpenAI, Gemini, Grok, DeepSeek, and Fireworks AI cache automatically. Claude needs one extra field in the request.

Does Fireworks AI support prompt caching?

Yes. Prompt caching is on by default for every Fireworks AI model. On its serverless models, cached prompt tokens cost 50% less by default, and the exact discount varies by model. On dedicated deployments, cached tokens are close to free because you pay for the hardware, not the tokens.

Does OpenRouter support prompt caching?

Yes. OpenRouter passes on each provider's own cache prices and sends your follow-up requests to the same provider, so the cache gets hit. Most models cache automatically through OpenRouter. Claude and Alibaba models need a cache_control field in the request.

Does prompt caching reduce latency?

Yes. A cached prompt skips most of the input processing, so the reply starts sooner. Anthropic says you generally see a faster first token on long documents, and OpenAI lists less time spent processing input as one of the three benefits of prompt caching.

When does prompt caching cost more?

Prompt caching costs more when a prompt is written to the cache and never read again. Claude and OpenAI charge 1.25 times the normal input price for a cache write, so a prompt that's sent once, or sent again after the cache has expired, costs 25% more on input, which is about 19% more on the whole request.

Keep reading