Connecting
Claude Code
Two environment variables and Claude Code runs through AliCode.
Setup
export ANTHROPIC_BASE_URL=https://api.alicode.store export ANTHROPIC_API_KEY=sk-ali-••• # pick the model yourself — any id from /v1/models export ANTHROPIC_MODEL=anthropic/claude-sonnet-4.6 claude
Tips
◆
Switch on the fly — the /model command inside a Claude Code session, e.g. /model openai/gpt-4o or /model google/gemini-2.5-pro. You can name ANY model, not just Claude. Without ANTHROPIC_MODEL Claude Code sends its own default — so set the model explicitly via env or /model.
◆
Grab the exact model id from the "Models" tab in your dashboard (copy button next to each) or from GET /v1/models. That is the value for ANTHROPIC_MODEL and for /model.