DeepSeek API cost planning

DeepSeek API Pricing & Token Cost Calculator

See what DeepSeek costs per 1M tokens, then estimate your own requests with your real cache-hit rate and peak-hour billing before you commit traffic to it.

Quick answer: DeepSeek V4 Flash costs $0.22 per 1M input tokens and $0.66 per 1M output tokens off-peak, and cache hits cost only $0.007. Peak-hour rates are roughly double. The API is pay-as-you-go, not free; only the web chat is free.

Rates last updated 2026-09-29

Count Tokens Locally

Request cost = cache-miss input + cache-hit input + output — and since 16 August 2026, which hour you send it in. DeepSeek now bills roughly double during two daily UTC windows (01:00–04:00 and 06:00–10:00 UTC, weekdays). This calculator lets you toggle peak vs. off-peak directly, rather than quoting one rate and hoping it's the one you'll actually pay.

DeepSeek API pricing per 1M tokens

DeepSeek charges separately for new input (cache miss), repeated input (cache hit), and output. Off-peak rates apply at all times except the peak windows (01:00–04:00 and 06:00–10:00 UTC, weekdays), when every rate is roughly double.

ModelWindowInput (cache miss)Input (cache hit)Output
DeepSeek V4 Flashoff-peak$0.22$0.007$0.66
DeepSeek V4 Flashpeak$0.44$0.014$1.32
DeepSeek V4 Prooff-peak$0.66$0.022$1.98
DeepSeek V4 Propeak$1.32$0.044$3.96

USD per 1M tokens. Last updated 2026-09-29. DeepSeek changes prices often, so confirm on DeepSeek's official pricing page before budgeting production spend.

What DeepSeek costs in practice

Cost of 1,000 requests for four common workloads, using the token shapes from the example workloads in the calculator below.

WorkloadDeepSeek V4 Flash off-peakDeepSeek V4 Flash peakDeepSeek V4 Pro off-peak
Support chat reply$0.3420$0.6840$1.03
Document extraction$1.33$2.66$3.99
Coding agent step$1.23$2.46$3.7
RAG answer$0.5260$1.05$1.58

Estimate a DeepSeek request

Currency

Set your request shape once — both models and both pricing windows update instantly below.

Billing window
01:00–04:00 and 06:00–10:00 UTC, weekdays
Example workloads
55%

How much of your input is a repeated prefix (system prompt, chat history, retrieved docs) versus brand-new text each call.

V4 Flash / mo
$17.1
$0.000342/req
V4 Pro / mo
$51.34
$0.001027/req
How this is calculated (V4 Flash, off-peak)
cache_miss_tokens = 1400 × 45% = 630
cached_tokens = 1400 × 55% = 770
input_cost + cache_cost + output_cost = $0.000342 per request
× 50,000 requests/mo = $17.1 per month
Recommendation

At this request shape, V4 Flash is about 67% cheaper than V4 Pro ($17.1 vs $51.34 per month). Worth paying the Pro premium if your evaluations show Flash genuinely failing on this task — not simply because Pro is the newer or larger option.

Choosing within the DeepSeek V4 family

DeepSeek collapsed its lineup down to two models. Both share a 1M-token context window and support a thinking and a non-thinking mode under the same model ID, so the real decision is which tier, not which mode — reasoning depth is a request-time setting, not a separate model to route to.

DeepSeek V4 Flash
Default workhorse — cheap, fast, 1M context
1M in / 384K out
DeepSeek V4 Pro
Flagship tier for hard reasoning and agentic coding
1M in / 384K out

Monthly cost across every tier and window

Same request shape as above, sorted cheapest to priciest. Rates per 1M tokens.

Model / windowRates (in / cache / out)Per requestPer month
DeepSeek V4 Flash (off-peak)$0.22 / $0.007 / $0.66$0.000342$17.1
DeepSeek V4 Flash (peak)$0.44 / $0.014 / $1.32$0.000684$34.2
DeepSeek V4 Pro (off-peak)$0.66 / $0.022 / $1.98$0.001027$51.34
DeepSeek V4 Pro (peak)$1.32 / $0.044 / $3.96$0.002053$102.67

