Explainer · Updated November 2026

Cache pricing explained — why repeated input costs 50× less

Every agent loop resends the same system prompt, the same file contents, the same tool outputs. Cache pricing is the mechanism that stops you paying full price for text the provider has already seen. On DeepSeek-V4-Flash it's the difference between $0.30 and $0.006 per million tokens.

The mechanics, in one diagram

# turn 1 — everything is fresh input
[system prompt][repo map][file A][user question] → all billed as input

# turn 2 — same prefix, new tail
[system prompt][repo map][file A][user question 2]
  └──────── cached prefix ────────┘ └── new ──┘
cached portion: $0.006 / 1M   new portion: standard rate

Why agents live or die by this

A coding agent with a 40K-token working set and 30 turns per task sends 1.2M input tokens. At full price that's real money; with a stable prefix and a high hit rate, most of it bills at the cached rate — the difference between a session costing dollars and costing cents.

How to make hits happen

  1. Stable prefix first. System prompt, tool definitions, repo map — identical bytes, same order, every call.
  2. Volatile content last. Timestamps, user input, fresh tool output go at the end.
  3. Don't shuffle. Randomised file ordering in context kills the prefix match.
  4. Keep sessions coherent. Cache windows are short-lived; a conversation paused for hours starts fresh.

Where to see it

The dashboard's usage detail exposes cached vs fresh input tokens per request, so you can verify the hit rate instead of assuming it. If hits are near zero on a stable workload, the prefix is changing — usually a timestamp someone left in the system prompt.

FAQ

What exactly is a cache hit?

The provider stores the processed prefix of your prompt. If a later request starts with the same prefix, those tokens are billed at the cached rate instead of the fresh-input rate.

Why does my cache hit rate stay at zero?

Usually because the prompt prefix changes between calls — timestamps, shuffled context, a different system prompt. Keep the stable parts first and identical, and vary only the tail.

Does this apply to other models here?

DeepSeek-V4-Flash is where the effect is largest and documented ($0.006/1M on hits vs $0.30 fresh). Check per-model behaviour in the dashboard's usage detail.

Test cache pricing on $5

One key for DeepSeek, Kimi, Qwen and GLM. Card payment, USD, $5 to start.

Buy $5 of usage