DeepSeek V3: token counter & pricing
DeepSeek · approximate, within ±3% of reference · pricing as of 2026-05-31.
- Provider
- DeepSeek
- API model ID
deepseek-chat- Context window
- 128,000 tokens
- Input price
- $0.27 per 1M tokens
- Output price
- $1.10 per 1M tokens
- Tokenizer accuracy
- approximate, within ±3% of reference
- Pricing as of
- 2026-05-31
Open the counter to count tokens for DeepSeek V3 in real time.
What is DeepSeek V3?
DeepSeek V3 is the flagship model from Chinese AI lab DeepSeek, a 671-billion-parameter mixture-of-experts model that competes with frontier closed models on benchmarks at a fraction of the price. Open weights under a permissive license. Strongly priced API access from DeepSeek directly.
How tokens are counted here
DeepSeek's tokenizer is a custom BPE we don't yet run in-browser, so this page uses a character-class-aware heuristic instead: your text gets bucketed into ASCII letters, digits, CJK characters, and whitespace, and each class has its own characters-per-token ratio. For typical English text this lands within about ±3% of the reference tokenizer, and results are marked ≈±3%. The CJK bucket matters more for DeepSeek than for most models: its vocabulary is unusually efficient on Chinese text, and a naive characters-divided-by-four estimate would overshoot badly there.
For exact counts, use DeepSeek's official tokenizer via Hugging Face: AutoTokenizer.from_pretrained("deepseek-ai/DeepSeek-V3").
Why DeepSeek matters
The price-to-capability ratio is the most aggressive in the industry as of 2026:
- Input: $0.27 per million (DeepSeek API direct)
- Output: $1.10 per million
- Capability: comparable to GPT-4o on most benchmarks
That's roughly 9× cheaper than GPT-4o on input, 9× cheaper on output, with similar quality on most tasks.
When to use DeepSeek
- Cost-sensitive frontier-tier workloads, coding assistants, RAG over large corpora, batch reasoning jobs.
- Open-weights workloads where you want to fine-tune or self-host eventually but use API for development.
- Workloads with no concerns about Chinese-vendor data flow. Some enterprise compliance regimes restrict this; check before committing.
When not to use it:
- Production workloads with regulatory concerns about cross-border data transfer to China.
- Workloads requiring the most reliable function-calling. OpenAI's structured outputs are still the gold standard.
- Real-time chat where DeepSeek's higher latency vs Anthropic/OpenAI matters.
Pricing notes
Pricing is from DeepSeek's official API. Self-hosting (via Together, Replicate, etc.) costs more, DeepSeek subsidizes API access aggressively. Verify on api-docs.deepseek.com.
DeepSeek also offers prompt caching at substantial discount (cached input tokens at ~10% of standard rate). Not reflected in this calculator.
What DeepSeek V3 costs in production
Batch summarization is where V3's pricing shines. Summarizing 500,000 documents a month, at 3,000 tokens in and 250 out apiece, costs 1.5B × $0.27 = $405 on input and 125M × $1.10 = $137.50 on output, about $543 a month on DeepSeek's direct API.
GPT-4o mini would do the same batch for roughly $300 ($225 + $75); full GPT-4o would cost about $5,000 ($3,750 + $1,250). So V3 sits at about 1.8× GPT-4o mini's price while benchmarking far closer to full GPT-4o. The gap versus 4o mini narrows further when prompts share a prefix, since DeepSeek's cached-input discount (cached tokens at roughly 10% of the standard rate) applies to repeated instructions. At these prices, a 1,000-document eval comparing all three costs about a dollar. Run it.
Migrating from GPT-4o mini
Most teams arrive at DeepSeek V3 from GPT-4o mini, or from DeepSeek's own V2.5. From the OpenAI side, point your OpenAI-compatible client at DeepSeek's endpoint with apiId deepseek-chat; the API is deliberately OpenAI-shaped, so the change is mostly a base URL and a key. Re-check function-calling paths first, since tool use is the least drop-in part. Token accounting changes too: counts here are heuristic (≈±3%) rather than the exact tiktoken numbers you had with OpenAI, so pad per-request budget caps slightly instead of assuming counter parity.
DeepSeek V3 vs the obvious alternative
GPT-4o mini is the natural rival: $0.15/$0.60 against V3's $0.27/$1.10, so OpenAI is cheaper on list price, but V3 benchmarks closer to full GPT-4o than to a mini-class model. If quality per dollar is your metric, V3 usually wins; if the absolute floor price is, 4o mini does. Full numbers and head-to-head notes: DeepSeek V3 vs GPT-4o mini.
Common questions
Is using DeepSeek's API safe for production data?
Read DeepSeek's data-handling policy and your own compliance requirements. The API does process your prompts in China-based infrastructure. For sensitive data, self-host the open weights via Together.ai or similar.
How does DeepSeek V3 compare to Claude Sonnet on coding?
DeepSeek tends to win on raw code generation benchmarks. Claude Sonnet tends to win on understanding complex existing codebases and producing edits that match local conventions. Try both with your prompts.
What's the context window?
128k tokens. Comparable to GPT-4o, Llama 3.1, and Claude Haiku. Below Gemini 2.5 (1M+) and Claude Sonnet/Opus (200k).
Compare DeepSeek V3 to other models
- DeepSeek V3.1 (DeepSeek, $0.60/$1.70)
- DeepSeek R1 (DeepSeek, $3.00/$7.00)
- GPT-5 Mini (OpenAI, $0.25/$2.00)
- Gemini 3.1 Flash-Lite (Google, $0.25/$1.50)
- Gemini 2.5 Flash (Google, $0.30/$2.50)