deepseek-v4-pro and get the same interface, the same file edits and command runs — at DeepSeek prices. Over one real working day that comes out about 24× cheaper on Flash, and about 4.5× on Pro.
Here’s how it works: RuAPI accepts Claude Code’s requests in Anthropic format (/v1/messages) and translates them into the DeepSeek format itself. To Claude Code it all looks like ordinary Claude — no proxy, no router needed.
This builds on the base Claude Code setup. If Claude Code isn’t installed yet, start there — this page only covers what changes for DeepSeek.
What you’ll need
- A RuAPI key (
sk-...) with a positive balance. Sign up at www.ruapi.ai; top up in USDT — see Top-up. - Claude Code installed —
claude --versionshould print a version number. Installation is on the Claude Code page.
Setup
Open~/.claude/settings.json (on Windows, %USERPROFILE%\.claude\settings.json) and add:
deepseek-v4.1-flash in ANTHROPIC_MODEL too.
What each field does
What each field does
deepseek-v4-pro and deepseek-v4.1-flash.
First run
Open a new terminal so the settings load, and go into a project:deepseek-v4-pro (not Claude) and the tokens it spent — that’s your confirmation it’s going through DeepSeek.
What to expect
- Tools work. Reading and editing files, running commands, searching the project — Claude Code’s whole agent loop runs through DeepSeek.
- Streaming is on: the answer prints as it’s generated.
- You’ll see the reasoning. DeepSeek V4 is a reasoning model, so before answering Claude Code sometimes shows a thinking block. That’s expected.
DeepSeek can’t read images. Paste a screenshot into Claude Code and DeepSeek won’t process it — the line has no vision. For that, switch to a vision model mid-session with
/model claude-sonnet-5.When to go back to Claude
DeepSeek V4 Pro handles almost everything, but now and then you want top quality. Without leaving the session, switch the model:deepseek-v4-pro. It’s convenient to keep DeepSeek as the default and bring in Claude only for the hardest spots or image tasks. One RuAPI key covers every model, with no surcharge for switching.
How much it saves
Saving money is the whole point of the combo. For one real day of Claude Code — 405 million tokens — the bill on Claude Sonnet 4.6 would be $167; ondeepseek-v4.1-flash it’s about $7 (roughly 24× less), and on deepseek-v4-pro about $37. The line-by-line breakdown is in DeepSeek vs Claude: what one day of work actually costs.
Troubleshooting
401 / Invalid token
401 / Invalid token
ANTHROPIC_AUTH_TOKEN must be a RuAPI key (sk-...), not an Anthropic key (sk-ant-...). Check for stray spaces when copying, and that the token is active in Console → API Keys.Model not found (503) or 404
Model not found (503) or 404
Check the spelling:
deepseek-v4-pro, deepseek-v4-flash, deepseek-v4.1-flash. And don’t append /v1 to ANTHROPIC_BASE_URL.403 / insufficient balance
403 / insufficient balance
Top up in USDT — see Top-up. Tokens burn slowly on DeepSeek, but long tool-heavy sessions still spend from your balance.
Images aren't processed
Images aren't processed
That’s by design: DeepSeek has no vision. Switch to a vision model with
/model — see Claude models.Next
Base Claude Code setup
Install, configuration methods and provider switching.
DeepSeek vs Claude: cost of a day
A line-by-line breakdown: about 24× cheaper on Flash.
DeepSeek API
Pro and Flash: how they differ and what they do.
Top up your balance
USDT, networks and top-up discounts.