Skip to main content
All guides
DeepSeek basics

How DeepSeek API pricing works

Cache-hit vs cache-miss input tokens, output pricing, and why DeepSeek can be 10× cheaper than GPT-4o without gimmicks.

Last updated June 15, 2026

The headline numbers

DeepSeek charges roughly $0.14 per million input tokens on a cache hit, $0.55 per million on a miss, and $0.28 per million output tokens on deepseek-chat. The reasoner model is priced a step higher for outputs because it emits a hidden chain-of-thought that you still pay for. These numbers are list prices and assume the hosted API at api.deepseek.com. Self-hosted or third-party hosts may add their own markup, but the underlying structure — input tokens, output tokens, and cache state — is the same everywhere DeepSeek weights are served.

Prompt caching, explained

DeepSeek caches the leading prefix of your prompt for a short window (minutes, not hours). If your next request starts with the same tokens — same system prompt, same few-shot examples, same tool schema — you get the cache-hit rate for the matching prefix. That's how workloads with heavy system prompts land near the $0.14 headline instead of the $0.55 miss rate. The cache is prefix-based, not semantic: a one-character difference early in the prompt can flip the entire prefix to a miss. Stable system prompts, deterministic tool definitions, and ordered message history are the practical levers for improving cache-hit ratio.

Why it's so much cheaper

  • MoE (mixture-of-experts) architecture — only a fraction of parameters activate per token, so inference is cheap.
  • In-house training on Nvidia H800s at scale, avoiding the premium cloud GPU markup that Western providers pass through.
  • Aggressive KV-cache and prefix-caching optimizations at the serving layer, which lowers the effective cost per request after the first call.
  • A pricing strategy explicitly aimed at commoditizing hosted LLM inference and capturing developer mindshare.

How it stacks up

GPT-4o runs $2.50 per 1M input and $10 per 1M output — roughly 18× and 36× DeepSeek chat, respectively. Claude Sonnet is closer to GPT-4o. For workloads where DeepSeek's quality is 'good enough', the savings dominate any pricing arbitrage. The comparison is not just about list price; it is about total cost per solved task. A GPT-4o call that costs 20× more but needs fewer retries can still be cheaper on a per-outcome basis. Most teams find that DeepSeek wins on cost-per-task for classification, summarization, extraction, and routine coding, while GPT-4o retains an edge on the hardest agentic tasks.

Budgeting in practice

Estimate 1 token ≈ 4 characters of English. A 2K-token prompt with a 500-token completion costs ~$0.0004 on cache hit ($0.14 × 2K/1M + $0.28 × 500/1M). That's $0.40 per thousand requests — cheap enough that egress and observability usually cost more than the model. The same request on a cache miss costs ~$1.38 per thousand. The gap between hit and miss is large enough that you should design prompts for cache reuse even if it means slightly more upfront work.

Real-world workload math

  • A customer-support bot handling 10,000 requests/day with a 1K prompt and 300-token reply spends ~$2.80/day on output and ~$1.10/day on cache-hit input. If the cache misses on half the requests, the daily input cost rises to ~$3.85.
  • A code-generation agent that writes 50 files/day with 5K-token prompts and 2K-token completions lands near $35/day if it misses cache, or $15/day with a warm prefix. Over a month that is $450 vs $1,050.
  • A batch translation job on cached documents can drop below $1 per 1M tokens processed, which is cheaper than most self-hosted GPU setups once labor and maintenance are included.

Setting up your API key and first request

Create an account on the DeepSeek platform, generate an API key, and point your OpenAI SDK to https://api.deepseek.com/v1. The body is identical: model, messages, temperature, max_tokens. The first request usually costs a fraction of a cent, so you can verify the integration before committing a balance. Top up in the console; DeepSeek is prepaid, so requests return 402 when your balance hits zero. Keep the key out of client-side code and rotate it if you accidentally commit it. The platform supports multiple keys per account, so you can separate production, staging, and personal experiments.

