Use DeepSeek V4 Flash in Claude Code: setup and pricing
Set ANTHROPIC_BASE_URL and the model to run DeepSeek V4 Flash (deepseek-v4-flash) in Claude Code. $0.09 input / $0.18 output per 1M tokens, with a config you can paste.
- Model ID
deepseek-v4-flash- Input / 1M
- $0.09
- Output / 1M
- $0.18
- Context
- 1M
Set up Claude Code with DeepSeek V4 Flash
- Create an API key in the BigModel.io console and give it a spend limit; agents send long contexts.
- Put the block below in ~/.claude/settings.json with your key. All three model slots point at models you can call; background tasks use the haiku slot.
- Run claude in your project. /status shows the base URL and deepseek-v4-flash as the model.
~/.claude/settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://bigmodel.io",
"ANTHROPIC_AUTH_TOKEN": "sk-your-bigmodel-key",
"ANTHROPIC_MODEL": "deepseek-v4-flash",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "deepseek-v4-flash",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "deepseek-v4-flash",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "deepseek-v4-flash"
}
}Use ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY, and never commit this file with the key in it.
Check the key and model first
This request should return a short reply. If it fails, the tool will fail the same way.
curl https://bigmodel.io/v1/messages \
-H "Authorization: Bearer $BIGMODEL_API_KEY" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"deepseek-v4-flash","max_tokens":64,"messages":[{"role":"user","content":"ping"}]}'401 means the key is wrong, 404 the model ID; fix 401 · fix 404 · /v1/messages errors
What it costs
DeepSeek V4 Flash costs $0.09 per 1M input tokens and $0.18 per 1M output tokens, $0.03 per 1M cached input tokens. A typical agent turn with 20K tokens in and 2K out costs about $0.0022; 100 turns about $0.216. DeepSeek V4 Flash pricing →