Coding Agents
Use Claude Code
Point Claude Code at camelStream through an Anthropic-compatible gateway
Claude Code can send Anthropic Messages traffic to a gateway. camelStream speaks that protocol.
| Base URL | https://stream.camelai.com |
| Model | auto |
| Auth | ANTHROPIC_AUTH_TOKEN |
| Context window | 260K tokens guaranteed (see the fleet) |
Claude Code's Stream endpoint has no /v1. Use
https://stream.camelai.com, not https://stream.camelai.com/v1.
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
curl -fsSL https://claude.ai/install.sh | bashOr:
npm install -g @anthropic-ai/claude-code2. 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:
export CAMEL_API_KEY="qaml_live_..."
export ANTHROPIC_BASE_URL="https://stream.camelai.com"
export ANTHROPIC_AUTH_TOKEN="$CAMEL_API_KEY"
unset ANTHROPIC_API_KEY
export ANTHROPIC_MODEL="auto"
export ANTHROPIC_DEFAULT_OPUS_MODEL="auto"
export ANTHROPIC_DEFAULT_SONNET_MODEL="auto"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="auto"source ~/.zshrcIf you previously logged into Anthropic inside Claude Code, run /logout
first. The model variables map Claude Code's main and background requests to
auto; gateway discovery does not list non-Claude model IDs.
Do not put the key in a project .claude file or a git repo.
4. Verify
cd /path/to/your/project
claudeInside Claude Code:
/statusYou should see:
Auth token: ANTHROPIC_AUTH_TOKEN
Anthropic base URL: https://stream.camelai.comThe session and Claude Code's Opus, Sonnet, and Haiku aliases now resolve to
auto.
camelStream queues requests when every subscribed stream is busy. Claude Code should keep the HTTP connection open. See Queues & errors.