Artificial Intelligence

Prompt Caching Economics Compared Across Providers

Rows of server racks in a data center with blue indicator lights, representing cached compute reused across AI inference requests.
Christina Morillo

Prompt caching can lower the cost of repeated input, but a cache discount is not the same as a discount on your whole application. Cache writes, fresh input, output, storage and retries still need to appear in the bill. Compare providers with a fixed workload and measured usage, rather than a headline percentage.

The table below summarises documentation checked on 10 October 2026. The worked calculation is hypothetical; it is not a benchmark we ran against a paid API or a forecast of your cache-hit rate.

Compare the billing categories before the rates

What to record for a provider comparison
ProviderDocumented cache behaviourCost category to verify
OpenAIFor GPT-5.6 and later: writes at 1.25× uncached input; reads usually 0.1×, or 0.05× for GPT-6.1 SolKeep cache writes separate from uncached input; earlier model families have different rules
Anthropic5-minute writes at 1.25×; 1-hour writes at 2×. Reads are model-dependent, including 0.1×, 0.05× and 0.025× casesUse the exact model’s row and selected TTL
Gemini APISupports implicit and explicit caching on supported modelsCheck cached-token pricing and explicit-cache storage charges
DeepSeekAutomatic prefix caching with reported hit and miss tokensUse current model pricing; old launch-announcement rates are not a current quote

Read the provider references directly: OpenAI caching, Anthropic caching, Gemini caching and DeepSeek caching. A cache write is a billing class, not a universal extra fee added to every input token.

A reproducible small workload

Define ten requests. Each contains the same 4,096-token prefix, a different 512-token suffix and a 256-token answer. Assume one prefix write and nine full reads. These are controlled assumptions: a production trace may contain misses, partial reuse or different outputs.

For this arithmetic only, use rates of US$2 per million ordinary input tokens, US$2.50 for writes, US$0.10 for reads and US$10 for output. They match the standard short-context GPT-6.1 Sol row on the pricing page at review time. Other processing tiers, long context, tools and regional processing can change the bill.

Hypothetical cost for ten requests, in US dollars
ComponentWithout cachingOne write, nine reads
Repeated prefix40,960 × 2 ÷ 1,000,000 = 0.08192004,096 × 2.50 ÷ 1,000,000 + 36,864 × 0.10 ÷ 1,000,000 = 0.0139264
Fresh suffix5,120 × 2 ÷ 1,000,000 = 0.01024000.0102400
Output2,560 × 10 ÷ 1,000,000 = 0.02560000.0256000
Total0.11776000.0497664

The prefix cost falls by 83% in this example. Total cost falls by about 57.7%, because fresh input and output remain. The calculation excludes tools and retries, so add them before projecting a monthly budget.

A worksheet for a real comparison

  1. Version a small set of representative prompts, expected outcomes and permission checks.
  2. Record model, region, tier, cache mode, prefix length and spacing between requests.
  3. Keep fixed context unchanged and place changing input after it.
  4. Collect fresh-input, cache-write, cache-read and output usage according to each provider’s fields.
  5. Record failed calls, retries, elapsed time and whether the output passed the same evaluation.
  6. Compute total spend divided by accepted outputs. Compare this with uncached spend and review any quality change.

Use a row per request. For example: request ID, input classes, output tokens, tool cost, retry count, latency and accepted/rejected. Do not call a provider cheaper if it produced fewer usable answers or required more manual repair.

When the write premium does not pay back

For a fixed prefix, a write multiplier w, read multiplier r and N requests, the ideal cached cost in ordinary-input equivalents is w + (N − 1)r. The uncached cost is N. This comparison assumes the same prefix length, full reuse and no separate storage charge.

A new prefix on every request, a cache lifetime shorter than the request interval or larger prompts added only to reach a threshold can remove the saving. Measure the workload that actually runs. Combine the worksheet with an evaluation pipeline and our model-routing guide before changing production routing.

Keep exploring