Why run DeepSeek in Claude Code
Claude Code is the agent; the model behind it is a setting. Nexum Router serves DeepSeek V4.1 Flash on an Anthropic-compatible endpoint, so Claude Code's tools, slash commands and sessions work unchanged while DeepSeek writes the code, with a 200,000-token context window. The answers come from DeepSeek V4.1 Flash, not from Anthropic's Claude models.
Step 1: Create an account and an API key
Step 2: Point Claude Code at the router and pin DeepSeek
export ANTHROPIC_BASE_URL="https://dialagram.me/router/claude"
export ANTHROPIC_AUTH_TOKEN="dgr_live_your-key"
export ANTHROPIC_MODEL="deepseek-v4.1-flash"
claudeStep 3: Make the setting permanent
{
"env": {
"ANTHROPIC_BASE_URL": "https://dialagram.me/router/claude",
"ANTHROPIC_AUTH_TOKEN": "dgr_live_your-key",
"ANTHROPIC_MODEL": "deepseek-v4.1-flash"
}
}Step 4: Save DeepSeek as your Claude Code Model
What DeepSeek usage costs
Nexum Router or the DeepSeek API directly?
Switch models without changing anything else
Set ANTHROPIC_MODEL to any of these model IDs, or unset it to use the model saved in the dashboard.
- Nexum Router — nexum-router
- DeepSeek V4.1 Flash — deepseek-v4.1-flash
- Xiaomi Mimo 2.6 — xiaomi-mimo-2.6
- Xiaomi Mimo 2.5 — xiaomi-mimo-2.5
- Meta Muse Spark 1.2 — meta-muse-spark-1.2
- Meta Muse Spark 1.3 — meta-muse-spark-1.3
Troubleshooting
- 401 or invalid API key: the token must be your dgr_live_ key, set as ANTHROPIC_AUTH_TOKEN (ANTHROPIC_API_KEY works too).
- "Model ... is not available on the Claude-compatible route": ANTHROPIC_MODEL names a model this endpoint does not serve. Pick an ID from the list above, or unset it.
- "Set a Claude route model in the Nexum Router dashboard": no model could be served for your account. Save a Claude Code Model in the dashboard's model catalog; if that model is temporarily unavailable, the error then says so and another model or a retry fixes it.
- Context too long: the router answers an over-window request with a context-length error so the client can compact; each model's window is listed at /router/v1/models.
More setup guides
Does this give me Claude models?
No. Claude Code is the client. Nexum Router does not serve Anthropic's Claude models; the models above answer every request.