camelAI Documentation

Start Here

Use Claude Code

Point Claude Code at Camel Stream through an Anthropic-compatible gateway

Claude Code can send Anthropic Messages traffic to a gateway. Camel Stream speaks that protocol.

Base URLhttps://stream.camelai.com
Modeldeepseek-v4-flash
AuthANTHROPIC_AUTH_TOKEN
Context window256k input tokens

Claude Code's Stream endpoint has no /v1. Use https://stream.camelai.com, not https://stream.camelai.com/v1. Set ANTHROPIC_API_KEY to an empty string so Claude Code does not keep using a previous Anthropic login.

Anthropic documents LLM gateways but does not endorse routing Claude Code to non-Claude models. This setup is Claude Code compatible, not Anthropic-endorsed. See Connect Claude Code to an LLM gateway.

1. Install Claude Code

Terminal
curl -fsSL https://claude.ai/install.sh | bash

Or:

Terminal
npm install -g @anthropic-ai/claude-code

2. Create a Stream key

Generate an API key in the Stream console. It is shown once.

3. Point Claude Code at Stream

Add this to ~/.zshrc or ~/.bashrc, then reload your shell:

Terminal
export CAMEL_API_KEY="qaml_live_..."
export ANTHROPIC_BASE_URL="https://stream.camelai.com"
export ANTHROPIC_AUTH_TOKEN="$CAMEL_API_KEY"
export ANTHROPIC_API_KEY=""
export CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY="1"
Terminal
source ~/.zshrc

If you previously logged into Anthropic inside Claude Code, run /logout first.

To persist the same settings without exporting them every session, merge this into user-level ~/.claude/settings.json:

~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://stream.camelai.com",
    "ANTHROPIC_AUTH_TOKEN": "qaml_live_...",
    "ANTHROPIC_API_KEY": "",
    "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1"
  }
}

Do not put the key in a project .claude file or a git repo.

4. Verify

Terminal
cd /path/to/your/project
claude

Inside Claude Code:

/status

You should see:

Auth token: ANTHROPIC_AUTH_TOKEN
Anthropic base URL: https://stream.camelai.com

Then run /model and choose deepseek-v4-flash. Gateway discovery reads Stream's /v1/models endpoint.

Camel Stream queues requests when every subscribed stream is busy. Claude Code should keep the HTTP connection open. See Queues & errors.

What's next?