DeepSeek API Pricing (2026): Models, Cost per Token, and How to Call It

DeepSeek API pricing after the August 16, 2026 repricing: deepseek-v4-flash runs $0.22/1M input off-peak ($0.44 peak) and $0.66/1M output off-peak ($1.32 peak); deepseek-v4-pro runs $0.66/$1.98 off-peak and $1.32/$3.96 peak. Peak hours are 01:00-04:00 and 06:00-10:00 UTC. This page covers the V4-Flash-0731 and V4-Pro-0813 checkpoints, exact per-1M pricing with cache-hit rates, context windows, benchmarks, an OpenAI-SDK call, and how running DeepSeek on Morph compares.

August 21, 2026 ยท 2 min read
DeepSeek API Pricing (2026): Models, Cost per Token, and How to Call It

Last updated: August 21, 2026. Every rate on this page was checked against DeepSeek's official pricing docs (api-docs.deepseek.com) on that date.

DeepSeek API pricing in 2026 is per million tokens, split by cache state and, since August 16, 2026, by time of day. Off-peak, deepseek-v4-flash costs $0.22/1M input on a cache miss, $0.007/1M on a cache hit, and $0.66/1M output. deepseek-v4-pro costs $0.66/1M input and $1.98/1M output. Peak rates (01:00-04:00 and 06:00-10:00 UTC) are double. Both models expose a 1M-token context behind an OpenAI-compatible endpoint at api.deepseek.com and now serve the V4-Flash-0731 and V4-Pro-0813 checkpoints.

$0.22/1M
deepseek-v4-flash input off-peak (cache miss)
$0.66/1M
deepseek-v4-flash output off-peak
1M tokens
API context window
2x
Peak rate multiplier (01:00-04:00, 06:00-10:00 UTC)
Quick answer

DeepSeek API pricing in 2026 is per million tokens with peak and off-peak rates since August 16: deepseek-v4-flash costs $0.22/1M input (cache miss) and $0.66/1M output off-peak, doubling to $0.44 and $1.32 at peak; deepseek-v4-pro costs $0.66/1M input and $1.98/1M output off-peak, doubling to $1.32 and $3.96 at peak. Both models expose a 1M-token context with a 384K maximum output. To call it, point any OpenAI SDK at base_url https://api.deepseek.com, set your DeepSeek key, and pass deepseek-v4-flash or deepseek-v4-pro as the model.

The DeepSeek API in One Paragraph

DeepSeek is an AI lab that ships open-weight Mixture-of-Experts models and a hosted API to call them. The API endpoint is api.deepseek.com and it speaks the OpenAI wire format, so any OpenAI SDK works after you change the base URL and model name. Two models are live: deepseek-v4-flash for cost-sensitive workloads (the DeepSeek-V4-Flash-0731 checkpoint, GA since July 31, 2026) and deepseek-v4-pro for higher capability (DeepSeek-V4-Pro-0813, GA since August 13, 2026).

