Eazler AI Lab AI Engineering Journal
Skip to article
Engineering◷ 12 min read

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.

Korean original: 한국어 원문 (2026-09-08)Korean original revised: 2026-09-21Scope: prompt caching / batch processing / agent call structureAudience: developers · one-person studios · small teamsBasis: 1 arXiv paper + official docs from 3 providers

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.

27.8–81.4%API cost reduction across the 12 conditions
3 providers · 500+ sessions
3/4Models for which caching only the system prompt
had the lowest cost
Separately, 3/4 on time to first token as well
0.1×Input token price when the cache is reused
Most models. Claude Fable 5.1 · Mythos 5.1: 0.025× (checked 2026-09-21)
Conclusion: Turn prompt caching on, but keep what you cache narrow. Across the 12 conditions, caching only the system prompt came out best most often on both axes, and caching more content did not produce proportionally larger savings. Batch processing comes next, and comparing per-token prices comes last.

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.

Terminology: Time to first token (TTFT) is the time from sending a request until the first character of the response comes back. An agent repeats this wait dozens of times in one task, so a difference of a few hundred milliseconds per call drives the total run time.

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.

StrategyWhat goes into the cacheCharacteristics
Full contextSystem prompt + conversation + all tool resultsSimplest. Includes things that change with every request
System prompt onlyInstructions and tool definitionsOnly the part that does not change
Exclude tool resultsSystem prompt + conversation, without tool outputsLeaves 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.

ModelStrategyCost reductionChange in time to first token
GPT-5.2Full context79.3%−9.5%
System prompt only81.4%−10.5%
Exclude tool results79.6%−13.0%
Claude Sonnet 4.5Full context77.8%−21.8%
System prompt only78.5%−22.9%
Exclude tool results78.1%−20.9%
Gemini 2.5 ProFull context38.3%−6.0%
System prompt only41.4%−6.1%
Exclude tool results27.8%+2.9%
GPT-4oFull context47.8%+8.8%
System prompt only45.9%−30.9%
Exclude tool results46.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.

Three ways to read it. ① Caching only the system prompt had the lowest cost for 3 of the 4 models, and the shortest time to first token for 3 of the 4 as well. The models that were best on both axes at once are two: Claude Sonnet 4.5 and Gemini 2.5 Pro. ② Caching more does not mean bigger savings. On Gemini, caching only the system prompt (41.4%) was cheaper than full context including tool results (38.3%). ③ For some models, the strategy that is best on cost differs from the one that is best on latency. GPT-5.2 and GPT-4o are such cases.

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.”

Do not generalize. Full-context caching does not always make things slower. On the other three models, time to first token still dropped by 6.0–21.8% with full context. The slowdown came from particular combinations of model and strategy, not from one strategy on its own.

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.

Caution: Switch models mid-session and the cache starts building again from scratch. What you save with model routing — sending requests to a cheaper model — can be smaller than what you pay extra because the cache can no longer be reused. Design model routing and prompt caching together.

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.

ItemAnthropicOpenAIGoogle 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.

Include the write cost when you work out whether it pays. A cache write is the first time content is stored in the cache, and it carries an extra charge. If the input token price is 1, sending the same content twice without a cache costs 2. Anthropic's 5-minute cache already pays off with a single reuse: 1.25 + 0.1 = 1.35. The 1-hour retention, by contrast, costs 2× to write, so one reuse comes to 2 + 0.1 = 2.1, a loss; it pays off from the second reuse on (2 + 0.2 = 2.2 vs 3). Count your reuses first, then choose the retention time.

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.

There is an order. ① Pin the repeated portion in the cache, ② take out what changes, ③ move non-urgent work to batch, and ④ only then look at unit prices. Compare unit prices first and you miss the difference the first three make.

7. What you can do today

#TaskHow to check
1Count how many API calls one task actually turns intoCalls per session in your request logs. If the number is higher than you expected, that is where your cost is coming from
2Find the pieces of the system prompt that change every timeWhether a timestamp, session ID, user name or current step number sits near the front
3Move those pieces to the end of the system promptWhether the cache-hit token count in responses went up after the move
4Freeze tool definitionsCompare the tool schemas of two requests as they are, and confirm that not a single character differs
5Measure with tool outputs excluded and includedResults split by model. Run the same task under both conditions and compare cost and time to first token
6Check that you are above the minimum lengthIf the system prompt has fewer tokens than the model's minimum (512–4,096), prompt caching does not apply at all
7Count reuses, then choose the retention timeThe 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)
8Move work nobody is waiting on to batchA list of tasks that can tolerate a 24-hour delay
Look at items 2 and 3 first. The strategy that came out best most often in the paper was the one with the narrower cache scope, and items 2 and 3 are exactly the work of shrinking what goes into the cache. Item 5 split by model, so measure before you decide.

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

SourceWhat we used it forLink
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.

Newsletter

The week’s new reports, every Sunday

One email a week with that week’s reports, skipped when nothing new came out. Nothing but report news.

Used only to announce new reports. Unsubscribe any time. Privacy Policy
Publisher

Eazler AI Lab is the AI engineering journal of Eazler Inc. We read primary sources in full, and say so when something is unverified.

Editorial standards and method →

We also post report summaries on Threads: @eazler.inc.

Building or adopting AI agents? hello@eazler.com