DeepSeek API
The OpenAI-compatible AI API from $0.14 per 1M tokens — far cheaper than GPT-5.6 or Claude Sonnet 5, with the same SDK.
Why developers pick the DeepSeek API
Low latency
High-throughput inference for real-time applications and streaming chat.
Enterprise-grade
TLS encryption, key rotation and SOC 2-aligned infrastructure.
Scales to millions
From prototype on a laptop to millions of requests per day, same endpoint.
OpenAI-compatible
Drop-in replacement — no SDK swap, no schema rewrite, no retraining.
DeepSeek API Pricing Calculator
Drag the sliders to see your monthly cost compared to OpenAI and Anthropic.
Estimates use published per-token rates (DeepSeek verified 2026-07-25, competitors 2026-07-25). Cache hits cut DeepSeek input cost by ~98%.
DeepSeek API Pricing per Model
All models share the same OpenAI-compatible endpoint. Pick one by setting the model field.
deepseek-v4-flash
General chat, agents & tools
- Cheapest current tier
- Cache hit input $0.0028 / 1M
- Best default for production chat
deepseek-v4-pro
Reasoning & complex code
- Strongest reasoning tier
- Cache hit input $0.003625 / 1M
- Use per-turn, not per-app
deepseek-chat / deepseek-reasoner
Retired 24 July 2026
- Legacy aliases, no longer served
- Migrate to the V4 strings above
* Cache hits get a 90% discount. Prices exclude VAT. See full pricing page.
Quick Start — your first API call
Three steps to a working request. Examples in Python, Node.js, cURL and LangChain below.
Generate API key
Open the API Keys section and create a new key.
First request
Copy a snippet below and replace YOUR_DEEPSEEK_API_KEY.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_DEEPSEEK_API_KEY",
base_url="https://api.deepseek.com",
)
response = client.chat.completions.create(
model="deepseek-v4-flash",
messages=[
{"role": "system", "content": "You are a helpful assistant."},
{"role": "user", "content": "Explain what an API is in one sentence."},
],
)
print(response.choices[0].message.content)DeepSeek API vs OpenAI vs Claude
Per-token list pricing on each provider's mainstream chat model, verified 2026-07-25.
| Feature | DeepSeek | GPT-5.6 Terra | Claude Sonnet 5 |
|---|---|---|---|
| Input price (per 1M) | $0.14 | $2.50 | $2.00 |
| Output price (per 1M) | $0.28 | $15.00 | $10.00 |
| Context window | 128K | 128K | 200K |
| Reasoning tier | deepseek-v4-pro | GPT-5.6 Sol | Claude Opus 5 |
| OpenAI-compatible SDK | native | — | |
| Cache discount | 90% | 50% | 90% |
DeepSeek API — Frequently Asked Questions
Ready to start with the DeepSeek API?
Create an account today and receive free trial credits to test every model.