Both API models carry a 1M-token context window. Pricing is per million tokens, split by whether the input prefix is a cache hit or a cache miss, and since August 16, 2026 by peak vs off-peak hours. A cache hit (a repeated system prompt or few-shot block already in DeepSeek's context cache) is priced roughly 31x lower than a cache miss on flash.

The open-weight side is where the architecture lives. DeepSeek-V3.2-Exp is 685B total MoE parameters under an MIT license, and DeepSeek-R1 is 671B total with 37B activated. These weights are downloadable for self-hosting, which is the main reason DeepSeek shows up in cost comparisons against closed APIs.

What changed in mid-2026

Three things landed in quick succession. The deepseek-chat and deepseek-reasoner aliases retired on 2026/07/24; you call deepseek-v4-flash with a reasoning effort level (low/high/max) instead. The Flash checkpoint rolled to V4-Flash-0731 on July 31 and the Pro checkpoint to V4-Pro-0813 on August 13, both with large agentic gains. And on August 16 DeepSeek repriced the API: peak/off-peak billing with increases of roughly 50% to 1,100% depending on the line item. Budgets written against the old flat rates are stale.

DeepSeek Models and Pricing

The table below lists the DeepSeek API models with context and per-1M pricing at both rate periods, effective August 16, 2026. Peak hours are 01:00-04:00 and 06:00-10:00 UTC; the other 17 hours bill off-peak at exactly half the peak rate.

DeepSeek API models (per 1M tokens, off-peak / peak)
ModelContextInput (cache miss)Input (cache hit)Output
deepseek-v4-flash1M$0.22 / $0.44$0.007 / $0.014$0.66 / $1.32
deepseek-v4-pro1M$0.66 / $1.32$0.022 / $0.044$1.98 / $3.96
deepseek-v4-flash-vision-exp1M$0.22 / $0.44$0.007 / $0.014$0.66 / $1.32

All three models cap output at 384K tokens per request. deepseek-v4-flash-vision-exp is an experimental vision-capable variant priced identically to flash.

deepseek-v4-flash is the default for most work. It serves the V4-Flash-0731 checkpoint, one of the cheapest 1M-context models with frontier-adjacent coding scores. deepseek-v4-pro (V4-Pro-0813) costs exactly 3x flash on every line item and is the choice when flash misses on harder reasoning. Independent scoring narrows that case: Artificial Analysis puts Pro-0813 at 53 on its Intelligence Index, 1 point above Flash-0731's 52.

The legacy aliases retired on 2026/07/24

deepseek-chat and deepseek-reasoner were not separate models. They were the non-thinking and thinking modes of deepseek-v4-flash, exposed under distinct names for compatibility. Since the 2026/07/24 deprecation, you call deepseek-v4-flash and set a reasoning effort level (low, high, or max) in the request body.

Cache Hit vs Cache Miss Pricing

DeepSeek prices input tokens differently depending on whether the prefix is already in its context cache. A cache hit means a leading chunk of your prompt (system instructions, few-shot examples, a long document you keep re-sending) matches a recently processed prefix. DeepSeek charges the cache-hit rate for those tokens and the cache-miss rate for the rest.

Input pricing by cache state (per 1M tokens, off-peak)
ModelInput (cache hit)Input (cache miss)Hit vs miss ratio
deepseek-v4-flash$0.007$0.22~31x cheaper on hit
deepseek-v4-pro$0.022$0.6630x cheaper on hit

The practical effect is large for agent workloads. A coding agent re-sends the same system prompt and tool definitions on every turn. Those tokens land as cache hits, so the marginal input cost of each turn drops toward the cache-hit rate. Structure prompts so the stable prefix comes first and the per-request content comes last to maximize cache hits.

The tradeoff: cache behavior is not guaranteed across every request, and pricing assumes a recently seen prefix. Cold prefixes, frequently changing system prompts, and one-shot calls pay the full cache-miss rate. Do not budget your whole input at the cache-hit price.

How prefix matching and block alignment decide a hit, how DeepSeek's cache-hit rate compares with Anthropic, OpenAI, Gemini, and Kimi, and why a model switch mid-session resets the cache: see prompt caching.

deepseek-chat vs deepseek-reasoner

deepseek-chat answered directly. deepseek-reasoner emitted a chain-of-thought before the answer, which raises accuracy on math and multi-step coding at the cost of more output tokens and higher latency. Both were modes of the same underlying deepseek-v4-flash model, and both legacy names retired on 2026/07/24. The replacement is the reasoning effort parameter on deepseek-v4-flash and deepseek-v4-pro: low, high, or max.

deepseek-chat (non-thinking)

Direct answers, fewer output tokens, lower latency. Use for edits, formatting, summarization, and straightforward generation where the answer does not need a reasoning trace.

deepseek-reasoner (thinking)

Emits a reasoning trace before the answer. Higher accuracy on AIME-style math and multi-step debugging, but more output tokens and slower. Use for hard reasoning where the extra cost pays off.

Because higher effort produces more output tokens, its effective cost per answer is higher even at the same $0.66/1M off-peak output rate. Reserve high and max effort for prompts where a chain-of-thought measurably improves the result, and route easy prompts to low effort. A router that classifies difficulty handles this split automatically.

Context Window and Architecture

The hosted API models expose a 1M-token context window. The open-weight checkpoints behind the line expose smaller windows: DeepSeek-V3.2-Exp supports 163,840 tokens (160K) and DeepSeek-R1 supports 128K. If you self-host the weights, plan around the checkpoint window, not the 1M API figure.

DeepSeek open-weight checkpoints
CheckpointTotal paramsContextLicenseReleased
DeepSeek-V3.2-Exp685B (MoE)163,840 (160K)MITNov 17, 2025
DeepSeek-R1671B / 37B active128KMITJan 20, 2025

DeepSeek-V3.2-Exp introduces DeepSeek Sparse Attention (DSA), a sparse attention mechanism for long-context training and inference efficiency, per its Hugging Face model card. Sparse attention is what makes a 160K-token window practical on a 685B-parameter MoE without the quadratic cost of dense attention at that length.

DeepSeek-R1 is a Mixture-of-Experts model with 671B total parameters and 37B activated per token. Only the activated experts run on each forward pass, so inference cost tracks the 37B active count rather than the 671B total. Both checkpoints are MIT-licensed, which permits commercial use and self-hosting. R1 was the first model behind deepseek-reasoner (January 20, 2025); that endpoint moved through R1-0528, V3.1, and V3.2 thinking modes before aliasing to deepseek-v4-flash and retiring on July 24, 2026.

Self-hosting the current line is a different budget. DeepSeek V4 Pro at 1.6T parameters needs an 8-GPU Blackwell node, and independent InferenceX runs put it at 216 tok/s for one user on B300 and 40 tok/s per user at concurrency 64 on B200. The DeepSeek V4 Pro serving benchmarks and self-host cost math work through what a rented 8x B200 node costs per million tokens against calling V4 Flash.

For a broader treatment of how context length affects cost and quality, see LLM context windows.

Benchmarks

Published scores place DeepSeek-V3.2-Exp in the top open tier for coding and reasoning. The table reports model-card figures. Treat cross-model comparisons cautiously, since harness and prompt differences move scores by several points.

DeepSeek benchmark scores (from model cards)
BenchmarkDeepSeek-V3.2-ExpDeepSeek-R1
SWE-bench Verified67.849.2
LiveCodeBench74.1n/a
AIME (2025 / 2024)89.3 (2025)79.8 (2024)
MMLU-Pro / MMLU85.0 (Pro)90.8 (MMLU)
Codeforces rating21212029
GPQA-Diamond79.9n/a

The SWE-bench Verified jump from 49.2 (R1) to 67.8 (V3.2-Exp) is the headline for coding agents: a 18.6-point gain on real GitHub issue resolution between the January 2025 reasoning checkpoint and the November 2025 release. DeepSeek-R1 still posts strong pure-math numbers, with 97.3 on MATH-500 and 79.8 on AIME 2024.

For how these scores stack against other open models, see the best open-source coding model in 2026.

OpenAI-Compatible Calls

The DeepSeek API is a drop-in for the OpenAI SDK. Change base_url to https://api.deepseek.com, set your DeepSeek key, and pass deepseek-v4-flash or deepseek-v4-pro as the model. Streaming, function calling, and the message array work as they do against OpenAI.

Call the DeepSeek API with the OpenAI Python SDK

from openai import OpenAI

client = OpenAI(
    api_key="YOUR_DEEPSEEK_API_KEY",
    base_url="https://api.deepseek.com",  # OpenAI-compatible endpoint
)

resp = client.chat.completions.create(
    model="deepseek-v4-flash",  # or "deepseek-v4-pro"
    messages=[
        {"role": "system", "content": "You are a senior Python engineer."},
        {"role": "user", "content": "Write a retry decorator with exponential backoff."},
    ],
)

print(resp.choices[0].message.content)

The same shape works from cURL. Set the Authorization header to your key and POST the OpenAI-style body to the chat completions path.

Call the DeepSeek API with cURL

curl https://api.deepseek.com/chat/completions \
  -H "Authorization: Bearer YOUR_DEEPSEEK_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "deepseek-v4-flash",
    "messages": [
      {"role": "user", "content": "Explain MoE routing in two sentences."}
    ]
  }'

