DeepSeek V4 Pro API
160K context · Released May 21, 2026 · By DeepSeek · MIT
DeepSeek V4 Pro costs $0.28 per million input tokens and $0.55 per million output tokens, against an official rate of $0.435 and $0.87 — 37% below official pricing. It is a DeepSeek model under the MIT licence, with a 160K context window, callable through an OpenAI-compatible endpoint with the model id `deepseek/deepseek-v4-pro`.
Input
$0.28/M
$0.43/M
Output
$0.55/M
$0.87/M
Savings
37%
off official
- No markup
- OpenAI SDK compatible
- No minimum spend
- MIT
Still the best reasoning-per-dollar in open weights. Aggressive cache discounts make it especially cheap for agent loops with a large fixed system prompt.
Copy this and go
The model id is already filled in. Nothing in this snippet needs editing except your key.
from openai import OpenAI
client = OpenAI(
api_key="YOUR_API_KEY",
base_url="https://router.xark.io/api/v1" # ← the only line that changes
)
response = client.chat.completions.create(
model="deepseek/deepseek-v4-pro",
messages=[{"role": "user", "content": "Hello"}]
)
DeepSeek V4 Pro pricing across providers
Rates as published by each provider. We update these when they change; if you spot one that's stale, tell us and we'll fix it.
| Provider | Input | Output |
|---|---|---|
| AI Token Router | $0.28/M | $0.55/M |
| Official (DeepSeek) | $0.43/M | $0.87/M |
| OpenRouter | $0.42/M | $0.85/M |
| DeepInfra | $0.30/M | $0.60/M |
| Together AI | $0.40/M | $0.82/M |
Cached input on DeepSeek V4 Pro is billed at $0.055/M — roughly 80% below the standard input rate. For agent loops with a large fixed system prompt this is usually the number that matters most.
What it's good at
- Cost-sensitive batch processing at scale
- Math and reasoning-heavy evaluation pipelines
- Agent loops with large repeated system prompts