Skip to content

Claude Code

Claude Code connects to Rabah through three environment variables:

VariableValuePurpose
ANTHROPIC_BASE_URLhttps://api.rabah.aiThe base URL — no /v1
ANTHROPIC_AUTH_TOKENYour keyAuthentication
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC1Turns off Claude Code’s non-essential traffic to Anthropic, such as telemetry and error reports

The Hub’s Use Key → Claude Code tab generates a copy with your key filled in.

Put this in Claude Code’s settings file; both the terminal Claude Code and the VS Code extension read it:

  • macOS / Linux: ~/.claude/settings.json
  • Windows: %userprofile%\.claude\settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://api.rabah.ai",
"ANTHROPIC_AUTH_TOKEN": "YOUR_KEY",
"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1"
}
}

If the file already has other settings, add these three entries to the existing "env" instead of replacing the file.

For a quick try, run this in the terminal window you’ll start Claude Code from:

macOS / Linux

Terminal window
export ANTHROPIC_BASE_URL="https://api.rabah.ai"
export ANTHROPIC_AUTH_TOKEN="YOUR_KEY"
export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1

Windows PowerShell

Terminal window
$env:ANTHROPIC_BASE_URL="https://api.rabah.ai"
$env:ANTHROPIC_AUTH_TOKEN="YOUR_KEY"
$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1

Windows CMD

Terminal window
set ANTHROPIC_BASE_URL=https://api.rabah.ai
set ANTHROPIC_AUTH_TOKEN=YOUR_KEY
set CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1

These last only as long as that terminal window. To keep them, use option 1, or on macOS / Linux add the three export lines to ~/.zshrc or ~/.bashrc.

Type /model in Claude Code to switch models. To use a specific line, write the model as model:line-code, e.g. claude-sonnet-4-6:pro. See Models and lines.

Requests fail with 404 Most likely ANTHROPIC_BASE_URL is https://api.rabah.ai/v1. Claude Code adds /v1/messages itself, so the address must not end in /v1.

Authentication fails (401) Check that the key is complete and isn’t disabled, expired or out of quota in the Hub.

Changes don’t take effect Quit Claude Code and open it again. If the variables are set both in settings.json and in the terminal, one may override the other; keep just one.