DeepSeek API Cost Control: Cache, Off-Peak, Routing

Most teams pay DeepSeek two to five times more than they need to, and none of the waste comes from the sticker price. It comes from ignoring three levers the API already exposes: automatic context caching that turns repeated input tokens into the cheapest tokens on the platform, an off-peak window that halves every rate on the sheet, and model routing that stops spending flagship output rates on tasks a flash model handles. Used together on cache-heavy agent workloads, they cut per-request cost by roughly two-thirds to an order of magnitude, depending on workload shape. This guide walks through each lever with the current price sheet, then does the arithmetic on a realistic agent request.

This site is an independent analysis publication. It is not affiliated with DeepSeek or Google.

The December 2026 Price Sheet in One Table

DeepSeek’s official pricing page lists two production models, deepseek-flash and deepseek-v4-pro, with peak and off-peak rates. The current sheet, as published on the official pricing page (retrieved December 4, 2026):

Billing item deepseek-flash off-peak deepseek-flash peak deepseek-v4-pro off-peak deepseek-v4-pro peak
Input, cache hit (per 1M tokens) $0.003 $0.006* $0.022 $0.044*
Input, cache miss (per 1M tokens) $0.15 $0.30* $0.66 $1.32*
Output (per 1M tokens) $0.60 $1.20 $1.98 $3.96

* Peak rates are 2× off-peak rates across all billing items per the pricing page’s note; the peak figures for cache-hit and cache-miss input follow from that stated multiplier.

Two structural facts matter more than any single number. First, off-peak rates are half of peak rates, and the peak window is defined in UTC: 01:00–04:00 and 06:00–10:00 UTC, Monday through Friday, excluding Chinese public holidays. Everything else — evenings, nights, weekends, and Chinese holidays in full — bills at off-peak. Second, a cache hit on deepseek-flash costs $0.003 per million tokens versus $0.15 on miss — a 50× reduction. On v4-pro the hit-to-miss ratio is 30×. No other optimization in this guide comes close to those multipliers.

Lever 1: Cache Hits Are the Cheapest Tokens on the Platform

DeepSeek’s context caching runs automatically: when a request’s input prefix matches recently processed content, the repeated portion bills at the cache-hit rate, with no configuration and no cache-management fee. The mechanism was introduced as disk-based context caching, and the platform’s model pages now advertise auto-caching with reduced hit pricing as a default feature.

The engineering task is therefore not “enable caching” — it is structure requests so the cacheable part is a clean prefix. In practice:

  • Put static content first: system prompt, tool schemas, product documentation, few-shot examples. Keep them byte-identical across requests; a changed token invalidates the prefix from that point.
  • Put dynamic content last: user message, retrieved context, conversation tail. Anything that varies per request belongs after the stable block.
  • Stop injecting per-request noise into the prefix — timestamps, random IDs, rotating instructions all break the match and silently re-bill the whole prefix at miss rates.

Cache entries persist for hours after last use, so a workload that repeats the same system block across a working day keeps hitting it even with gaps between requests. If your prefix changes daily, cache benefits concentrate within the day — which is exactly when most request volume happens anyway.

Lever 2: Schedule Around the Off-Peak Window

The peak window is 01:00–04:00 and 06:00–10:00 UTC on weekdays. That is 09:00–12:00 and 14:00–18:00 Beijing time — Chinese business hours — and, notably, 8:00–11:00 PM and midnight–5:00 AM US Eastern. If your team ships from North America, part of your interactive workday falls inside DeepSeek’s peak.

What schedules well into off-peak:

  • Batch jobs. Embedding backfills, document ingestion, evaluation runs, report generation — anything queueable belongs off-peak, where every rate halves.
  • Agent background steps. Multi-step agent loops where only the final answer is user-facing can run their intermediate steps off-peak at 50% of the interactive rate.
  • Weekly bulk work — re-ranking a catalog, refreshing summaries — belongs on weekends, which are off-peak in full.

What does not move: latency-sensitive interactive traffic. Forcing a chat product’s peak-usage hours into off-peak is not an option when those hours are your users’ hours; that traffic should be optimized with Levers 1 and 3 instead. One caveat: for teams running their own queue infrastructure, peak-window scheduling is a one-line cron change — the cheapest cost fix in this guide, and often the most neglected.

Lever 3: Route by Difficulty, Not by Habit

