Skip to content

Cost and FinOpsAnalysis

Prompt caching across providers: when it pays

A cache read costs a fraction of an input token, but on some providers the write costs more than one. Whether caching lowers your bill depends on how often a prefix is reused inside its lifetime, and the threshold differs by provider.

By INFRO Editorial

Published

7 min read

Amber columns of different heights under a glowing trend line on a dark ground, representing prompt caching break-even rates

In short

Prompt caching lowers estimated provider cost only when enough requests read a prefix that an earlier request paid to write. With a 1.25x write and a 0.1x read (OpenAI GPT-5.6 and later, Anthropic's five-minute cache), caching breaks even when about 22% of requests hit; with Anthropic's one-hour cache (2x write) it needs about 53%. Gemini implicit caching and DeepSeek charge no write premium, so any hit lowers cost.

Key takeaways

  • A cache write costs more than an ordinary input token on OpenAI GPT-5.6 and later and on Anthropic; a cache read costs a tenth or less.
  • Break-even hit rate is (W - 1) / (W - R), where W and R are the write and read multipliers. For 1.25x and 0.1x that is about 22%.
  • Anthropic's one-hour cache doubles the write price, so it needs roughly half of requests to hit before it lowers cost.
  • Minimum prefixes differ by an order of magnitude: 512 tokens on some Claude models, 4,096 on Claude Haiku 4.5 and Gemini 3.x.
  • A failover to another provider account starts a cold cache. Measure the cached share of input tokens per model and route, not only the cost.

Prompt caching is usually described as a lower rate for repeated input. That is half of it. On the two largest providers the request that creates a cache entry is billed above the normal input rate, so a cache that is written often and read rarely raises the bill. Whether caching lowers your estimated provider cost is a question about reuse: how many requests read a prefix inside the time it stays cached.

This analysis states each provider's published rules, turns them into a break-even hit rate, and ends with how to check the result on real traffic.

What each provider charges

The mechanics are similar everywhere — the provider recognises that the start of a request matches one it processed recently and bills those tokens at a reduced rate — but the prices, minimums and lifetimes are not.

OpenAI. On GPT-5.6 and later, caching applies to prompts of at least 1,024 visible input tokens, a cache write is billed at 1.25x the uncached input rate, and an entry lives for 30 minutes after its most recent write or reuse1. Earlier models charged no write premium. The pricing page lists the three rates side by side: GPT-6 Sol is $2.00 input, $0.20 cached input and $2.50 cache write per 1M tokens, and GPT-6 Astra is $10.00, $1.00 and $12.502. Usage reports cached_tokens and cache_write_tokens under the input token details1.

Anthropic. Caching is requested with cache_control, either once at the top level of the request (the system moves the breakpoint forward as a conversation grows) or on up to four individual blocks. A five-minute write costs 1.25x base input and a one-hour write 2x; a read costs 0.1x on most models, 0.05x on Claude Opus 5.5 and 0.025x on Claude Fable 5.13. Each hit refreshes the entry at no extra cost. The minimum cacheable prompt is 512 tokens on Fable 5.1, Opus 5.5 and Sonnet 5.5, 1,024 on Sonnet 5, and 4,096 on Haiku 4.53. Anthropic's own pricing page states the consequence: caching pays off after one read at the five-minute duration and after two at the one-hour duration4.

Google Gemini. Implicit caching is on by default for Gemini 2.5 and newer, with a 4,096-token minimum on the 3.x Flash models and Gemini 3.1 Pro5. There is no write premium for an implicit hit. The cached rate is a tenth of input: Gemini 3.8 Flash lists $0.75 input and $0.075 context caching per 1M tokens through 2026-12-31. Explicit caches also bill storage, $0.50 per 1M tokens per hour on 3.8 Flash and $4.50 on 3.1 Pro6.

DeepSeek. Caching on disk is enabled by default, matches on prefix units, and entries are cleared within hours to days once unused7. There is no write charge; a hit on deepseek-flash is $0.006 against $0.30 for a miss at peak rates, roughly 0.02x8. Usage reports prompt_cache_hit_tokens and prompt_cache_miss_tokens7.

Provider cachingOpenAI (GPT-5.6 and later)AnthropicGemini (implicit)DeepSeek
How it turns on●Automatic◐cache_control, top level or on up to 4 blocks●Automatic on 2.5 and newer●Automatic, on by default
Minimum prefix1,024 visible input tokens512 on Fable 5.1, Opus 5.5, Sonnet 5.5; 1,024 on Sonnet 5; 4,096 on Haiku 4.54,096 on 3.x Flash and 3.1 ProNot stated
Write price1.25x input1.25x input (5 min), 2x (1 hour)○write charge; explicit caches bill storage per hour○write charge listed
Read price0.1x input0.1x; 0.05x on Opus 5.5; 0.025x on Fable 5.10.1x inputAbout 0.02x input
Lifetime30 minutes after last write or reuse5 minutes or 1 hour, refreshed free on each hitNot statedCleared within hours to days of disuse
Usage fieldscached_tokens, cache_write_tokenscache_read_input_tokens, cache_creation_input_tokensCached token count in usage metadataprompt_cache_hit_tokens, prompt_cache_miss_tokens
Prompt caching rules by provider, as published on 2026-09-29. Multipliers are relative to the same model's uncached input rate.

The break-even formula

Take a prefix of P tokens that repeats across requests, an input rate of in, a write multiplier W and a read multiplier R. Without caching, every request pays P × in for the prefix. With caching, a request that misses pays W × P × in and a request that hits pays R × P × in.

If a share h of requests hit, the expected prefix cost per request, relative to no caching, is:

Expected prefix cost relative to uncached
relative_cost = h × R + (1 − h) × W
caching lowers cost when  h > (W − 1) / (W − R)

The same result expressed as reuse: one write followed by N reads costs less than N + 1 uncached requests when N > (W − 1) / (1 − R). For a five-minute Anthropic entry that is N > 0.28, one read. For a one-hour entry it is N > 1.11, two reads — the figures Anthropic publishes4.

Share of requests that must read the cache

Break-even hit rate

  • Gemini implicit, DeepSeekNo write premiumany hit
  • Claude Fable 5.1, 5 min1.25x write, 0.025x read20.4%
  • Claude Opus 5.5, 5 min1.25x write, 0.05x read20.8%
  • OpenAI GPT-5.6 and GPT-61.25x write, 0.1x read21.7%
  • Anthropic 5 min, 0.1x readSonnet 5.5, Haiku 4.521.7%
  • Claude Fable 5.1, 1 hour2x write, 0.025x read50.6%
  • Anthropic 1 hour, 0.1x read2x write52.6%
Break-even hit rate from each provider's published write and read multipliers. Below this share of cache-reading requests, caching raises the prefix cost; above it, caching lowers it.

Three things fall out of the numbers:

  • The read rate barely moves break-even. Fable 5.1's 0.025x read lowers its five-minute break-even from 21.7% to 20.4%. The write premium dominates.
  • The one-hour cache is a bet on sparse traffic. It doubles the write cost to keep an entry alive twelve times longer. It pays when requests arrive more than five minutes apart but still reuse the prefix, and loses when traffic is dense enough that a five-minute entry would have stayed warm anyway.
  • With no write premium, any hit lowers cost. On Gemini implicit caching and DeepSeek, the only question is whether the prefix is long enough to be cached at all.

A request, three ways

  • 20,000-token prefix
  • 500 new input tokens
  • 400 output tokens
  • USD per request
  • No caching$0.0450
  • Cache write (5 min)$0.0550
  • Cache read$0.0090
The same illustrative request priced three ways at Claude Sonnet 5.5 list rates. The prefix dominates the uncached and cache-write cost; on a cache read, output becomes the largest part.

Explicit caches add a clock

Gemini's explicit caches trade the per-request write premium for a storage charge per token-hour. The break-even is then about request rate, not hit share.

What breaks a cache in production

The published rules are the ceiling. Real hit rates depend on whether the prefix is byte-for-byte stable and whether requests land where the cache lives.

  • A changing first line. A timestamp, request id or user name interpolated into the system prompt makes every prefix unique. Put volatile values in the last message.
  • Reordered tools. Tool definitions are part of the prefix. Serialize them in a fixed order.
  • Changing request parameters. On Anthropic, changing the thinking configuration or effort level between requests invalidates cache breakpoints; see reasoning tokens.
  • Traffic spread across accounts. A cache belongs to the account and deployment that served the request. Load balancing across accounts, or a failover, starts cold.
  • Gaps longer than the lifetime. A five-minute entry is gone after five quiet minutes. Low-volume, bursty workloads often never reach break-even.
  • Batch jobs. Anthropic supports caching inside Message Batches and says the caching and batch rate reductions stack, but hits are best-effort because requests run concurrently; it reports typical hit rates of 30% to 98%9.

Measure the hit rate you actually get

Compute the cached share of prompt tokens per model and route, daily. It is a better leading indicator than cost, because cost also moves with volume and output length.

cache_share.py
from collections import defaultdict

def cache_share(rows):
    """rows: dicts with model, prompt_tokens and cached_tokens per request."""
    totals = defaultdict(lambda: [0, 0])
    for r in rows:
        totals[r["model"]][0] += r.get("cached_tokens") or 0
        totals[r["model"]][1] += r["prompt_tokens"]
    return {m: (c / p if p else None) for m, (c, p) in totals.items()}

def breakeven(write_mult: float, read_mult: float) -> float:
    return (write_mult - 1) / (write_mult - read_mult) if write_mult > 1 else 0.0

print(round(breakeven(1.25, 0.1), 3))   # 0.217
print(round(breakeven(2.0, 0.1), 3))    # 0.526

Token share and request hit rate are not the same number, but when the cached prefix is most of each prompt they move together, and a sudden drop in either means the prefix changed.

Prompt caching through INFRO

INFRO does not cache prompts itself; caching happens at the provider, on your account, at your provider's rates. INFRO forwards requests unchanged, including Anthropic cache_control on text content parts and tool definitions, and reports the provider's cached-token count in usage.prompt_tokens_details.cached_tokens on streaming and non-streaming responses. The estimate in usage.cost prices cached tokens at the cached rate, and prices cache writes at the write rate where the catalog carries one for the model. See prompt caching.

Two INFRO features watch the hit rate for you. Traffic changes raises a finding when the cached share of prompt tokens on a model or route drops by at least 10 percentage points against its usual day, with the estimated weekly change in provider cost. And because caches do not follow a failover, a rising fallback share in the same place usually explains a falling cache share. If your contract carries its own cached-input rate, enter it as a negotiated rate so estimates use it; reconciliation flags cache-write pricing the estimate did not model.

From the team that builds it

Where this shows up in INFRO

INFRO is a control plane in front of the provider accounts you already hold. The capabilities below are the parts of it this article touches, each with the documentation that defines its behaviour.

  • Usage and cost per request

    Private early access

    Every request records its model, latency, token or unit counts, and estimated provider cost, queryable by project and key.

    Read the documentation for Usage and cost per request
  • Traffic changes

    Private early access

    Changes in your traffic that come with no error: a model answered by a new snapshot, longer answers, a lost prompt cache, more fallbacks, answers cut off by the length limit, slower responses or a new error mix. Each finding names the likely cause and the estimated weekly change in provider cost. INFRO sees request metadata, not answers, so it does not judge answer quality.

    Read the documentation for Traffic changes
  • Negotiated provider rates

    Private early access

    Enter the rates your contracts actually carry, per model and optionally per provider, so estimated cost uses them before the vendor's list rate. Included from the Team plan.

    Read the documentation for Negotiated provider rates
  • Provider cost reconciliation

    Private early access

    Daily comparison of estimated spend against the cost reported by OpenAI's and Anthropic's own cost APIs, using a separate admin credential, with the likely cause of a persistent gap and a suggested rate you can apply. Included on the Business plan.

    Read the documentation for Provider cost reconciliation
  • Response cache

    Private early access

    Opt-in, exact-match cache for chat completions. An identical request inside the time-to-live you set is answered from the cache and never reaches your provider, so your provider does not bill it. Every plan; the longest time-to-live depends on the plan. No semantic matching.

    Read the documentation for Response cache

INFRO is in private early access. Provider usage is billed to you by your providers; INFRO charges a software subscription and takes 0% of model spend. See plans.

Sources

Numbered in order of first citation. Each was opened and checked against the claim on the date shown.

  1. 1.Prompt caching (opens in a new tab) — OpenAI. Accessed Sep 29, 2026.
  2. 2.Pricing (opens in a new tab) — OpenAI. Accessed Sep 29, 2026.
  3. 3.Prompt caching (opens in a new tab) — Anthropic. Accessed Sep 29, 2026.
  4. 4.Pricing (opens in a new tab) — Anthropic. Accessed Sep 29, 2026.
  5. 5.Context caching (opens in a new tab) — Google. Accessed Sep 29, 2026.
  6. 6.Gemini Developer API pricing (opens in a new tab) — Google. Accessed Sep 29, 2026.
  7. 7.Context caching (opens in a new tab) — DeepSeek. Accessed Sep 29, 2026.
  8. 8.Models and pricing (opens in a new tab) — DeepSeek. Accessed Sep 29, 2026.
  9. 9.Batch processing (opens in a new tab) — Anthropic. Accessed Sep 29, 2026.

About this article

Written from the prompt-caching and pricing documentation of OpenAI, Anthropic, Google Gemini and DeepSeek, each opened on 2026-09-29, and from the public documentation and pricing code of the INFRO gateway, which the authors build. Break-even figures are arithmetic on the published multipliers. The request costs in the examples are illustrative, not measured traffic.

Last checked against its sources on . The next review is due by . No separate named reviewer is recorded for this article.

How articles are written, sourced and corrected is set out in the editorial standards.