Model / inference API
DeepSeek API
Inference provider headquartered in CN. Serves models through OpenRouter as "DeepSeek".
Checked 2026-10-31
Loading poll...
DeepSeek is the cheapest large-model API we track. Off-peak on 2026-10-31, deepseek-flash costs $0.15 in and $0.60 out per million tokens and V4 Pro costs $0.66 and $1.98, both with a 1M context. Peak hours double the rates. The privacy policy says data is stored in the People's Republic of China, so weigh that before sending code.
Facts at a glance
Item | What DeepSeek states | Source |
|---|---|---|
Models | deepseek-flash and deepseek-v4-pro | Pricing docs |
Context and output | 1M context, 384K max output | Pricing docs |
Off-peak price, flash | $0.15 in (cache miss), $0.60 out | Pricing docs |
Off-peak price, V4 Pro | $0.66 in, $1.98 out | Pricing docs |
Peak multiplier | 2x | Pricing docs |
Concurrency limit | 2,500 (flash), 500 (V4 Pro) per account | Rate limit docs |
Higher limits | Request expansion, no extra cost | Rate limit docs |
Data location | People's Republic of China | Privacy policy |
Weights | MIT-tagged on Hugging Face | Model cards |
Prices checked 2026-10-31. DeepSeek is the vendor to compare against when the question is cost per token. It is also the vendor where the data terms need the most care, as we explain below.
Models and prices
Model | Input (cache miss), off-peak | Cached input | Output | Peak input / output |
|---|---|---|---|---|
deepseek-flash | $0.15 | $0.003 | $0.60 | $0.30 / $1.20 |
deepseek-v4-pro | $0.66 | $0.022 | $1.98 | $1.32 / $3.96 |
Cache-hit input at $0.003 per million tokens on flash is the lowest rate on any list we have read, and a hit costs about 2 to 3 percent of a miss. For agent loops that re-send a long conversation on every turn, this matters more than the headline rate. Both models take a million tokens of context and write up to 384K tokens of output. DeepSeek-V4.1-Flash-1017 takes text and image input, and V4 Pro is text only. Details are on DeepSeek models.
Peak and off-peak pricing
DeepSeek is the only vendor in our price comparison that charges by the time of day. Peak runs 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday, excluding Chinese public holidays. Everything else, weekends included, is off-peak. A batch job scheduled for 12:00 UTC pays half of what the same job pays at 08:00. There is no separate batch tier, so scheduling is the discount. If your users are in Europe or the Americas, interactive traffic mostly lands off-peak, which is a quiet advantage. If your users are in East Asia, it mostly does not.
Rate limits
DeepSeek limits concurrency, not requests per minute. The numbers on the rate-limit page:
Model | Concurrency limit |
|---|---|
deepseek-flash | 2,500 |
deepseek-v4-pro | 500 |
A request counts as one concurrent connection from the moment it is sent until the response is complete. The limit is at account level regardless of which key is used. Over the limit you get an HTTP 429. DeepSeek says that if you need more, you submit a capacity expansion request, at no additional cost, and it matches concurrency to your actual needs. One handy feature for products with many users: pass a user_id and DeepSeek isolates content safety handling, KV cache and scheduling per user. It tells you not to put private information in the id.
Data retention, training and location
We read the Open Platform terms of service and the privacy policy. They answer some questions and leave others open.
What the terms say. You keep rights in the Inputs you submit, DeepSeek assigns any rights in Outputs to you, and you may use Inputs and Outputs for many purposes including model distillation. That is a generous output clause.
What the privacy policy says. DeepSeek collects, processes and stores personal data directly in the People's Republic of China. It says the data may be used to improve and develop the Services and to train and improve its technologies. It retains personal data as long as necessary for its purposes, with periods varying by data type, and gives a right to opt out of using your personal data for training in the sections on your choices. Public data is also gathered to train models.
What we could not confirm. The pages we read do not state a fixed retention period for API prompts and responses, whether API inputs are used for training by default, or whether any region other than China is offered.
Put plainly, a regulated company or a team with proprietary code should treat the hosted API as data that leaves the building and lands in China. That can be a legal block by itself, and it is a policy question for your counsel, not for us. The way around it is the weights: V4 Pro and V4.1 Flash are MIT on Hugging Face, so you can run them yourself or buy them from a host with different terms. Together AI lists DeepSeek V4.1 Flash at $0.30 in and $1.20 out and V4 Pro 0813 at $1.32 and $3.96, under Together's terms rather than DeepSeek's. Read private AI for teams for the self-hosted route.
What an agent loop costs here
A single call tells you little. Agents re-send their history on every turn, so most input tokens are repeats. Take a coding session that sends 10 million input tokens and writes 2 million output tokens over a day. The arithmetic below is ours, from the published off-peak prices, and shows how much the cache decides.
Case on deepseek-flash, off-peak | Input cost | Output cost | Total |
|---|---|---|---|
No cache hits (all 10M tokens at the miss rate) | $1.50 | $1.20 | $2.70 |
90 percent cache hits (9M at $0.003, 1M at $0.15) | $0.18 | $1.20 | $1.38 |
Same, but run at peak | $0.36 | $2.40 | $2.76 |
The same day on V4 Pro, with no cache hits, costs $6.60 for input and $3.96 for output, so $10.56. With 90 percent hits it drops to about $0.20 for 9M cached tokens plus $0.66 for the rest, plus the same $3.96 output, which is about $4.82. Two points follow. Output becomes the main cost once the cache works, so cap verbose answers. And the peak window matters less for input than for output, because the peak output rate is where the doubling hurts. These are illustrations, not measurements from a real session, and your hit rate depends on how your agent builds its prompts.
The open weights behind the API
DeepSeek publishes the models it serves. The model cards on Hugging Face carry these facts, which we checked on 2026-10-31:
DeepSeek-V4-Pro-0813 | DeepSeek-V4.1-Flash-1017 | |
|---|---|---|
API model name | deepseek-v4-pro | deepseek-flash |
Released | 13 Aug 2026 | 17 Oct 2026 |
Licence | MIT | MIT |
Total parameters | About 1.65T | About 763B |
Context | 1M | 1M |
Max output | 384K | 384K |
Input | Text only | Text and image |
MIT is the permissive end of the licence range, and it removes the question about who may use the model commercially. The practical catch is size. A model with 763 billion parameters is not a laptop job, and the 1.65 trillion model needs a cluster. Self-hosting these is a data centre project, which is why hosts such as Together AI and Fireworks AI exist. For the hardware side see GPU requirements for LLMs and vLLM. DeepSeek also reports benchmark results on its model cards. They are vendor-reported and we have not reproduced them, so use them only to choose what to test.
Search tools and extras
DeepSeek lists Search and Fetch tools at $0.75 per 1,000 successful requests, and the pricing page says they were free until 1 November 2026 when used through certain tools. Compare that with $10 per 1,000 web searches on Claude and OpenAI. If your agent searches a lot, the tool line can outweigh the token line, so price it separately.
Setting up and common snags
- Create an account and a key on the DeepSeek platform and add credit. Check the platform's payment options for your country.
- Pick the endpoint. The OpenAI-format endpoint suits most agents. The Anthropic-format endpoint at
/anthropicsuits Claude Code and Anthropic SDKs. - Set the model name. Use
deepseek-flashordeepseek-v4-prodirectly if you can. Relying on theclaude-*mapping works, but it hides what you are running. - Add retries for 429. Concurrency, not rate, is the limit, so a burst of parallel agents can trip it. Queue work so you stay under 2,500 on flash and 500 on Pro.
- Schedule batch jobs. Use a cron in UTC that avoids 01:00 to 04:00 and 06:00 to 10:00 on weekdays.
- Watch unsupported parameters. The Anthropic-format page lists fields that are ignored, and the userid metadata is the one it highlights. Do not assume every Anthropic feature works on the compatible endpoint. [VERIFY: the unsupported feature list on api-docs.deepseek.com/guides/anthropicapi]
A common mistake is to treat a very low price as a reason to skip the data review. The price and the data terms belong to the same decision. If a review would block the hosted API, the fallback is to rent the same weights elsewhere, which costs more per token but changes who holds your prompts.
Moving to or from DeepSeek
DeepSeek copies the two big formats, which makes switching cheap in code terms. A move from OpenAI usually needs a base URL and a key. A move from Anthropic needs the base URL pair shown above. The cost lies in evaluation. A model tuned on one lab's data behaves differently on the same prompt, so rerun your own test set. Our DeepSeek vs Claude page covers what to compare.
Which agents can use it, and how
DeepSeek documents an Anthropic-format endpoint, so Claude Code and any Anthropic-SDK client can talk to it:
export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_API_KEY=${YOUR_API_KEY}
claudeA model name starting with claude-opus maps to deepseek-v4-pro, and other claude names map to deepseek-flash. That is handy, and it also means a config that says "Opus" is not running Opus. Check the model line in the session. See Claude Code for the agent itself.
Aider has a native DeepSeek route:
export DEEPSEEK_API_KEY=<key>
aider --model deepseek/deepseek-chatOpenCode and Cline accept DeepSeek as an OpenAI-compatible provider. See Aider, OpenCode and Cline. A comparison for coding work lives on DeepSeek vs Claude.
Alternatives
If you need | Look at |
|---|---|
The same open weights with US-hosted terms | |
Fast inference of open models | |
A closed-model default with stated retention | |
A gateway that lets you filter by data policy | |
Everything side by side |
Who should pick DeepSeek
You are | Pick | Watch for |
|---|---|---|
A cost-driven builder with non-sensitive data | deepseek-flash, off-peak batch | Peak-hour doubling |
An agent builder with long loops | Flash with cache hits | Cache hit rate decides the bill |
An enterprise with data-residency rules | The MIT weights self-hosted, or a US host | China storage on the hosted API |
A hobby coder | Flash through Aider or Claude Code | Model name mapping |
A pre-launch checklist
- Decide whether your data may be stored in China. If not, stop and pick a host.
- Schedule batch work outside the peak windows.
- Design prompts so a long prefix repeats and hits the cache.
- Set
user_idper end user if you serve many users. - Ask for a concurrency expansion before launch, since it is free.
- Test the model-name mapping if you use the Anthropic endpoint.
- Re-check the price page each month, since DeepSeek changes its schedule.
Our take
DeepSeek wins on price by a wide margin, and the cache-hit rate makes it more so for agents. The weights are MIT, which gives you a clean exit. The cost of the cheap hosted API is paid in the data terms: storage in China, training language in the privacy policy, and no stated retention period for API content on the pages we read. For public code, side projects and non-sensitive batch work it is hard to beat. For a company with customer data, use the weights on infrastructure you control, or a host with terms your lawyer has read.
We have not run tests for this page. It reflects DeepSeek's published documentation on 2026-10-31. DeepSeek does not pay for placement here.
Related pages
DeepSeek models, DeepSeek vs Claude, LLM API prices, open source LLM, self-hosted AI.
Mentioned here
LLM API Prices Compared: Claude, GPT, Gemini, DeepSeek
Checked 2026-10-31
How to Self-Host an LLM
Checked 2026-10-31
AI Agent Platform: How to Choose Between Builders
Checked 2026-10-31
How to Build an AI Agent, Step by Step
Checked 2026-10-31
Together AI
Together AI serves open models by the token and also rents GPUs.
- Model / inference API
- OpenAI compatible
Fireworks AI
Fireworks AI serves open models by the token and states zero data retention by default.
- Model / inference API
- OpenAI compatible
OpenRouter
OpenRouter routes more than 600 models through one API key.
- Model gateway (router)
- OpenAI compatible
Groq
GroqCloud serves open models on its own inference hardware, with speed as the draw.
- Model / inference API
- OpenAI compatible
Questions
How much does the DeepSeek API cost?
Off-peak, deepseek-flash is $0.15 per million input tokens on a cache miss and $0.60 output, and V4 Pro is $0.66 and $1.98. Peak hours double those rates. Cache hits are far cheaper.
When is DeepSeek's peak pricing?
Per our check of the pricing docs, peak is 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday, excluding Chinese public holidays. Everything else is off-peak, which costs half.
Where does DeepSeek store data?
Its privacy policy says it directly collects, processes and stores personal data in the People's Republic of China.
Can I use DeepSeek inside Claude Code?
DeepSeek documents an Anthropic-format endpoint at https://api.deepseek.com/anthropic. You set ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY, and claude-opus names map to deepseek-v4-pro.
Are DeepSeek's weights open?
DeepSeek-V4-Pro-0813 and DeepSeek-V4.1-Flash-1017 are tagged MIT on Hugging Face, so you can run them yourself instead of calling the API.
Loading poll...
Reviews
Loading reviews…
Only members can review this page. Sign in
Sources
Similar
xAI API
Inference provider headquartered in US. Serves models through OpenRouter as "xAI".
- Model / inference API
Meta Llama API
Inference provider headquartered in US. Serves models through OpenRouter as "Meta".
- Model / inference API
Cohere
Inference provider headquartered in US. Serves models through OpenRouter as "Cohere".
- Model / inference API
Mistral AI API
Mistral AI's API prices Large 4 at $0.70 per million input tokens and $2.10 output with a 1M context, on our 31 October 2026 read.
- Model / inference API
Google AI (Gemini API)
The Gemini API prices per token.
- Model / inference API
OpenAI API
OpenAI's API bills per token.
- Model / inference API