AGI Point / Learn / DeepSeek in Claude Code
How to use DeepSeek in Claude Code (and what it really costs)
Claude Code can run on DeepSeek instead of Claude: same app, same folder, a fraction of the price. Here's the 4-line setup, current prices, and an honest look at what you trade for the savings.
Updated October 20, 2026 · by AGI Point
Short answer: Claude Code can run on DeepSeek's servers through DeepSeek's Anthropic-compatible endpoint. Set ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic, your DeepSeek API key and the model deepseek-flash, then type claude. You pay DeepSeek per use instead of a monthly plan.
Step 1. Get a DeepSeek API key
On platform.deepseek.com: sign up, top up a few dollars, then API Keys → Create. Keep the key private.
Step 2. Install Claude Code
Install Node.js from nodejs.org, then in Terminal (Mac) or PowerShell (Windows):
npm install -g @anthropic-ai/claude-code
Step 3. Point Claude Code at DeepSeek
Mac or Linux, in the same Terminal window (Windows PowerShell: use $env:NAME="value" instead of export):
export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN=your-deepseek-api-key
export ANTHROPIC_MODEL=deepseek-flash
export ANTHROPIC_DEFAULT_HAIKU_MODEL=deepseek-flash
cd ~/Documents/my-games
claude
This is the short version of DeepSeek's own setup docs. Claude Code then builds and saves files in your folder as usual.
What it costs
| DeepSeek V4.1 Flash (deepseek-flash) | Price per 1 million tokens |
|---|---|
| Input | $0.30, or $0.15 off-peak |
| Output (the code it writes) | $1.20, or $0.60 off-peak |
From DeepSeek's pricing page, October 19, 2026. Off-peak is half price: weekends, and weekdays outside 01:00–04:00 and 06:00–10:00 UTC. Prices change: check the page before you rely on them.
In our own test, the same game prompt cost $73.80 with Claude Opus and $0.34 with DeepSeek. A small browser game usually costs cents.
The trade-off
Cheap models are great for simple browser games and quick experiments. For the most polished games and long projects, Claude Opus still builds noticeably better, which is what the price difference pays for. Your prompts and code go to the model's servers: never paste passwords or private data.
Free options with nothing to install: DeepSeek's web chat (chat.deepseek.com), Qwen (chat.qwen.ai), Kimi (kimi.com), GLM (chat.z.ai) and MiniMax all accept the same game prompt from our game tutorial.

Get the free step-by-step PDF
The full free guide: which plan and model to pick, the exact prompts, how to fix bugs, share a free link and make it cheaper with DeepSeek. Sent to your inbox.
Get the free guide →Questions
Can Claude Code use DeepSeek?
Yes. DeepSeek offers an Anthropic-compatible endpoint at api.deepseek.com/anthropic, so Claude Code works with a DeepSeek API key by setting ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN and ANTHROPIC_MODEL.
Is DeepSeek cheaper than Claude?
Much cheaper per token. In our test one game cost $0.34 on DeepSeek V4.1 Flash versus $73.80 on Claude Opus, but Opus produced the more polished game.
How do I switch back to Claude?
Close the terminal window (the export lines only last for that window) or unset the ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN and ANTHROPIC_MODEL variables, then run claude again.