OpenAI-compatible billing quirks

Because DeepSeek mirrors the OpenAI chat-completions shape, many teams assume billing is identical too. It is not. OpenAI bills by model tier and batch mode; DeepSeek bills by cache state and output length. If you migrate a GPT-4o workload, rerun the cost estimate with actual cache-hit ratios rather than assuming 1:1 parity. OpenAI also charges separately for some features like fine-tuning and retrieval, while DeepSeek's pricing is flatter. The safest migration path is to run both APIs in parallel for a few days, log actual token counts, and project the monthly spend from real data.

How to compare against other providers

When evaluating an LLM API, normalize every quote to a common unit: dollars per 1M tokens of output on your real prompt distribution. Some providers hide costs behind higher-context fees, image surcharges, or tool-call premiums. DeepSeek's published rates are close to all-in for text workloads, which makes side-by-side comparisons easier. For a live look at how other hosted APIs are behaving, our sister status pages track Mistral and Hugging Face uptime and incident feeds. Pricing is only half the equation; the other half is availability and latency during peak load.

Pricing tables and calculator mindset

Build a tiny spreadsheet with three columns: expected requests per day, average input tokens, average output tokens. Add two rows: cache-hit and cache-miss. Multiply by the published rates and you have a monthly range. Most teams land between the two rows, and the exact point depends on how well you reuse prefixes. Update the spreadsheet after the first week of production data. The first estimate is almost always wrong; the second estimate, based on real logs, is what you use for budgeting.

Why cache state matters more than model choice

Developers often obsess over which model to call and ignore cache state. That is a mistake. A cache-miss deepseek-chat request can cost 4× more than a cache-hit request, and the quality is identical. Before switching models to save money, optimize the prompt structure. Put static instructions first, keep dynamic user input at the end, and reuse tool schemas. The return on investment is higher than chasing a cheaper model, because the model is already cheap.

Reserved vs. on-demand: there is no reservation

DeepSeek does not currently offer reserved throughput or provisioned capacity. Every request is on-demand, which means your cost scales linearly with usage but your rate limits are shared across the platform during peak hours. If you need guaranteed throughput, the options are self-hosting the weights or using a third-party host that offers reserved capacity. Both add cost and complexity, but they remove the 429 risk during traffic spikes.

Monthly spend forecasting

Start with the calculator above, then add a 20% buffer for cache misses and retries. Add another buffer for R1 or future models, which can emit 5×-10× more tokens per request than chat. Then set a daily spend alert in the console at 50% of your expected burn so you notice a runaway job before it drains the account. The goal is not to predict the exact dollar amount; it is to avoid surprises.

FAQ

Does the free tier ever come back?
There isn't a permanent free tier, but new accounts get a small starter balance.
Is billing prepaid?
Yes. Top up your balance in the console; requests fail with 402/insufficient balance when it hits zero.
What counts as a cache hit?
A cache hit happens when the leading tokens of your prompt exactly match a recently cached prefix — usually the system prompt, few-shot examples, and tool schema. Only the matching prefix is discounted.
Can I use the same API key for chat and reasoner?
Yes. The same account and key can call both deepseek-chat and deepseek-reasoner, but they have separate rate-limit buckets.
How do I estimate monthly spend?
Multiply your expected daily requests by average input and output tokens, then apply the cache-hit and cache-miss rates. Use the real-world workload examples above as a starting template.
Do output tokens include thinking tokens?
Yes. For deepseek-reasoner, the reasoning_content tokens count toward output billing even though they are not shown to the user by default.
Can I get a refund if I over-top-up?
Refund policy is determined by DeepSeek's platform terms. Most prepaid API providers do not refund unused balance, so top up in small increments until you know your run rate.
Are there enterprise discounts?
DeepSeek has historically offered volume pricing for very large accounts. Contact their sales team through the console for high-volume commitments.

Related on this site

Related services in the .health network

Keep reading

Also in the .health network