Claude Code + DeepSeek

Run Claude Code on a flat-rate DeepSeek backend.

Claude Code can send Anthropic Messages traffic through a gateway. Point it at camelStream and keep the terminal workflow while DeepSeek V4 Flash handles the model calls.

Why this setup

Keep the agent. Change the inference bill.

01

Keep the Claude Code workflow

Use Claude Code's terminal interface, project context, and tool loop while routing model traffic through Stream.

02

One model across the session

Map the main model and Claude Code aliases to DeepSeek V4 Flash so background work uses the same endpoint.

03

Predictable inference cost

Long coding sessions use your subscribed Stream capacity instead of accumulating per-token charges.

Configuration

Connect Claude Code to Stream.

1. Create your Stream API key

Generate a key in the Stream console and keep it in CAMEL_API_KEY. Stream keys are shown once.

2. Set the gateway and model

Use the Anthropic base URL without /v1, authenticate with ANTHROPIC_AUTH_TOKEN, and map Claude Code's model aliases to deepseek-v4-flash.

3. Verify the connection

Start Claude Code in a test repository and run /status. Confirm the Anthropic base URL is https://stream.camelai.com before starting a small task.

Terminal setup
Stream endpoint
export CAMEL_API_KEY="qaml_live_..."
export ANTHROPIC_BASE_URL="https://stream.camelai.com"
export ANTHROPIC_AUTH_TOKEN="$CAMEL_API_KEY"
export ANTHROPIC_MODEL="deepseek-v4-flash"
export ANTHROPIC_DEFAULT_OPUS_MODEL="deepseek-v4-flash"
export ANTHROPIC_DEFAULT_SONNET_MODEL="deepseek-v4-flash"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="deepseek-v4-flash"

claude

Troubleshooting

Check these details first.

Most connection issues come down to the endpoint, API mode, model ID, or key. Start with these checks.

01

Use https://stream.camelai.com without /v1. Claude Code adds the Anthropic API path itself.

02

Use ANTHROPIC_AUTH_TOKEN so the Stream key is sent as an Authorization bearer token.

03

If Claude Code keeps using an Anthropic account, run /logout and restart it from the shell containing the Stream variables.

04

Anthropic documents gateways but does not endorse routing Claude Code to non-Claude models.

Frequently asked questions

Before you connect.

Give your coding agent room to work.

DeepSeek V4 Flash through an OpenAI-compatible API with unlimited token usage for one fixed monthly price.

Get your API key