What Is Prompt Caching? Cut LLM Input Costs by Up to 90%
Prompt caching lets a model reuse a previously processed prompt prefix, so repeated content costs a fraction of the normal input price and the first token arrives sooner. The trick is not a switch you flip once: it is how you order the prompt.

Key takeaways
- Prompt caching stores a processed prompt prefix so later requests can resume from it instead of recomputing the whole prompt.
- Anthropic charges 0.1x base input for cache reads, which is 90% cheaper, while cache writes cost 1.25x for the 5 minute lifetime or 2x for 1 hour.
- OpenAI enables caching by default on supported models and discounts cached input by up to 95%, with a 1,024 token minimum on GPT-5.6 and later.
- Gemini implicit caching is on by default for Gemini 2.5 and newer, but the minimum input is 2,048 to 4,096 tokens depending on the model.
- Caching only works when the prefix is identical, so put static instructions, tools and examples first and changing user content last.
Prompt caching stores the processed state of a prompt prefix so a later request can resume from it instead of recomputing the whole thing (Anthropic). If your product sends a long system prompt, a tool list and fixed examples on every call, you are paying to process the same tokens again and again.
TL;DR
- Prompt caching reuses a prompt prefix that the model has already processed.
- Anthropic cache reads cost 0.1x base input, a 90% saving, but writes cost 1.25x or 2x depending on lifetime.
- OpenAI turns caching on by default and discounts cached input by up to 95%, with a 1,024 token minimum on GPT-5.6 and later.
- Gemini implicit caching is on by default for Gemini 2.5 and newer, with minimum inputs of 2,048 to 4,096 tokens.
- Order the prompt so static content comes first and changing user content comes last.
Disclosure: ZeroRaised publishes this analysis and is a launch site for bootstrapped products. Facts come from the linked sources as checked on 31 Oct 2026; ZeroRaised has no commercial relationship with the companies named.
Prompt caching is a model feature that reuses a previously processed prompt prefix, so repeated input costs less and is processed faster.
How does prefix caching work?#
The unit of reuse is the prefix. A provider can cache the beginning of a prompt and skip reprocessing it when a later request starts with exactly the same content. That is why prompt order matters more than any single setting.
Anthropic offers two routes: automatic caching through a single top-level cache_control field, or explicit cache_control markers on individual blocks (Anthropic). The default cache lifetime is 5 minutes, with a 1 hour option. OpenAI says caching is enabled by default for supported models and that it also reduces the time before the response starts (OpenAI). Gemini calls the feature context caching, and its implicit mode is enabled by default for Gemini 2.5 and newer with no configuration (Gemini API).
The practical consequence is the same everywhere: a stable prefix is an asset. A prefix that changes on every call is not.
What are the rules for Anthropic, OpenAI and Gemini?#
The details differ enough that copying advice from one provider to another will cost you money.
Anthropic. Cache writes cost 1.25x the base input price for the 5 minute lifetime, or 2x for 1 hour. Cache reads cost 0.1x base input, with lower exceptions: 0.05x on Claude Opus 5.5 and Sonnet 5.5, and 0.025x on Claude Fable 5.1 and Mythos 5.1. The minimum cacheable prompt is 512 tokens for current models including Opus 5.5, Sonnet 5.5 and Haiku 5.5, while older models have higher minimums (Anthropic).
OpenAI. Cached input tokens are discounted by up to 95%. The minimum cacheable prompt is 1,024 tokens for GPT-5.6 and later. Responses report cached_tokens in usage, and a prompt_cache_key can group requests that share a prefix. For GPT-5.6 and later, prompt_cache_options.ttl is "30m" by default, with cache writes at 1.25x the uncached input rate, or "12h" at 2.5x (OpenAI).
Gemini. Implicit caching passes savings on automatically. The minimum input is 4,096 tokens for Gemini 4 Argon, 3.8 Flash, 3.6 Flash and 3.1 Pro Preview, and 2,048 tokens for Gemini 2.5 Flash and Pro. Put large common content at the start and send similar-prefix requests close together. Cache hits are reported in usage.total_cached_tokens. Explicit caching is not supported in the Interactions API or for Gemini 4 Argon and onward (Gemini API).
What does the saving look like in practice?#
Take a simple case. Claude Haiku 5.5 charges $0.10 per million input tokens and $0.01 per million cache read tokens (Anthropic). Every million input tokens served from cache costs $0.01 instead of $0.10, a 90% reduction. At 10 million cached prefix tokens a month, that is $0.10 instead of $1.00, before the extra cost of the cache writes.
Do not forget the write cost. The first request pays a premium, 1.25x or 2x, and that only pays back if the prefix is reused before it expires. A prefix used once is a loss; one used on every request is margin.
There is also a floor. A prompt below the provider minimum, such as 512 tokens on Anthropic, will never form a cache, so check the threshold before redesigning anything.
How should you structure a prompt for cache hits?#
Put the stable parts first and the changing parts last. This is the same advice from all three providers, and it is the whole game.
- System instructions and policy text at the top. These rarely change between requests.
- Tool definitions and schemas next. They are long and stable, which makes them good cache material.
- Few-shot examples and reference documents after that. Keep them byte-identical between calls.
- The user message and per-request data last. This is the part that should vary.
Then remove the small things that quietly break the prefix: timestamps, request ids, session tokens, user names and dynamic feature flags near the top. If any of those sit above your long static block, every request is a cache miss. Send similar requests close together so they land inside the lifetime.
How do you check that caching is working?#
Start with the usage data. OpenAI reports cached_tokens and Gemini reports usage.total_cached_tokens, so you can log the share of input tokens that came from cache (OpenAI, Gemini API). For Anthropic, the pricing splits writes from reads, so compare your read line against your base input line (Anthropic).
Then track cost per task, not per token. A 90% saving on a 200 token prompt is noise. A hit on a 20,000 token prompt that runs on every request is a real change in gross margin. The LLM cost guide covers the wider levers, and the LLM API comparison helps you weigh price against cache behaviour.
What this means for bootstrapped founders#
Caching is one of the few AI cost levers that does not require giving up quality. You are paying less for work the provider has already done.
Treat it as a margin decision. If your product has a long, stable prompt and steady volume, design for caching from the start. If prompts are short or volume is low, spend your time elsewhere.
Two cautions. Do not let a cache-friendly structure make the prompt worse for the model. And do not assume a cache hit: log it after every prompt change, because one new timestamp at the top can reset your hit rate to zero. The AI pricing guide and the guide to adding AI features to a SaaS cover how these unit costs turn into pricing decisions.
Where ZeroRaised fits#
ZeroRaised is a launch and discovery site for products built without institutional venture capital or accelerator equity. If you have a product people can try, submit it here; the pricing page explains the current options.
For more practical analysis, join the ZeroRaised newsletter. No promises of traffic or results, just the useful parts.
Sources#
Frequently asked questions
What is prompt caching in simple terms?
It is a way to reuse work the model has already done. If many requests start with the same long block of text, the provider can store the processed version of that block and start later requests from it. You pay less for the repeated input and the response begins sooner.
Does prompt caching change the model's answer?
It should not. Caching is an optimisation of the input processing, not a different model. The provider reuses a prefix that matches exactly, then processes the rest of the prompt normally. If the prefix changes by even a little, the cache does not apply to the new version.
Why is my cache hit rate zero?
The usual causes are a changing value near the top of the prompt, such as a timestamp, session id or user name, and prompts that fall below the provider's minimum cacheable length. Another cause is sending similar requests far apart, after the cache lifetime has expired.
Is prompt caching the same as context caching in Gemini?
Gemini uses the term context caching for the same broad idea. Its implicit caching is enabled by default for Gemini 2.5 and newer and passes savings on automatically, while explicit caching gives you a cache object you manage yourself. Explicit caching is not supported in the Interactions API or for Gemini 4 Argon and onward.
How much can caching actually save?
On Anthropic, cache reads cost 0.1x the base input price, which is 90% off, and OpenAI discounts cached input by up to 95%. The saving applies only to the cached part of the prompt and only when it is reused. A one-off long prompt with no repeat visits saves nothing.