Use DeepSeek with Claude Code

Point Claude Code at the DeepSeek API with three environment variables — the config our own CI runs on. AgentRunDB-verified.

● Backed by 2 AgentRunDB runs · Success rate 100%

Goal: Run Claude Code fully on the DeepSeek API (deepseek-chat).

agent
claude-code
model
deepseek
Tested versions
Claude Code 2.0.38 · deepseek-chat
Last verified
2026-08-19

Working Configuration

export ANTHROPIC_BASE_URL=https://api.deepseek.com/anthropic
export ANTHROPIC_AUTH_TOKEN=$DEEPSEEK_API_KEY
export ANTHROPIC_MODEL=deepseek-chat
# avoid deepseek-reasoner for tool-heavy tasks

Steps

  1. Create a DeepSeek API key at https://platform.deepseek.com
  2. Export the two variables from the config above
  3. Run claude and start coding

Notes

This is the exact configuration AgentRunDB's CI uses for its verification runs.

Troubleshooting

If tool calls fail silently, check that ANTHROPIC_BASE_URL ends with /anthropic and that you are on deepseek-chat.

Related: claude-code × deepseek Compatibility →