Bamboo Relay

Claude Code

Connect Claude Code using an Anthropic Messages-compatible model

Create a Bamboo API key in API keys. Choose a model whose channel supports Anthropic Messages in the model marketplace.

Configure your terminal

export BAMBOO_API_KEY="sk-your-api-key"
export ANTHROPIC_BASE_URL="https://api.bamboonode.cn"
export ANTHROPIC_AUTH_TOKEN="$BAMBOO_API_KEY"
export ANTHROPIC_MODEL="your-model-id"
claude

Use the API origin without /v1; Claude Code appends /v1/messages. Replace the model placeholder with an actual model ID available to your key's group.

Test and persist

Start a new conversation with a simple question that does not require tools. Confirm the model and request in usage logs. For persistent setup, use your shell's secret environment or the env section in ~/.claude/settings.json; keep keys out of source control and shared configuration.

If authentication fails, check for conflicting ANTHROPIC_API_KEY or token settings. A chat-only channel cannot serve Messages requests. Tool use also requires a compatible model and channel. Account-specific features of the official service may have additional requirements.

Claude Code documentation.

On this page