Is Prompt Caching Worth It? The Arithmetic (2026)

Is prompt caching worth it? We measured an 88% repeat-call input cut on DeepSeek native, 75% on GLM-5, zero via one router. The volume math and verdict.

Fan Chuanyu's profile

Written by Fan Chuanyu

6 min read

Prompt caching is worth it when a long prefix repeats across high call volume: our 2026-07-28 test cut DeepSeek V4-Flash repeat-call input cost by 88%, worth roughly $419 per million calls, but it saves nothing on unique prompts.

That number is computed from measured tokens at official published rates, not quoted from a marketing page. Below is the arithmetic, plus the cases where the saving collapses to zero.

Is prompt caching worth it (verified 2026-07)

Prompt caching is a server-side billing and latency optimization that charges a reduced rate for input tokens the provider has already processed in a recent, identical prefix. The mechanism is boring; the economics are not, because the discount multiplies by call volume and by prefix length at once.

Two variables decide the answer: how much of each request is a repeated prefix, and how often you send it. A 3,400-token system prompt plus a 40-token answer is 98% input by token count, so an input-side discount is close to a total-bill discount. Invert that ratio and caching barely registers.

First-hand: what we sent on 2026-07-28

We sent the same fixed ~1800-token prefix two to three times per endpoint, two seconds apart, with a different one-line question each call, temperature 0 and max_tokens 40. On DeepSeek V4-Flash called natively at api.deepseek.com, the second request reported 3328 cache-hit tokens out of 3403 prompt tokens, a 98% hit rate, and latency fell from 1.43s to 0.90s. The third call hit 3328 again. All 17 calls across 8 endpoints succeeded, for $0.051 of routed spend.

This design measures implicit (automatic) caching only. Providers that require explicit cache markers are expected to report zero cached tokens here, a finding about default behavior, never a statement that caching is unsupported. DeepSeek native was measured on api.deepseek.com; every other endpoint was OpenRouter-routed and needs native re-verification.

Endpoint (2026-07-28)Cached tokens on repeatFirst callRepeat callChange
DeepSeek V4-Flash, native3328 of 3403$0.000476$0.0000571-88%, computed at official rates
GLM-5, routed3200 of 3284$0.002388$0.000596-75%, billed
MiniMax-M2.5, routed3296 of 3316$0.000530$0.000204-62%, billed
DeepSeek, routed0$0.000698$0.000696none, billed
Kimi K2, routed0$0.001901$0.001897none, billed
GPT-4o, routed0$0.00841$0.00840none, billed
Claude Sonnet 4.6, routed0$0.01207$0.01201none, billed
Qwen3-235B, routed0$0.000726$0.000331not cache evidence, see below

The DeepSeek native figures are input costs computed from the measured hit/miss token split at official rates, never billed amounts pulled from an invoice. According to DeepSeek API docs, cache-miss input is priced at $0.14 per million tokens and cache-hit input at $0.014 per million, applied automatically. Every routed figure in the table is a billed usage.cost value returned by the router.

The Qwen3-235B row is not cache evidence. Cached tokens were zero on both calls; call B billed $0.000331, matching Qwen's list price for that prompt at roughly $0.00032 computed, while call A billed about twice list. That delta tracks provider-price variance on the routed marketplace, not a cache hit.

The arithmetic at volume

Straight multiplication of our measured per-call figures, assuming every call hits a warm prefix of the size we tested. That is the best case, not a forecast.

EndpointPer repeat call1M repeat callsSame volume, no cache
DeepSeek V4-Flash, native (input only, computed)$0.0000571~$57~$476
MiniMax-M2.5, routed (billed total)$0.000204~$204~$530
GLM-5, routed (billed total)$0.000596~$596~$2,388
DeepSeek, routed (billed total)$0.000696~$696~$698

Units differ by row: the DeepSeek native line is computed input cost only, while the routed lines are total billed cost including output. On this pair, the native repeat call cost roughly one twelfth of the routed repeat call in our run.

Scale down and the verdict flips on effort, not on percentage. Volume is the multiplier, and below roughly six figures of monthly calls the engineering time costs more than the tokens it saves.

