Prompt caching: when it pays

Re-sending the same system prompt every call? Caching re-prices those tokens at a steep discount. Here is exactly when it pays — with the math.

prices verified October 28, 2026

How prompt caching works

Every request re-sends your system prompt, retrieved documents, few-shot examples, and conversation history. If the start of your prompt (the prefix) is identical to a recent request, the provider can skip reprocessing it and bills those repeated tokens at a discounted cache read rate instead of the full input rate. The first time the prefix is seen, the provider pays to store it — a cache write, usually priced above the normal input rate.

DeepSeek goes further: its disk-based context caching is automatic — no SDK changes, no headers, no opt-in — and it has applied to every model generation since 2024, including V4.

Verified cache rates, October 2026

ModelInput / 1MCache read / 1MCache write / 1MSource
GPT-6 Astra$10.00$1.00 (10%)$12.50 (1.25×)OpenAI API pricing
GPT-6.1 Sol$2.00$0.10 (5%)$2.50 (1.25×)OpenAI API pricing
GPT-6 Luna$0.10$0.01 (10%)$0.125 (1.25×)OpenAI API pricing
Grok 4.7 (<200K)$2.00$0.50 (25%)—xAI release notes
Claude Opus 5.5$4.00$0.20 (5%)$5.00 (5-min) / $10.00 (1-hour)Anthropic prompt-caching docs
DeepSeek V4.1 Flash (off-peak)$0.15$0.003 (2%)Automatic, no chargeDeepSeek API pricing
DeepSeek V4 Pro (off-peak)$0.66$0.022 (~3%)Automatic, no chargeDeepSeek API pricing

Two things stand out. First, DeepSeek's cache discount is the deepest in the industry — a 50× drop from $0.15 to $0.003 on Flash — and it costs nothing to set up. Second, OpenAI's cache writes cost 1.25× the input rate, which is why the break-even math below matters.

The break-even math

On providers that charge for cache writes, caching pays once a prefix is read back more often than it is rewritten. For GPT-6.1 Sol: writing a 50K-token prefix costs 0.05 × $2.50 = $0.125. Each read of it costs 0.05 × $0.10 = $0.005 instead of 0.05 × $2.00 = $0.10.

Write cost: 1.25 × full rate · Read cost: 0.05 × full rate · Savings per read: 0.95 × full rate
Break-even: 1.25 / 0.95 ≈ 1.3 reads → read the prefix twice and caching pays

Any workload that reuses a prefix across two or more requests wins. A chatbot re-sending a 20K-token system prompt across 200 requests a day on GPT-6.1 Sol: without cache, 200 × 0.02 × $2 = $8/day on that prefix alone; with cache, roughly one write ($0.05) plus 199 reads at $0.002 = $0.45/day. About an 18× saving on the stable portion.

Three rules for maximum cache hits

  1. Stable content first, variable content last. Caches key on the prompt prefix — anything that changes early in the prompt invalidates everything after it. System instructions, tool definitions, and documents go up front; the user message goes at the end.
  2. Keep prefixes byte-identical. Reordering tools or rewording the system prompt between calls busts the cache. Template your prompts and freeze them.
  3. Right-size your prefix. On DeepSeek, cache pages are 512 tokens — a 549-token prompt caches 512 of them. Tiny prompts barely benefit; the win scales with prefix length.
When caching does not pay. If every request has a genuinely different prompt — one-shot bulk classification with no shared instructions, say — there is no reusable prefix and no saving. It also does nothing for output tokens, which are always billed at full rate. Caching is an input-token optimization.

Caching and the other discounts stack

Caching combines with the Batch API on providers that offer both — cached input inside a batch job gets both discounts. It does not, however, move you to a cheaper long-context band: cached tokens still count toward the threshold on providers that re-price the whole request.

Quick answers

How much does prompt caching actually save?

Cache reads bill at a fraction of the standard input rate: GPT-6.1 Sol drops from $2.00 to $0.10 per million tokens (5%), and Claude Opus 5.5 reads cost $0.20 against $4.00 input (5%). DeepSeek's automatic caching is deeper still: $0.003 per million on V4.1 Flash off-peak, a 98% discount.

Does prompt caching cost anything to enable?

On OpenAI's GPT-6 models, writing a cache entry costs 1.25x the input rate — but the discount breaks even after roughly two reads of the same prefix. On DeepSeek, caching is automatic and free. Grok 4.7 lists a $0.50 cached-input rate with no separate write charge on the public rate card.

Why isn't my prompt caching?

The usual causes: content before the stable prefix changes between calls (timestamps, random IDs, reordered tools), the prefix is too short to matter, or cache TTL expired between sparse requests. Freeze your template and keep variable content at the end of the prompt.

Does caching work with the Batch API?

On providers that offer both, yes — discounts stack. Cached input tokens inside a batch job get the cache rate applied to the already-discounted batch pricing. Grok 4.7 is the exception on the other axis: its rate card currently shows no batch discount at all.