Because the contract is OpenAI-shaped, a single OpenAI-compatible client can target DeepSeek, OpenAI, or an LLM router by swapping the base URL. Any OpenAI-compatible endpoint follows the same format, so the call changes only the host and model name.

How DeepSeek Pricing Compares

DeepSeek's value is the combination of a 1M-token context and per-1M prices under most hosted frontier APIs. That gap narrowed on August 16, 2026, when DeepSeek raised prices by 50% to 1,100% across line items. The table below sets the new off-peak rates for deepseek-v4-flash and deepseek-v4-pro against two other open-weight APIs to anchor the range. Closed-model comparisons are omitted where verified numbers were not available.

DeepSeek vs other open-weight hosted APIs (per 1M tokens)
ModelInputOutputContext
deepseek-v4-flash (off-peak)$0.22$0.661M
deepseek-v4-pro (off-peak)$0.66$1.981M
MiniMax-M2$0.30$1.20~196K
GLM-4.6$0.60$2.20200K

Off-peak, deepseek-v4-flash at $0.66/1M output still undercuts MiniMax-M2 ($1.20/1M) and GLM-4.6 ($2.20/1M) while carrying a larger 1M-token context, but the pre-August 16 4x-8x gap is gone. At peak, flash output ($1.32/1M) costs more than MiniMax-M2. deepseek-v4-pro off-peak output ($1.98/1M) now sits above MiniMax-M2 and just under GLM-4.6, and its peak rate ($3.96/1M) is above both. The cache-hit input rate ($0.007/1M on flash off-peak) still helps repeated-prefix workloads, and shifting batch jobs to the 17 off-peak hours halves every rate.

