Run DeepSeek in Claude Code
Keep Claude Code's powerful agent workflow — project-aware editing, tool use, bash execution — while swapping the underlying model to DeepSeek-V4 Pro (or any supported model). One-time setup, 5 minutes, transparent after that.
$ claude
> /model
Select model
❯ Sonnet 4.6
> Ready. Using DeepSeek-V4 Pro.
Let's build something.Quick Start — one command, 30 seconds
Paste this in your terminal — it installs everything and guides you through setup:
$ curl -fsSL https://chatgpttech.mobi/install.sh | bashInstall Claude Code
Claude Code is Anthropic's agentic coding tool. Install it globally:
npm install -g @anthropic-ai/claude-codeOr use Homebrew: brew install claude-code
See Anthropic's official docs for more installation options.
Get your API key from chatgpttech.mobi
- Register an account at chatgpttech.mobi
- Go to API Keys in the dashboard
- Click "Create API Key" and copy it
sk-hub-xxxxxxxxxxxxxxxxYour key format should start with sk-hub-.
Configure model mapping
In the chatgpttech.mobi dashboard, set up a model alias that maps what Claude Code sees (source) to what actually runs (target):
| Source (Claude Code model) | → | Target (runs on our proxy) |
|---|---|---|
| claude-sonnet-4-6 | → | deepseek-v4-pro |
| claude-sonnet-4-6[1M] | → | deepseek-v4-pro |
| claude-opus-4-7 | → | deepseek-v4-pro |
| claude-opus-4-7[1M] | → | deepseek-v4-pro |
| claude-sonnet-4-7 | → | deepseek-v4-pro |
| claude-haiku-4-5 | → | deepseek-v4-flash |
Configure this at app.chatgpttech.mobi/aliases under Model Aliases. You can use any model from chatgpttech.mobi/models as the target.
Set environment variables
Add these lines to your shell config file. The empty ANTHROPIC_API_KEY is important — it tells Claude Code to use the custom base URL and auth token instead of the default Anthropic API key.
# Add to ~/.zshrc (or ~/.bashrc for bash users)
export TECHMOBI_API_KEY="sk-hub-${YOUR_KEY}"
export ANTHROPIC_BASE_URL="https://api.chatgpttech.mobi/"
export ANTHROPIC_AUTH_TOKEN="$TECHMOBI_API_KEY"
export ANTHROPIC_API_KEY="" # Important: Must be explicitly emptyAfter saving: Run source ~/.zshrc (or source ~/.bashrc) to apply the changes, or open a new terminal window.
Launch Claude Code and select your model
Run claude in your terminal, then type /model to open the model selector.
Pick the model you mapped in Step 3 — for example, select Sonnet 4.6 if you mapped claude-sonnet-4-6 to your DeepSeek target. The proxy transparently routes your request.
That's it! Claude Code now runs with your chosen model.
Recommended Alias Mappings
Configure these source → target pairs in your dashboard. Claude Code sees the source model; the proxy routes to the target.
| Source (Claude Code /model) | Source Model ID | → Target | Notes |
|---|---|---|---|
| Opus 4.7 (1M context) | claude-opus-4-7[1M] | deepseek-v4-pro | Most capable, for complex tasks |
| Opus 4.7 | claude-opus-4-7 | deepseek-v4-pro | Standard context window |
| Sonnet 4.7 | claude-sonnet-4-7 | deepseek-v4-pro | Latest Sonnet, great all-rounder |
| Sonnet 4.6 (1M context) | claude-sonnet-4-6[1M] | deepseek-v4-pro | Long sessions, large codebases |
| Sonnet 4.6 | claude-sonnet-4-6 | deepseek-v4-pro | Best for everyday tasks |
| Haiku 4.5 | claude-haiku-4-5 | deepseek-v4-flash | Fastest, quick answers |
Any model from chatgpttech.mobi/models can be set as the target. These are the recommended pairings — you can customize them.
FAQ & Tips
P.S. If the model switch doesn't take effect right away, try restarting your terminal. A fresh shell session ensures all environment variables are loaded cleanly.