Covers standard text input, eligible cached reads, and generated text only — not image inputs, tool calls, or other separately billed features.

What goes into a DeepSeek request

The message a user types is often the smallest part of what actually gets billed. System instructions, conversation history, retrieved documents, and tool schemas are all assembled into the final request before it ever reaches the model — count that assembled request, not the text box.

Cache-miss input

New prompt content the API hasn't seen as a matching prefix before. Every retrieved passage, every fresh instruction, and the first turn of any conversation lands here at the standard input rate.

Example: A RAG pipeline that stuffs three new documents into context each call can rack up cache-miss tokens far faster than the visible chat message suggests.

Trap: Assuming a prompt 'looks the same' each time is enough to guarantee a cache hit — a single changed character near the start of the prefix breaks the match.

Cache-hit input

The portion of input tokens matching a previously seen prefix, billed at a steep discount. DeepSeek's automatic caching rewards stable system prompts and consistent ordering — reusable content first, variable content last.

Example: A support bot with a fixed system prompt and growing chat history can push a large share of later-turn input into cache-hit pricing.

Trap: Putting the variable, per-user part of a prompt before the stable instructions, which prevents the stable part from ever matching a cached prefix.

Generated output

Output is priced well above input on both tiers, and thinking mode's visible reasoning tokens count toward this total the same as any other output token.

Example: Leaving thinking mode on for a simple classification task can multiply output tokens for no quality benefit on that task.

Trap: Not setting a realistic output ceiling, so a small share of unusually long responses dominates the average monthly bill.

Billing window

Since 16 August 2026, the same request costs roughly double during DeepSeek's peak UTC hours compared to off-peak — a dimension no other major provider currently prices this way.

Example: A nightly batch job scheduled at 02:00 UTC lands inside a peak window and pays double what the same job would cost run two hours later.

Trap: Forecasting a monthly bill using only the off-peak rate because that's the number most blog posts lead with.

Worked scenario: a documentation Q&A bot

A docs assistant sends a fixed 800-token system prompt plus 2,400 tokens of retrieved documentation and chat history on every call, and generates a 300-token answer with V4 Flash. The system prompt and the first half of the retrieved context repeat often enough to hit the cache about 55% of the time; the rest is new each call. It runs 40,000 times a month, entirely outside peak hours.

input = 3,200 tokens, 55% cache hit
cache-miss = 1,440 tokens × $0.22/M = $0.0003168
cache-hit = 1,760 tokens × $0.007/M = $0.0000123
output = 300 tokens × $0.66/M = $0.0001980
per request ≈ $0.000527 → ≈ $21.08/month at 40,000 requests

Without the cache hit, that same request would cost roughly $0.000902, or about $36.08/month — the caching discount alone accounts for roughly 42% of this bot's monthly spend, which is why keeping the stable part of a prompt first and consistent matters more on DeepSeek than the raw per-token rate suggests.

Common mistakes when estimating DeepSeek cost

  • Quoting only the off-peak rate for a workload that actually runs around the clock, understating real spend by roughly half during peak hours.
  • Assuming any repeated-looking prompt is a guaranteed cache hit, rather than confirming the exact prefix matched on request.
  • Migrating deepseek-reasoner traffic straight to deepseek-v4-pro instead of V4 Flash's thinking mode, doubling cost for no capability gain.
  • Leaving thinking mode enabled for simple classification or extraction tasks where the extra reasoning tokens add cost without improving output.
  • Comparing DeepSeek's rate card against a competitor's flagship model instead of that competitor's own budget tier.

Other options worth knowing

Third-party hosts (OpenRouter, Together, Fireworks)
Different uptime and rate tradeoffs

