← All integrations
Terminal coding agentAnthropic MessagesVerified

Use DeepSeek V4 with Claude Code

Connect Claude Code to DeepSeek V4 through the DeepSeek-V4.io Anthropic Messages endpoint.

DeepSeek-V4.io is an independent API gateway, not the official DeepSeek website. A paid DeepSeek-V4.io key is required.

How the integration works

Claude Code reads Anthropic-compatible environment variables. Point its base URL at DeepSeek-V4.io and use a paid DeepSeek-V4.io API key; the gateway handles the upstream provider and model mapping.

One site key

Create and manage it on /developer.

Anthropic Messages

The client talks to its native compatible endpoint.

Upstream hidden

Provider credentials and routing stay on the server.

Before you start

  • Claude Code installed and launched successfully
  • A paid DeepSeek-V4.io account with an API key from /developer
  • A fresh terminal session after changing environment variables

Configure Claude Code

1.Set the API endpoint and key
export DEEPSEEK_V4_API_KEY="your-deepseek-v4-io-key"
export ANTHROPIC_BASE_URL="https://deepseek-v4.io/api"
export ANTHROPIC_AUTH_TOKEN="$DEEPSEEK_V4_API_KEY"
export ANTHROPIC_API_KEY=""
export ANTHROPIC_MODEL="deepseek-v4-flash"
2.Start Claude Code
cd /path/to/your/project
claude

Verify the setup

Verified against the public DeepSeek-V4.io gateway with Claude Code 2.1.196 on 2026-08-12.

  1. 1Ask Claude Code to inspect one file without changing it.
  2. 2Ask it to call a read-only tool and use the result in its final answer.
  3. 3Confirm streaming completes and the request appears in the Developer usage view.

Troubleshooting

401 authentication error

Create a paid DeepSeek-V4.io key and confirm ANTHROPIC_AUTH_TOKEN contains that key, not a DeepSeek Platform or OpenRouter key.

404 endpoint error

Use ANTHROPIC_BASE_URL=https://deepseek-v4.io/api. Claude Code appends /v1/messages itself.

Old provider is still used

Open a new terminal after exporting the variables, then start a new Claude Code session.

Sources and support boundary

Configuration fields are checked against the tool publisher's documentation. DeepSeek-V4.io owns this gateway guide and support for its endpoint; it does not represent the tool publisher.

Ready to connect Claude Code?

Create a DeepSeek-V4.io API key, copy the configuration above, and verify one read-only tool call before using it on a real project.

Open Developer Dashboard