Yes — Claude Code can run on DeepSeek
Claude Code sends requests to whatever endpoint its config points at. DeepSeek publishes an Anthropic-compatible endpoint specifically so tools built for the Anthropic Messages API can use it directly — which means you can point Claude Code at DeepSeek without any translating proxy. You bring your own DeepSeek key, and usage is billed to you (at DeepSeek's very low rates).
The config
What to set
- ANTHROPIC_BASE_URLPoint it at DeepSeek's Anthropic-compatible base URL (the /anthropic endpoint), not the default OpenAI-style one.
- ANTHROPIC_AUTH_TOKENYour DeepSeek API key — usage is billed to your DeepSeek account.
- ModelSet the model to the DeepSeek model you want (e.g. its chat/coder model). Match the name the endpoint exposes.
# Point Claude Code at DeepSeek's Anthropic-compatible endpoint
export ANTHROPIC_BASE_URL="https://api.deepseek.com/anthropic"
export ANTHROPIC_AUTH_TOKEN="your-deepseek-key"
# then run claude as usual, selecting a DeepSeek modelWhy people route Claude Code to DeepSeek
DeepSeek vs staying on Claude
| Reason | What it gets you | Tradeoff |
|---|---|---|
| Cost | A fraction of the per-token price for routine coding | Slightly different strengths per task |
| No Claude limits | Sidestep Claude plan rate limits / quota | You manage a second key |
| Fallback | Something to switch to when Claude is capped or down | Manual switch via env vars |
The cleaner option: pick the model, don't rewire env vars
The endpoint swap works, but you're bending Claude Code — a single-provider tool — into multi-model use. If your real goal is "run DeepSeek for cheap most of the time, jump to Claude for the hard stuff," it's far less friction to use an agent where DeepSeek and Claude are both just entries in a model list. No env-var editing, no restart-to-switch.
What that looks like with Wuwei
DeepSeek is one entry in the list
Pick it in the UI; Claude, GLM, Kimi, Qwen and OpenAI-compatible endpoints sit right next to it.
One-click switch
Move between DeepSeek and Claude mid-workflow without touching config or restarting.
Free and local
The agent is free and MIT-licensed, runs on your machine, and reads your real files. You only pay DeepSeek's usage.
FAQ
Can Claude Code use DeepSeek?
Yes. DeepSeek exposes an Anthropic-compatible endpoint, so you set ANTHROPIC_BASE_URL to DeepSeek's /anthropic base and ANTHROPIC_AUTH_TOKEN to your DeepSeek key, then select a DeepSeek model. No translating proxy is needed.
Is DeepSeek cheaper than Claude for coding?
Per token, yes — DeepSeek is one of the lowest-cost capable coding models, which is why people route Claude Code to it for routine work and keep Claude for the hardest tasks.
How do I switch between DeepSeek and Claude easily?
Use an agent where the model is a setting, not a global env var. Wuwei is a free, open-source example — DeepSeek and Claude are both in the model list, so you switch in a click instead of editing config and restarting.