All models, capabilities, and prices

Claude Code

Anthropic's CLI on the API-AI endpoint. Setup is two env vars and a verify call.

Install

bash
brew install anthropic/claude-code/claude
# or:
npm i -g @anthropic-ai/claude-code

Option 1: environment variables (current session)

The fastest path is to set the variables only in the current terminal. They won’t persist across sessions — see “Make persistent” at the bottom if you want them to survive a reboot.

bash
export ANTHROPIC_BASE_URL=https://api-ai.app
export ANTHROPIC_API_KEY=mdf-your-key

Option 2: persistent settings

Claude Code reads user settings from settings.json. The default model and family aliases below come from the catalog’s current active models.

File path: ~/.claude/settings.json

json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api-ai.app",
    "ANTHROPIC_API_KEY": "mdf-your-key",
    "ANTHROPIC_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-4-8",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5"
  },
  "model": "claude-sonnet-5-5"
}

Verify

bash
claude ask "say hi in one sentence"

You should see a single-sentence reply within a second or two. If you see 401, the key is wrong; 400 invalid_request_error means the model name doesn’t match the canonical list (the response lists the supported ids).

Common issues

Claude Code asks me to log in — what now?
You don’t need to log in. The API key works without OAuth. Skip the login screen or sign in with any account — it does not affect your API-AI key. If the prompt gets in the way, clear the OAuth token:
bash
# macOS / Linux
unset ANTHROPIC_AUTH_TOKEN

# Windows PowerShell
Remove-Item Env:\ANTHROPIC_AUTH_TOKEN
Then restart Claude Code. Full write-up: Troubleshooting · Claude Code login.
JSON parse error in settings.json (or an unexplained 429)
The most common cause is “smart” quotes (“ ”) in ~/.claude/settings.json. They appear when you paste from messengers or Notion, and the JSON parser rejects them. Sometimes a broken config surfaces as a 429 because the client interprets upstream silence as a rate limit. One-line fix:
bash
# validate the file
jq . ~/.claude/settings.json

# auto-replace smart quotes with ASCII
sed -i.bak 
  

s/[\u201c\u201d]/"/g' ~/.claude/settings.json
Best prevention: copy the config straight from this documentation — the quotes are already correct here. Full write-up: Troubleshooting · JSON parse / 429.
Connections drop — do I need a VPN?
No VPN needed, and a VPN usually hurts. API-AI doesn’t geoblock traffic; VPN or VLESS proxies frequently break SSE streaming (the response cuts off mid-output) and HTTP/2 ALPN. If Claude Code dies mid-output for no obvious reason, disable the VPN and retry. Full write-up: Troubleshooting · VPN.

Full list of 400 / 401 / 403 / 404 / 429 / 503 / 504 symptoms → causes → fixes lives on the Troubleshooting page.

Tool use

Claude Code uses the Anthropic-native tools schema. Our gateway accepts every tool name (Read, Write, Edit, Bash, Grep, Glob, TodoWrite, etc.) with tool_choice: auto — which is what the CLI emits by default. No anthropic-beta header is required.

If your custom orchestrator sets tool_choice: {"type": "any"} or tool_choice: {"type": "tool", "name": "X"}, our shim rewrites those to auto + a system-prompt nudge. See Tool use for the full table.

Where the auth header is sent
Claude Code sends x-api-key by default. The gateway accepts both that and Authorization: Bearer — either works. If you’ve patched the CLI to inject Bearer, you don’t need to undo it.

Make persistent

Once everything works and you want the variables to survive across terminal sessions, add them to your shell rc-file (macOS / Linux) or to the user environment registry (Windows). New terminals will pick them up automatically.

bash
# append to ~/.zshrc (default macOS shell)
cat >> ~/.zshrc <<'EOF'
export ANTHROPIC_BASE_URL=https://api-ai.app
export ANTHROPIC_API_KEY=mdf-your-key
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1
EOF
# apply to the current session:
source ~/.zshrc
Last updated: October 2, 2026Found a bug? admin@minedom-france.fr