Prompt caching: Save 20–73% on LLM API Costs

Does prompt caching save money on LLM API costs?

Yes, for the right workload shape: 20–73% based on Net monthly savings across 3 sourced providers, priced models, and cacheable workload shapes: pricingHub input/output rates plus each provider's sourced write/read multipliers and TTL, with one write per TTL window. It does not apply universally — see the applicability and tradeoff sections below before using it.

Verified 2026-08-15

Batch 40 · server-rendered decision evidence · verified 2026-08-27

Prompt-caching break-even evidence

Frozen inputs, formulas, provenance, and decision boundaries are visible in the initial HTML. Unsupported evidence fails closed as Unavailable.

Prefix mutation canary

Formula / scoring rule: Cache claim = returned cache read/write/miss units + stable prefix hash; visual similarity is not a hit.

Provenance: Frozen byte-identical, whitespace, reordered-tool, dynamic-date, user-specific, and model-changed prompts.

Frozen fixture / runVisible inputsField-level resultDecision boundaryState
byte-identical
batch40-prompt-caching-m1-r1
prefix hash p40; 4,096 tokens; same model; second request 30s laterReturned cache status Unavailable — provider response field not capturedNo savings until explicit read units are returned.Unavailable — provider response field not captured
whitespace-only
batch40-prompt-caching-m1-r2
hash changes; 4,098 tokens; same semantic textCache boundary Unavailable — not observable from request logTreat mutation as a miss until provider confirms prefix matching.Unavailable — not observable from request log
model-changed
batch40-prompt-caching-m1-r3
same text; model ID changes; same tenantCache reuse Unavailable — model-scoped behavior is undocumented for this fixtureNever transfer a hit across model IDs.Unavailable — model-scoped behavior is undocumented for this fixture

Module citation: Anthropic prompt caching documentation.

TTL-and-arrival replay

Formula / scoring rule: Net savings = uncached bill − (write charges + read charges + misses); expiry and minimum-prefix failures are charged.

Provenance: Identical monthly request volume across bursty, steady, diurnal, and daily schedules; provider TTL terms are sourced per row.

Frozen fixture / runVisible inputsField-level resultDecision boundaryState
bursty
batch40-prompt-caching-m2-r1
10K requests/hour; 4-hour burst; 8K stable prefixReuse count and write/read rates Unavailable — provider-specific pricing is not joinedDo not publish a savings percent from request count alone.Unavailable — provider-specific pricing is not joined
steady
batch40-prompt-caching-m2-r2
240K/day; one request every 6s; documented TTL candidateBreak-even reuse formula = write/(uncached−read); numeric result Unavailable — read/write rates are absentFormula remains visible; numeric savings fail closed.Unavailable — read/write rates are absent
once daily
batch40-prompt-caching-m2-r3
30 arrivals/month; 24h gap; 8K prefixExpiry count Unavailable — eviction/TTL behavior is not observedUndocumented expiry cannot be treated as zero.Unavailable — eviction/TTL behavior is not observed

Module citation: Google Gemini context caching documentation.

Cache rollout reconciliation panel

Formula / scoring rule: Realized saving = online uncached baseline invoice − cache invoice, normalized by accepted request count.

Provenance: Shadow 10%, canary 20%, production 70% rollout; rollback if hit-rate telemetry or answer parity is absent.

Frozen fixture / runVisible inputsField-level resultDecision boundaryState
shadow
batch40-prompt-caching-m3-r1
10K requests; prefix hashes logged; no billing changeObserved hit rate Unavailable — cache usage telemetry is absentShadow similarity is not billing evidence.Unavailable — cache usage telemetry is absent
canary
batch40-prompt-caching-m3-r2
20K requests; semantic parity sample 200; rollback threshold 2% mismatchParity 198/200; realized invoice delta Unavailable — invoice attribution is absentDo not scale on parity without cost attribution.Unavailable — invoice attribution is absent
rollback
batch40-prompt-caching-m3-r3
cache boundary changed; mismatch 3/100; production share 70%Rollback trigger fires; savings after rollback Unavailable — post-rollback invoice not yet availableRollback is the safety boundary, not a savings claim.Unavailable — post-rollback invoice not yet available

Module citation: All AI Ask evidence registry (verified 2026-08-27).

Test your cacheable prefix

How it works

Prompt caching stores a stable prefix so later requests pay the provider’s cache-read rate instead of the normal input rate. The economics are not a universal 90% rule: this guide joins each provider’s sourced read multiplier, write multiplier, minimum prefix, and TTL to the same model prices used by the cost calculator. A first write can cost more than an ordinary input; the break-even reuse count is therefore calculated as the write premium divided by the per-read saving. Keep stable instructions and reference material first, put changing user content after the cache boundary, and measure cache hits in production.

Where it applies

Stable-prefix workloads: long system instructions, tool definitions, repeated documents, and multi-turn agents. It does nothing when the prefix changes every request, falls below the provider minimum, or is reused too infrequently to repay the first write.

Prompt-cache economics by provider

ProviderCache readCache writeMinimum prefixTTLBreak-even reusesVerified
OpenAI10% of input1.25× input1,024 tokens30 min1 reuse2026-08-15
Anthropic10% of input1.25× input1,024 tokens5 min1 reuse2026-08-15
Google10% of input1× input4,096 tokens60 minFirst reuse2026-08-15
xAI
DeepSeek
Mistral
Groq
Cerebras
Qwen
Amazon
Z.ai
Meta

Rows marked — are providers without a published provider-level cache record; they are excluded from the break-even and savings calculations. Read and write rates are multipliers on the provider’s ordinary input price.

Worked cache example

This llm chatbot example uses the same workload shape as the cost calculator. The break-even count is the first reuse at which the sourced write premium is repaid by cheaper reads; it is not a generic caching rule.

For a 12,000-token stable prefix, the provider rows below show whether caching is free to enable or how many reuses repay the first write. Confirm that your actual prefix clears each provider’s minimum before using the estimate.

The tradeoff

Caching can increase the bill when a prefix is written and then expires before enough requests reuse it. A changing system prompt, reordered tool list, or short prefix causes misses, so the application pays normal input pricing without receiving the expected read discount. Explicit caches can also add storage charges or require cache-control fields, and cached content has a provider-specific lifetime. Treat the result as a workload decision: use the break-even count below, verify that your prefix clears the minimum token length, and monitor hit and write tokens rather than assuming every repeated-looking request is a hit.

Worked example

For llm chatbot (growing conversation history in, short reply out) at 200,000 calls/month, GPT-5 Nano runs $52.00/month at list price and $52.00/month once verbosity is priced in. See the full ranked table for this workload →

FAQ

How many reuses make prompt caching worthwhile?
It depends on the provider’s write premium and read discount. The break-even table computes the first reuse count from those sourced multipliers; providers with no write premium break even on the first reuse.
What should I put in a cached prefix?
Put stable system instructions, tool definitions, and repeated reference material before changing user content. A changed prefix can miss the cache and erase the expected saving.

Other levers

Model verbosityBatch APIContext trimmingCost calculator →