Claude Code + DeepSeek V4 Building Tutorial: API Fees Dropped by 90% (15 Minutes)
DeepClaude Complete Configuration Guide: Use DeepSeek V4 to replace Anthropic API to run Claude Code. Contains three steps of environment configuration, JSON setting file template, and switching verification, retaining the original workflow.
Beginner · 15 min · May 4, 2026
Tutorial Objectives
Within 15 minutes, DeepClaude was used to switch the inference backend of Claude Code from Anthropic to DeepSeek V4 Pro, and the API fee was reduced from $15/M token to $0.87/M, saving more than 90% of the cost while maintaining complete independent coding capabilities.
What will you build?
- DeepClaude installation and configuration - one command to complete
- Multiple backend switching capabilities - DeepSeek, OpenRouter can be switched at will
- Remote control mode - control Claude Code from the browser
- VS Code integration — one-click switching within the IDE
Preparation list
- DeepSeek API Key (free registration, minimum deposit of $5)
- Claude Code CLI (installed, with Anthropic account)
- macOS/Linux Terminal (PowerShell is also supported on Windows)
Overall architecture
The entire system only replaces the "brain", no hands or feet are touched. Claude Code's tooling loop (file editing, bash execution, git operations) remains the same, with API calls directed to DeepSeek.
| Module | Input | Output | Estimated time |
|---|---|---|---|
| Get API Key | Register DeepSeek Platform | sk-xxx key | 2 minutes |
| Install DeepClaude | GitHub repository | deepclaude command | 1 minute |
| First run | deepclaude command | Claude Code + DeepSeek | 2 minutes |
| Multiple backend switching | --backend parameter | Different inference models | 1 minute |
| VS Code integration | Configure terminal profile | Switch within IDE | 5 minutes |
| Remote control | --remote parameter | Browser control | 3 minutes |
Step 1: Obtain DeepSeek API Key
Visit platform.deepseek.com to register an account, click API Keys to create a new key, recharge $5-$10 and copy the key.
export DEEPSEEK_API_KEY="sk-your-key-here"提示:写入
~/.bashrc或~/.zshrc免重复设置。
第 2 步:安装 DeepClaude
git clone https://github.com/aattaran/deepclaude.git
cd deepclaude
chmod +x deepclaude.sh
sudo ln -s "$(pwd)/deepclaude.sh" /usr/local/bin/deepclaude第 3 步:启动 DeepClaude
直接运行 deepclaude 即可启动 Claude Code CLI,所有 API 请求自动指向 DeepSeek V4 Pro($0.87/M output token)。
第 4 步:多后端灵活切换
deepclaude --backend ds # DeepSeek(默认)
deepclaude --backend or # OpenRouter(美国服务器)
deepclaude --backend fw # Fireworks AI(最快推理)
deepclaude --backend anthropic # 回到 Anthropic Opus第 5 步:实时切换(高级功能)
安装代理后,Claude Code 会话内输入 /deepseek 即可秒切后端,无需重启。
第 6 步:远程控制
deepclaude --remote在任何浏览器中操控 Claude Code,手机平板上也能使用。
费用对比
| 使用场景 | Anthropic Max | DeepClaude | 节省 |
|---|---|---|---|
| 轻度使用 | $200/月 | ~$20/月 | 90% |
| 重度使用 | $200/月 | ~$50/月 | 75% |
| 自动循环 | $200/月 | ~$80/月 | 60% |
常见问题
DeepClaude 和直接用 Claude Code 有什么区别?
完全相同的操作界面,只替换了推理后端。日常 80% 任务 DeepSeek 表现与 Claude Opus 相当。
能用图片输入吗?需要 Anthropic 账号吗?
不支持图片输入。需要视觉任务切 --backend anthropic。Claude Code CLI 需要登录,但 API 调用可全走 DeepSeek。
工具词条
Claude Code、DeepSeek、OpenRouter、Fireworks AI、Anthropic
Reference link
Internal link guidance
- Someone has successfully practiced it: Claude Code 48小时创业:一人+29美元月费,3个月做到月入$9,000
- Newbies should read the tutorial first: 如何用 DeepSeek V4 替代 Anthropic 跑 Claude Code:5 分钟省 90% API 费用
Claude Code topic related tutorials
- DeepSeek V4 vs Claude Code 实测:同样效果,价格只要 1/10
- Claude Code 自动化写作实战:30 分钟搭建 AI 内容生产流水线
- GitHub Copilot 价格完全指南 2026:按用量收费后各套餐实测费用对比
- VS Code Copilot AI 署名怎么关:一行命令去掉 Co-Authored-by
- DeepSeek R2 完整评测:1.7T 参数 vs GPT-5 vs V4 实测对比
- DeepSeek Reasonix 实战:零成本搭建 AI 编程 Agent(30 分钟教程)
- DeepSeek V4 vs Claude Code 实测:同样效果,价格只要 1/10
- 本地跑 70B 大模型不是梦:Intel AutoRound 量化实战教程
Related tutorials
AI Coding Agents Complete Guide: Setup, Security, Workflow & Case Studies
If you are researching AI coding agents and want to know which one to use, how to set it up safely, and what real developers are building with them — this hub organizes every tutorial, case study, and comparison we have published. Start with the decision guide below to find the right path for your skill level and goals.
AI Micro SaaS FAQ: 25 Common Questions Answered (2026)
Everything you need to know about building and profiting from AI Micro SaaS products. This FAQ covers idea generation, tech stack choices, pricing strategy, marketing on a $0 budget, legal considerations, and scaling from $100 to $10K MRR. Based on real case studies and data from successful solo builders using Claude Code, Cursor, and other AI coding tools.
Topic hub
AI Coding Tools Hub (2026)
From Copilot pricing changes to Claude Code + DeepSeek cost-saving setups—one place to compare tools, read explainers, and follow tutorials.
Explore AI Coding Tools Hub (2026) →Monetization angle
How can you make money from this trend?
WayToClawEarn focuses on verified earn playbooks—not just news. Start from these cases.
DeepSeek + Claude Code Micro SaaS
Run multiple small products on cheap inference
Claude Code bug bounty
Productize agent skills into security services