Prompt caching: a narrower scope paid off more — 12 conditions measured
Caching only the system prompt was cheapest for 3 of 4 models and fastest to first token for 3 of 4, across 12 measured agent conditions.
On this page
An agent turns one question into dozens of API calls. Each of those calls resends the same system prompt, and each time you are billed again. Prompt caching reduces the cost of this repetition, but caching more did not bring bigger savings. Measurements showing that the amount of input itself degrades performance are covered in More context is not the answer. A paper measured 4 models × 3 strategies, 12 conditions in all, and the most narrowly scoped strategy had the lowest cost for 3 of the 4 models, and again the shortest time to first token for 3 of the 4 (the three are not the same models on both axes). Prompt caching is not a feature you switch on or off; it is a decision about what goes into the cache and what stays out.
1. Executive summary
A token is the basic unit in which a model processes text and in which you are billed. But comparing per-token prices alone does not explain what an agent costs. Agent cost depends on how many times the same content is sent again, and the feature that reduces this repeated sending is prompt caching. When consecutive requests begin with identical content, that shared part is reused instead of being recomputed.
3 providers · 500+ sessions
had the lowest cost
Separately, 3/4 on time to first token as well
Most models. Claude Fable 5.1 · Mythos 5.1: 0.025× (checked 2026-09-21)
2. How one question becomes dozens of charges
In an ordinary chatbot, one question is one call. Agents are different. They call a tool, read the result, decide again and call again. Each of these iterations is a separate API call, and each one is billed.
Cost is the number of calls × the tokens resent per call. Count only the calls and you miss the second factor — because every call resends the entire context so far. The system prompt, tool definitions and the conversation so far are counted again as input tokens on every call. In their experiments, the paper's authors used a 10,000-token system prompt and varied the number of tool calls from 3 to 50. At 50 calls, the same 10,000 tokens are sent 50 times.
3. How much does caching actually save?
Lumer et al. (arXiv:2601.06007) compared three caching strategies across three providers (OpenAI, Anthropic, Google). On a benchmark in which agents make real web search tool calls over many rounds of requests and responses (DeepResearch Bench), they ran more than 500 agent sessions and measured API cost and time to first token together.
The paper compared these three strategies.
| Strategy | What goes into the cache | Characteristics |
|---|---|---|
| Full context | System prompt + conversation + all tool results | Simplest. Includes things that change with every request |
| System prompt only | Instructions and tool definitions | Only the part that does not change |
| Exclude tool results | System prompt + conversation, without tool outputs | Leaves out only values that change per session |
In its abstract, the paper sums up the results as 41–80% lower cost and 13–31% shorter time to first token. But open the per-model table and the range is wider, and which strategy did best also differs by model. Here are all 12 conditions as reported.
| Model | Strategy | Cost reduction | Change in time to first token |
|---|---|---|---|
| GPT-5.2 | Full context | 79.3% | −9.5% |
| System prompt only | 81.4% | −10.5% | |
| Exclude tool results | 79.6% | −13.0% | |
| Claude Sonnet 4.5 | Full context | 77.8% | −21.8% |
| System prompt only | 78.5% | −22.9% | |
| Exclude tool results | 78.1% | −20.9% | |
| Gemini 2.5 Pro | Full context | 38.3% | −6.0% |
| System prompt only | 41.4% | −6.1% | |
| Exclude tool results | 27.8% | +2.9% | |
| GPT-4o | Full context | 47.8% | +8.8% |
| System prompt only | 45.9% | −30.9% | |
| Exclude tool results | 46.8% | −28.1% |
Source · checked against the table in arXiv:2601.06007. For time to first token, a negative value means shorter and a positive value means longer latency. Bold marks the best value in that column for each model.
4. Where caching broadly backfires
Cost went down in all 12 conditions. But time to first token actually got longer in two conditions: 8.8% for GPT-4o with full-context caching, and 2.9% for Gemini 2.5 Pro with tool results excluded. The paper's explanation is that “caching dynamic content can introduce overhead that negates latency benefits.”
The three rules the paper sets out all come down to one principle: keep content that changes with every request out of the cached portion. The third rule, however, depends on the model, as the table above shows.
Put dynamic content last
Move the parts of the system prompt that change often toward the end. The cache is reused only as far as the start of a request matches the previous request, so if changing content sits near the front, nothing after it can be reused either.
Applies to: all 4 models.
Keep tool definitions stable
If you rebuild tool definitions for every request, the existing cache cannot be used. The paper notes that “dynamic function calling can break the cache when tool definitions change between requests.” Keep the definitions fixed and change only the values you pass at call time.
Applies to: all 4 models.
Excluding tool outputs — measure, then decide
Search results and API responses differ from session to session. The paper tested a separate strategy that keeps them out of the cache, but the results split. On GPT-5.2 it gave the best time to first token (−13.0%), while on Gemini 2.5 Pro it was the worst of the three on cost (27.8%) and also added latency (+2.9%).
Applies to: decide after measuring on the model you use.
5. Caching terms differ by provider
Under the same name, “prompt caching,” the way you turn it on, the minimum length and the retention time all differ. The values below were checked directly in each provider's official documentation.
| Item | Anthropic | OpenAI | Google Gemini |
|---|---|---|---|
| How to turn it on | Manual — set cache_control |
On by default. For GPT-5.6 and later, controlled with prompt_cache_options |
Implicit caching on by default |
| Minimum length | 512 · 1,024 · 2,048 · 4,096 tokens, depending on the model | 1,024 tokens (GPT-5.6 and later) / 2,048 tokens (earlier) | 2,048 tokens (2.5 Flash · Pro) / 4,096 tokens (3.x Flash · 3.1 Pro Preview) |
| Cache-read price | 0.1× the base input token price. Except Fable 5.1 · Mythos 5.1: 0.025× (checked 2026-09-21) | 0.1× (GPT-5.6 and later). Model-specific for earlier models | No ratio stated — only says the savings are applied automatically on reuse |
| Extra cost of cache writes | 1.25× (5 minutes) / 2× (1 hour) | 1.25× (GPT-5.6 and later) / no extra charge (earlier models) | No separate write charge stated in the docs |
| Retention time | 5 minutes by default, 1 hour as an option | 30 minutes after last use (GPT-5.6 and later) | Not stated in the docs |
| Choosing what is cached | Up to 4 cache breakpoints per request | Optional, with prompt_cache_breakpoint |
Not possible with implicit caching |
Source · each provider's official documentation (checked 2026-09-08). “Not stated” means we could not find the value in that official documentation, not that no such charge or condition exists.
6. What comes after caching
Prompt caching cuts repeated computation for requests that need an immediate response. Work that does not need results right away is better sent down a different path altogether.
Batch processing
Anthropic's Message Batches API charges all usage at 50% of standard prices. In exchange, it is asynchronous: you send the requests, do not wait, and collect the results later. Most batches finish within an hour, but one can take up to 24 hours, and requests not finished within 24 hours expire. Results can be retrieved for 29 days.
Good fit: work nobody is waiting on, such as bulk classification, re-indexing and scheduled evaluation runs.
Model routing
Model routing sends easy steps to a smaller model. But as noted in the previous section, switching models mid-session means the cache cannot be reused. Splitting sessions by type of work, rather than mixing several models in one session, does more to protect the cache.
Check: compare what model routing saves against the extra you pay for lost cache reuse, in the same table. Looked at separately, model routing's savings look bigger than they really are.
7. What you can do today
| # | Task | How to check |
|---|---|---|
| 1 | Count how many API calls one task actually turns into | Calls per session in your request logs. If the number is higher than you expected, that is where your cost is coming from |
| 2 | Find the pieces of the system prompt that change every time | Whether a timestamp, session ID, user name or current step number sits near the front |
| 3 | Move those pieces to the end of the system prompt | Whether the cache-hit token count in responses went up after the move |
| 4 | Freeze tool definitions | Compare the tool schemas of two requests as they are, and confirm that not a single character differs |
| 5 | Measure with tool outputs excluded and included | Results split by model. Run the same task under both conditions and compare cost and time to first token |
| 6 | Check that you are above the minimum length | If the system prompt has fewer tokens than the model's minimum (512–4,096), prompt caching does not apply at all |
| 7 | Count reuses, then choose the retention time | The 5-minute cache pays off from 1 reuse (1.35 vs 2). The 1-hour retention pays off from 2 reuses (2.2 vs 3) |
| 8 | Move work nobody is waiting on to batch | A list of tasks that can tolerate a 24-hour delay |
8. What this is not yet
- These are not our own measurements. Every reduction figure in this article comes from arXiv:2601.06007; we did not measure them again. With a different workload, the numbers will differ.
- The abstract's range does not capture the whole table. The abstract gives 41–80% for cost and 13–31% for first token, but the actual range across the 12 conditions is 27.8–81.4% for cost and −30.9% to +8.8% for first token. We could not confirm from the paper which subset the abstract's figures summarize. The body of this article is based on the table values.
- The model lineup is as of the measurement. The paper's models are GPT-5.2, GPT-4o, Claude Sonnet 4.5 and Gemini 2.5 Pro. Caching behavior may have changed in models released since.
- The benchmark is a web search agent. DeepResearch Bench is a task that calls a search tool repeatedly. This paper does not answer whether the results carry over to work where context builds up differently, such as code editing.
- Prices are as of the date checked. The table values were read from each provider's documentation on 2026-09-08. Recheck them before you adopt.
- We could not confirm Google's savings ratio. The official documentation says only that savings are applied automatically when the cache is reused, and gives no specific ratio. We left it blank.
9. Sources
| Source | What we used it for | Link |
|---|---|---|
| Lumer et al., Don’t Break the Cache (arXiv:2601.06007) | All cost and first-token values for the 12 conditions, the range summarized in the abstract, the three rules. Checked against the paper's table | arxiv.org/abs/2601.06007 |
| Anthropic — Prompt caching | Writes 1.25× · 2×, reads 0.1× (0.025× for Fable 5.1 · Mythos 5.1), retention 5 minutes · 1 hour, minimum 512–4,096 tokens, 4 breakpoints | platform.claude.com/docs/.../prompt-caching |
| Anthropic — Batch processing | 50% of standard prices, up to 24 hours, results kept for 29 days | platform.claude.com/docs/.../batch-processing |
| OpenAI — Prompt caching | On by default, minimum 1,024 · 2,048 tokens, reads 0.1×, writes 1.25× (GPT-5.6 and later), 30 minutes after last use | developers.openai.com/api/docs/guides/prompt-caching |
| Google — Context caching | Implicit caching on by default, minimum 2,048 · 4,096 tokens. No savings ratio stated | ai.google.dev/gemini-api/docs/caching |
We checked every figure in this article directly in the five sources above. We did not use figures from secondary roundup blogs, because we could not find their original sources.
Prices and cache behavior change often, so recheck the official documentation before you adopt them.
Revised 2026-09-21. At publication, this article stated the cache-read price, 0.1× the base input price, as a rule that holds for every model.
Rechecking the official pricing page on 2026-09-21 showed that Claude Fable 5.1 and Mythos 5.1 are at 0.025× ($0.25 per million tokens),
a fourfold difference from the other models. We added the exception in three places: the summary KPI, the provider comparison table and the sources table.
The measurements and conclusions are unchanged — the judgment that caching a narrower portion is better comes from how often the cache is invalidated, not from the multiplier.
How the multipliers that now differ by model, and the tokenizer change, affect price comparisons is covered separately in
You cannot compare model costs from the price list alone.