The same open DeepSeek weights are served by several third-party hosts alongside DeepSeek's own API, often at broadly similar per-token rates but with different uptime guarantees, regional latency, and rate limits.

When to use it
Production traffic that needs multi-provider failover or a region DeepSeek's own API serves poorly.
Watch out for
Rates and feature support (caching, thinking-mode controls) can lag behind DeepSeek's first-party API.
Self-hosting the open weights
Trades API cost for infrastructure cost

DeepSeek publishes open model weights, so a team with enough GPU capacity can run inference in-house instead of paying per token at all — at the cost of owning the serving stack, scaling, and reliability engineering.

When to use it
Very high, predictable volume where infrastructure cost is comfortably lower than metered API spend.
Watch out for
Serving a frontier-scale model well is a genuine engineering project, not a one-time setup cost.
Thinking mode as a per-request switch
Pay for depth only when needed

Both V4 tiers expose thinking and non-thinking mode on the same model ID, so reasoning depth is a request-time parameter rather than a model choice that locks you into a price tier.

When to use it
Mixed workloads where most calls are simple but a minority genuinely benefit from visible chain-of-thought.
Watch out for
Thinking-mode output tokens are billed the same as any other output token, so turning it on everywhere by default quietly inflates the bill.
Batch and off-peak scheduling
Free savings for non-urgent work

Any job that doesn't need to run the moment it's triggered can be scheduled outside DeepSeek's peak UTC windows to pay the off-peak rate automatically, with zero change to the model or prompt.

When to use it
Nightly reports, backfills, evaluation runs, and other work with no human waiting on the result.
Watch out for
Peak windows are defined in UTC, so a schedule that looks safely 'overnight' in one timezone can still land inside a peak window in another.

Getting DeepSeek running in your own workflow

The numbers above are only useful once you actually have a key and somewhere to send requests. Here's exactly how that goes, including the coding-tool setup people ask about most.

Getting an API key

Create an account on DeepSeek's own platform to generate a key billed at the rates modeled above, or get one through a third-party host (OpenRouter, Together, Fireworks) if you'd rather consolidate billing with other models you already call. Either way, treat the key like any other API secret — load it from an environment variable, never commit it to a repo.

Using it in Cursor, Claude Code, or a similar tool

Coding assistants that support custom or OpenAI-compatible endpoints can point at DeepSeek directly — set the base URL and API key in the tool's model settings, pick V4 Flash for routine edits, and reserve V4 Pro for the harder refactors and multi-file agentic steps where Flash's answers start slipping.

Sizing a coding-agent session before you rely on it daily

Agentic coding sessions run more input tokens than a simple chat turn — file context, tool output, and prior steps all get resent on every turn. Load the Coding agent step preset in the calculator above, set your monthly volume to a realistic number of turns for how you'd actually use it (not just one test session), and compare V4 Flash against V4 Pro before deciding which one becomes your default in the editor.

Embed this calculator

Drop the DeepSeek calculator into your own docs or internal wiki with a single iframe. The embedded version keeps a small credit link back to Apex Tech Journal.

<iframe
  src="https://apextechjournal.com/embed/deepseek-token-calculator?ref=widget"
  width="100%"
  height="440"
  style="border:0;border-radius:12px;"
  loading="lazy"
  title="DeepSeek Token Calculator by Apex Tech Journal"
></iframe>

DeepSeek Token Calculator FAQ

DeepSeek bills per token. Off-peak, DeepSeek V4 Flash costs $0.22 per 1M cache-miss input tokens, $0.007 per 1M cache-hit input tokens, and $0.66 per 1M output tokens. DeepSeek V4 Pro costs $0.66 / $0.022 / $1.98 per 1M on the same three lines. During peak hours (01:00–04:00 and 06:00–10:00 UTC, weekdays) every rate is roughly double. The pricing table at the top of this page lists every rate.
Check these numbers against DeepSeek's own docs