The tradeoff is operational, not headline price. A single-provider API means a single point of rate limits, region, and capacity. Routing across providers through one endpoint hedges that. See LLM cost optimization for the full set of levers (caching, routing, batching, model tiering). The closest first-party competitor on price is Alibaba's Model Studio, covered in the Qwen API guide, where qwen3.7-plus lists at $0.40/$1.60 with no peak-hour multiplier.

Monthly Cost Scenarios

The table prices three usage profiles on deepseek-v4-flash over a 30-day month, cache misses assumed throughout. Light and medium assume 1,000 input + 300 output tokens per request (a short chat or extraction call). Heavy assumes an agent workload at 3,000 input + 1,000 output tokens per request. The Morph column prices the same volume on Morph's flat-rate hosted DeepSeek V4 Flash for reference.

Monthly cost by usage profile (30 days, deepseek-v4-flash, cache-miss input)
ScenarioOff-peakPeakMorph flat rate
Light: 100 req/day (3M in, 0.9M out)$1.25$2.51$0.61
Medium: 1,000 req/day (30M in, 9M out)$12.54$25.08$6.10
Heavy: 10,000 req/day (900M in, 300M out)$396$792$191.40

The arithmetic behind the first off-peak cell: 3M input tokens at $0.22/1M is $0.66, plus 0.9M output tokens at $0.66/1M is $0.594, totaling $1.25. Every other cell is the same two multiplications at that column's rates. Cache hits on a stable system prompt pull the input side down toward $0.007/1M, and shifting the workload into the 17 off-peak hours is a flat 2x saving over peak.

DeepSeek on the Official API vs on Morph

The official DeepSeek API is not the only way to call a DeepSeek model over the OpenAI wire format. Morph serves a fast DeepSeek variant, DeepSeek V4 Flash (morph-dsv4flash), on custom inference kernels behind the same OpenAI-compatible contract. You change the base URL to https://api.morphllm.com/v1 and the model name to morph-dsv4flash; the request and response shapes are unchanged.

Morph's hosted DeepSeek V4 Flash (the 0731 checkpoint) carries a 1M-token context and prices at $0.1234375/1M input and $0.3475/1M output, flat, all hours. Since DeepSeek's August 16 repricing, that flat rate sits below DeepSeek's own off-peak cache-miss rates ($0.22 input, $0.66 output) and at less than a quarter of its peak rates. There is no peak window and no cache state to reason about.

DeepSeek V4 Flash: official DeepSeek API vs Morph
PathModel nameInput (per 1M)Output (per 1M)Context
DeepSeek API (off-peak)deepseek-v4-flash$0.22 (miss) / $0.007 (hit)$0.661M
DeepSeek API (peak)deepseek-v4-flash$0.44 (miss) / $0.014 (hit)$1.321M
Morph API (all hours)morph-dsv4flash$0.1234375 (flat)$0.34751M

The one case where the official API wins on marginal cost is a prompt dominated by a large stable prefix that hits DeepSeek's context cache on most turns, priced at $0.007/1M off-peak. For everything else, Morph's flat $0.1234375/$0.3475 is now the cheaper line: output costs 58% less than DeepSeek off-peak and 79% less than peak. Both are OpenAI-compatible, so switching between them is a base-URL and model-name change.

Morph serves DeepSeek V4 Flash alongside other open-weight models (GLM-5.2, Qwen 3.5, MiniMax M3) through one key. See fast general coding models for the full lineup, DeepSeek V4 for the open-weight architecture, and Morph pricing for per-token rates across every model.

Getting an API Key

Create a DeepSeek platform account, open the API keys section, and generate a key. Set it as the api_key in the OpenAI SDK or as an Authorization Bearer header, then point base_url at https://api.deepseek.com. Billing is usage-based at the per-1M-token prices above, metered on input (split by cache state) and output.

