Connect Claude Code (Anthropic's CLI coding agent) to tuxevil-rotator using the Anthropic-compatible /v1/messages endpoint.
export ANTHROPIC_BASE_URL=http://localhost:51200
export ANTHROPIC_AUTH_TOKEN=tuxevil # or your rk-... Virtual Key
claudeNote: Do NOT include
/v1inANTHROPIC_BASE_URL. Claude Code appends/v1/messagesautomatically.
Add to your ~/.bashrc or ~/.zshrc:
export ANTHROPIC_BASE_URL=http://localhost:51200
export ANTHROPIC_AUTH_TOKEN=tuxevil
export ANTHROPIC_MODEL=claude-sonnet-4-6{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:51200",
"ANTHROPIC_AUTH_TOKEN": "tuxevil",
"ANTHROPIC_MODEL": "claude-sonnet-4-6"
}
}{
"env": {
"ANTHROPIC_BASE_URL": "http://localhost:51200",
"ANTHROPIC_AUTH_TOKEN": "tuxevil"
},
"model": "claude-sonnet-4-6"
}Add .claude/settings.local.json to .gitignore.
claude-sonnet-4-6 (recommended)
claude-opus-4-6-thinking (with extended thinking)
gemini-3.8-flash-high (via Anthropic-compatible adapter)
# Test the endpoint directly
curl -X POST http://localhost:51200/v1/messages \
-H "Authorization: Bearer antigravity" \
-H "anthropic-version: 2023-06-01" \
-H "content-type: application/json" \
-d '{"model": "claude-sonnet-4-6", "max_tokens": 10, "messages": [{"role": "user", "content": "pong"}]}'
# Check inside Claude Code
/status| Variable | Purpose |
|---|---|
ANTHROPIC_BASE_URL |
API base URL (without /v1) |
ANTHROPIC_AUTH_TOKEN |
Auth token sent as Authorization: Bearer — preferred for proxy setups |
ANTHROPIC_API_KEY |
Alternative auth token (sent as x-api-key) — requires one-time approval prompt |
ANTHROPIC_MODEL |
Default model |
ANTHROPIC_AUTH_TOKENis preferred overANTHROPIC_API_KEYfor proxy setups — it takes effect immediately without requiring interactive approval- The rotator's Anthropic adapter supports tool calling (
tool_use/tool_result), thinking blocks, and image input