Claude Code
Claude Code connects to Rabah through three environment variables:
| Variable | Value | Purpose |
|---|---|---|
ANTHROPIC_BASE_URL | https://api.rabah.ai | The base URL — no /v1 |
ANTHROPIC_AUTH_TOKEN | Your key | Authentication |
CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC | 1 | Turns 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.
Option 1: settings.json (recommended)
Section titled “Option 1: settings.json (recommended)”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.
Option 2: set them in the terminal
Section titled “Option 2: set them in the terminal”For a quick try, run this in the terminal window you’ll start Claude Code from:
macOS / Linux
export ANTHROPIC_BASE_URL="https://api.rabah.ai"export ANTHROPIC_AUTH_TOKEN="YOUR_KEY"export CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1Windows PowerShell
$env:ANTHROPIC_BASE_URL="https://api.rabah.ai"$env:ANTHROPIC_AUTH_TOKEN="YOUR_KEY"$env:CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1Windows CMD
set ANTHROPIC_BASE_URL=https://api.rabah.aiset ANTHROPIC_AUTH_TOKEN=YOUR_KEYset CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC=1These 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.
Models and lines
Section titled “Models and lines”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.
Troubleshooting
Section titled “Troubleshooting”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.