Frequently Asked Questions

How much does the DeepSeek API cost?

Since August 16, 2026 DeepSeek bills peak and off-peak rates. Off-peak, deepseek-v4-flash costs $0.22 per 1M input tokens on a cache miss, $0.007 per 1M on a cache hit, and $0.66 per 1M output tokens; deepseek-v4-pro costs $0.66, $0.022, and $1.98. Peak rates (01:00-04:00 and 06:00-10:00 UTC) are exactly double: flash $0.44/$0.014/$1.32, pro $1.32/$0.044/$3.96. Both models have a 1M-token context window. Prices reflect the August 16, 2026 repricing.

What is the difference between deepseek-chat and deepseek-reasoner?

deepseek-chat was the non-thinking (direct answer) mode and deepseek-reasoner the thinking (chain-of-thought) mode of deepseek-v4-flash. Both legacy aliases deprecated on 2026/07/24 at 15:59 UTC. You now call deepseek-v4-flash and set a reasoning effort level (low, high, or max) in the request instead of switching model names.

What is the DeepSeek context window?

The deepseek-v4-flash and deepseek-v4-pro API models both expose a 1M-token context window. The open-weight checkpoints differ: DeepSeek-V3.2-Exp supports 163,840 tokens (160K) via DeepSeek Sparse Attention, and DeepSeek-R1 supports 128K tokens.

Is the DeepSeek API OpenAI-compatible?

Yes. The DeepSeek API uses the OpenAI wire format. Point the OpenAI SDK at base_url https://api.deepseek.com, set your DeepSeek key, and call client.chat.completions.create with model deepseek-v4-flash or deepseek-v4-pro. No code changes beyond the base URL and model name.

DeepSeek V4 vs R1: which should I use?

deepseek-v4-flash and deepseek-v4-pro are the current API models with a 1M context and split cache pricing. DeepSeek-R1 (671B total, 37B activated, 128K context) is the earlier reasoning checkpoint released January 2025 that scored 49.2 on SWE-bench Verified. The V4 line supersedes R1 for new builds; R1 weights remain available under MIT for self-hosting.

How do I get a DeepSeek API key?

Create an account on the DeepSeek platform, open the API keys section, and generate a key. Set it as the api_key in the OpenAI SDK (or as an Authorization Bearer header) and point base_url at https://api.deepseek.com. Billing is usage-based per the per-1M-token prices above.

When are DeepSeek peak hours?

Peak hours are 01:00-04:00 and 06:00-10:00 UTC; the other 17 hours of the day bill off-peak at exactly half the peak rate. For deepseek-v4-flash that means $0.22/1M input (cache miss) and $0.66/1M output off-peak versus $0.44 and $1.32 at peak. Scheduling batch jobs, evals, and crons outside the two peak windows halves the bill with no other change.

What is deepseek-v4-flash-vision-exp?

An experimental vision-capable model listed alongside the two main models on DeepSeek's pricing page. It prices identically to deepseek-v4-flash ($0.22/1M cache-miss input, $0.007/1M cache-hit input, $0.66/1M output off-peak, double at peak) and carries the same 1M-token context window with a 384K-token maximum output.

What is DeepSeek's maximum output length?

All three listed models (deepseek-v4-flash, deepseek-v4-pro, and deepseek-v4-flash-vision-exp) support a 1M-token context window with a maximum output of 384K tokens per request.

How much does the DeepSeek API cost per month?

At 100 requests/day (1,000 input + 300 output tokens each, cache misses), a month of deepseek-v4-flash costs about $1.25 off-peak or $2.51 at peak. At 1,000 requests/day the same shape costs $12.54 or $25.08. A heavy agent workload of 10,000 requests/day at 3,000 input + 1,000 output tokens runs $396 off-peak or $792 at peak per month. Cache hits on repeated prefixes push the input side down toward $0.007/1M.

Is DeepSeek cheaper than the OpenAI API?

On list rates, yes for most workloads. Off-peak deepseek-v4-flash ($0.22/1M input, $0.66/1M output) undercuts OpenAI's mid-tier gpt-5.4 ($2.50/1M input, $15.00/1M output) by more than 10x on input and 22x on output, and OpenAI's budget gpt-5-mini ($0.25/$2.00) by 3x on output. At peak ($0.44/$1.32) the gap narrows but holds. The comparison is price only, not quality; verify both on your own evals.

Sources

Related Resources