When it does not pay

Three failure modes, all visible in our own data.

Unique prompts. If no meaningful prefix repeats, there is nothing to hit. One-off personalized requests, freshly assembled RAG contexts with no shared header, and single-shot classification of varied text all sit here.

Prefixes below the vendor minimum. According to OpenAI's prompt caching guide, automatic caching applies to prompts at or above 1,024 tokens with a discounted cached-input rate. Short prompts fall under the floor and are billed in full regardless of repetition.

An access path that drops the discount. The same DeepSeek family called through the router reported zero cached tokens and paid full price twice, $0.000698 then $0.000696, while the native endpoint hit 98%. That is a result of this run, not a permanent property of routers.

And "routers lose caching" is false as a blanket claim. GLM-5, built by Z.ai, returned 3200 cached tokens through the same router with a 75% billed drop, and MiniMax-M2.5, operated by MiniMax, returned 3296 cached tokens with a 62% billed drop. The discount survives or dies per provider integration, so check your own usage fields rather than trust either generalization.

Zero cached tokens on Claude Sonnet 4.6 is expected by design here. According to Anthropic's prompt caching documentation, Claude caching requires explicit cache_control breakpoints, cache writes cost more than base input and cache reads cost much less. Our implicit-only test never sends those markers. According to Alibaba Cloud Model Studio docs, implicit context caching is documented for the native endpoint, and Moonshot offers managed context caching on its own platform. Our routed path exercised neither.

Choose this if / Avoid if

Choose caching if most requests carry a long stable prefix (a large system prompt, a fixed few-shot block, a static document corpus, a tool schema list), monthly volume runs into the hundreds of thousands of calls, and input tokens dominate output. In our prompt shape, input was 3,403 tokens against 20 output.

Avoid budgeting for caching if prompts are unique per call, the prefix sits below the vendor minimum, output is long relative to input, or you reach the model through an unverified intermediary. In that last case the discount is not guaranteed, and our routed DeepSeek row is the proof.

What these numbers do not cover

Savings are input-side only. Output tokens bill at the normal rate whether the prefix hit or missed, so a product generating long answers sees a much smaller total-bill effect than these percentages suggest. We measured cost and latency, and make no claims about output quality.

This is a single-region snapshot with a two-second gap between calls. Cache TTLs, minimum prefix sizes and storage pricing vary by vendor, and the routed results need native re-verification. For the per-token pricing behind the DeepSeek line, see our DeepSeek cache discount breakdown, and why Chinese LLM APIs are cheaper for the structural cost context.

FAQ

Is prompt caching worth it for a low-volume app? Usually not as an architecture priority. At 10,000 repeat calls a month our DeepSeek native figures work out to $4.76 versus $0.57, about $4.19 saved. Take it if it is automatic; do not redesign for it.

Does caching reduce output token costs? No. The discount applies to input tokens the provider has already processed. Output bills normally, so workloads with long generations and short prompts see little total-bill movement.

Do API routers keep the cache discount? It depends on the provider integration; verify per model. In our 2026-07-28 run GLM-5 kept a 75% billed discount and MiniMax-M2.5 kept 62% through a router, while DeepSeek showed zero cached tokens and full price on the same path.

Why did Qwen3-235B get cheaper on the second call with zero cached tokens? Because that delta is provider-price variance on the routed marketplace, not caching. Call B matched Qwen's list price at roughly $0.00032 computed, and call A billed about twice list. We report it as a pricing artifact.

Why did GPT-4o, Kimi K2 and Claude show no cache? Our design measures implicit caching only, through a routed path. That is a default-behavior finding, not a capability gap: OpenAI documents automatic caching on its own API, Anthropic requires explicit breakpoints we never sent, and Moonshot runs managed context caching natively.

The full cluster methodology and the remaining sub-questions live on the LLM prompt caching hub.

Author: Kevin Fan, Customer Success Manager. Last verified: 2026-07-28. Methodology: 17 live API calls across 8 endpoints, DeepSeek native on api.deepseek.com and all others OpenRouter-routed, cache behavior read from each API's own usage fields.

Share: