SDK / Integrations/App integrations
Claude Code
Two environment variables point Claude Code at APIONE — and any vendor's model.
On this page
Claude Code speaks the Anthropic protocol, so ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN are all it takes.
Configuration
bash
export ANTHROPIC_BASE_URL="https://api.apione.ai"
export ANTHROPIC_AUTH_TOKEN="YOUR_APIONE_KEY"
claudePut them in ~/.zshrc or ~/.bashrc to avoid re-exporting. With direnv, a per-project .envrc is cleaner still.
Choosing models
bash
export ANTHROPIC_MODEL="claude-opus-4-7"
export ANTHROPIC_SMALL_FAST_MODEL="claude-haiku-4-5-20251001"Use plain model IDs. You can also point at another vendor entirely (glm-5.3) — the gateway translates.
Verify
bash
curl -s https://api.apione.ai/v1/messages \
-H "x-api-key: $ANTHROPIC_AUTH_TOKEN" \
-H "anthropic-version: 2023-06-01" \
-H "Content-Type: application/json" \
-d '{"model":"claude-haiku-4-5-20251001","max_tokens":16,
"messages":[{"role":"user","content":"ping"}]}'If content comes back, the configuration is right — start Claude Code.
Troubleshooting
| Symptom | Fix |
|---|---|
| Still hitting the official API | Variables not in scope — run echo $ANTHROPIC_BASE_URL in the same shell |
404 | An extra /v1 in the base URL |
400 model_not_supported | Model ID misspelled or not available |
401 | Set ANTHROPIC_API_KEY instead of ANTHROPIC_AUTH_TOKEN, or both are set and conflict |
Note
Once the key points at APIONE, usage lands on your APIONE bill — usage can show this machine's spend on its own key.
Contact us
Something unclear, or need a human? Pick the channel that fits your question.
Supportsupport@apione.ai
WeCom
Telegram
Communityhttps://t.me/apione
Support tickets
Billing & accountConsole › Feedback