camelAI Documentation

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 URLhttps://stream.camelai.com
Modelauto
AuthANTHROPIC_AUTH_TOKEN
Context window260K 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

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"
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"
Terminal
source ~/.zshrc

If 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

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

The 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.

What's next?