The flash model bills output at $0.60 off-peak against v4-pro at $1.98 — a 3.3× gap — and input at $0.15 versus $0.66. On tasks where flash is sufficient, using v4-pro is a 3–4× voluntary surcharge. The routing question is empirical: which fraction of your traffic actually needs the flagship?

Route with a measured policy, not a vibe:

  • Classify by task, not by user. Extraction, classification, templated generation, and tool-call planning are flash-class workloads. Deep reasoning, hard code review, and novel multi-step planning are v4-pro candidates.
  • Use escalation, not universal flagship. Run flash first with a cheap confidence signal; escalate failures to v4-pro. The reasoning-budget knob documented in our guide to tuning DeepThink-style thinking time applies here too — reasoning effort is an integer you can spend only where it pays.
  • Count reasoning tokens as output. DeepSeek bills on total input plus output tokens, and reasoning content counts as output. A thinking-heavy v4-pro call can emit thousands of reasoning tokens before the answer — at $1.98–$3.96 per million, uncontrolled thinking is the fastest way to blow the routing savings.

A Worked Example: One Agent Request, Four Configurations

Consider a representative agent request (all numbers illustrative — the rates are real, the workload is hypothetical):

  • 12,000 tokens of stable context: system prompt, tool schemas, style guide
  • 10,000 tokens of fresh input: retrieved documents plus the user’s task
  • 1,500 output tokens, of which 800 are reasoning

Per the table above, four configurations (cost per 1,000 such requests):

Configuration Input cost Output cost Total per 1k requests
v4-pro, peak, no cache benefit 22k × $1.32 = $29.04 1.5k × $3.96 = $5.94 $34.98
v4-pro, off-peak, no cache benefit 22k × $0.66 = $14.52 1.5k × $1.98 = $2.97 $17.49
flash, peak, no cache benefit 22k × $0.30 = $6.60 1.5k × $1.20 = $1.80 $8.40
flash, off-peak, 12k cached 12k × $0.003 + 10k × $0.15 = $1.54 1.5k × $0.60 = $0.90 $2.44

The spread from worst to best configuration is 14× for the identical request. No single lever produces that; the cache cut accounts for the largest share, off-peak halves what remains, and routing removes the flagship surcharge. In real deployments the achievable multiple depends on workload shape — cache-heavy pipelines with large stable prefixes see the biggest wins; short, fresh-input requests see less — but the direction holds for any workload with a repeated prefix, and most agent workloads have one.

The same arithmetic explains why the infrastructure layer matters even when you do not control the API bill: DeepSeek’s own KV-cache compression, which we analyzed in the V4.1 Flash agent-economics breakdown, is the supply-side version of this same lever — make the repeated context cheap to serve, and the savings compound across every request.

What Not to Do

  • Do not disable reasoning to save money on hard tasks. The failure cost of a wrong agentic action dwarfs the token savings; spend reasoning effort deliberately per task class instead of zeroing it globally.
  • Do not break the prefix to game caching. Reordering stable content, appending dynamic data mid-prefix, or “freshening” system prompts per request re-bills the whole block at miss rates. Deterministic prefixes are worth real money.
  • Do not route everything to flash by default. The right comparison is quality-adjusted: flash at $0.60 that fails twice and escalates can cost more than v4-pro at $1.98 that succeeds once. Measure escalation rates before declaring the cheap tier “good enough.”
  • Do not build on pricing invariants. DeepSeek’s sheet has moved repeatedly this year — the October price divergence showed hikes and cuts landing in the same week, which we covered in the pricing divergence analysis. Pin no architecture to a specific rate; pin it to the ratio structure (caching discount, peak multiplier, tier gap), which has been stable even as absolute prices moved.

The Checklist

  1. Audit your largest recurring prompt: what fraction of its tokens are byte-identical across requests?
  2. Restructure prompts into stable-prefix-first form; move timestamps and per-request IDs out of the prefix.
  3. Move queueable work into the off-peak window (01:00–04:00 and 06:00–10:00 UTC are the only weekday peak blocks); weekends are off-peak in full.
  4. Add flash-first routing with escalation for flash-class tasks; keep v4-pro for measured cases where it wins on quality.
  5. Budget reasoning effort per task class and monitor reasoning tokens as a separate output-cost line.
  6. Re-check the official pricing page monthly; re-run your cost model when the sheet moves.

The order matters less than the habit of measuring: track cost per completed task — not per request — and the three levers become obvious in your own dashboards within a week.

Sources