Providers / DeepSeek
DeepSeek
DeepSeek is an AI lab that builds large language models and publishes many of them as open weights. Its current line is DeepSeek V4: V4 Pro is the larger model for harder work, and V4.1 Flash is the fast, low-cost model. Every model in the family takes text, and V4.1 Flash also accepts images.
Models
USD per 1M tokens · prices as of 2026-11-21
| Model | Best for | Input | Output | Context |
|---|---|---|---|---|
| DeepSeek V4 Pro | Harder bugs, planning, multi-file changes | $0.9307 | $2.4295 | 128K |
| DeepSeek V4.1 Flash | Everyday coding-agent work (edits, tests, small refactors) · Background and sub-agent tasks · Screenshots or diagrams in the prompt | $0.2146 | $0.8584 | 128K |
Which model for which job
DeepSeek’s models are built for low cost per token at high volume. All of these models support tool calling, which coding agents depend on.
| Job | Use | Input / output per 1M | Why |
|---|---|---|---|
| Everyday coding-agent work (edits, tests, small refactors) | DeepSeek V4.1 Flash | $0.2146 / $0.8584 | Small, low-cost model; tool calling with parallel calls |
| Background and sub-agent tasks | DeepSeek V4.1 Flashreasoning off | $0.2146 / $0.8584 | Fewer output tokens per call |
| Harder bugs, planning, multi-file changes | DeepSeek V4 Pro | $0.9307 / $2.4295 | The larger model in the family |
| Screenshots or diagrams in the prompt | DeepSeek V4.1 Flash | $0.2146 / $0.8584 | Accepts image input; V4 Pro is text only |
| Bulk jobs that can wait | Any of them, through the Batch API | — | Runs in the off-peak window |
Data handling
What DeepSeek publishes
DeepSeek’s own terms say its API is based in China, trains on prompts, and retains prompts (no period stated). Of the four makers in our catalogue (DeepSeek, Z.ai, Moonshot, Alibaba Cloud), DeepSeek’s own API is the only one whose published policy allows training on prompts.
What Yunshu does
Prompts aren’t stored by default. Batches are the one exception: batch inputs and results are kept for 7 days after the batch finishes, then deleted. An organisation can turn on zero retention, which refuses batches as well.
Pricing notes
- Peak and off-peak. DeepSeek models are priced by time of day. A request is quoted and billed at the rate in force when it starts, even if it runs past the boundary.
- Batch API. Up to 1,000 requests per batch. Batches wait for the off-peak window and run then.
- Cache reads. DeepSeek caches repeated prompt prefixes automatically.
- Yunshu’s own cache. Exact repeats of a request are answered from our cache and not charged.
Use it in your coding tool
Paste these settings to use DeepSeek V4 Pro. Swap in any DeepSeek model ID from the table above.
export ANTHROPIC_BASE_URL=https://api.yunshurouter.com
export ANTHROPIC_AUTH_TOKEN=YOUR_YUNSHU_KEY
export ANTHROPIC_MODEL=deepseek-v4-pro
export CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS=1OpenAI API Key: YOUR_YUNSHU_KEY
Override OpenAI Base URL: https://api.yunshurouter.com/v1
Add model: deepseek-v4-pro (then Verify)model = "deepseek-v4-pro"
model_provider = "yunshu"
model_context_window = 131072
[model_providers.yunshu]
name = "Yunshu Router"
base_url = "https://api.yunshurouter.com/v1"
env_key = "YUNSHU_API_KEY"
wire_api = "responses"Base URL: https://api.yunshurouter.com/v1
API Key: YOUR_YUNSHU_KEY
Model ID: deepseek-v4-proRun these in your shell before starting Claude Code, or put them in ~/.claude/settings.json (see the guide). No /v1 in the address: Claude Code adds it. The last line stops Claude Code sending fields only Anthropic models accept. Full guide →
In Cursor Settings → Models: paste the key under OpenAI, turn on the base URL override and keep the /v1. Then pick the model in the chat panel. Full guide →
Add this to ~/.codex/config.toml and set YUNSHU_API_KEY to your key. Codex sends the whole conversation each turn; we don't store responses. Full guide →
Set API Provider to OpenAI Compatible. Then set the context window and prices from the model page, so Cline's cost estimate matches your bill. Full guide →
Questions
Can I use the DeepSeek API outside China?
Yes. You call DeepSeek models through Yunshu with one key, using the OpenAI or Anthropic API format. You pay from a prepaid balance in USD, CNY or SGD, topped up by card.
Does DeepSeek train on my prompts?
Yunshu doesn’t store prompts by default, and an organisation can turn on zero retention. See Data handling.
What is the difference between DeepSeek V4 Pro and V4.1 Flash?
V4 Pro is the larger model, for harder reasoning and planning. V4.1 Flash is cheaper per token, accepts images, and suits high-volume agent work.
Why is the context window smaller than 1M tokens?
Fallbacks
(models or fallbacks) can move a too-long prompt to a model with a larger window.
When is DeepSeek cheapest?
Off-peak. DeepSeek lists its peak hours as 01:00 to 04:00 and 06:00 to 10:00 UTC, Monday to Friday, excluding Chinese public holidays; every other hour is off-peak and costs half. The Batch API runs your requests in the off-peak window for you.