Claude Code CLI
Connect the Claude Code CLI to GetVibe API: ANTHROPIC_BASE_URL, ANTHROPIC_AUTH_TOKEN and model selection through environment variables.
Ready-made config
Built from our catalog on request: the API address, every published model with its context and output limit, and the recommended settings. It contains no key. Claude Code reads the key from GETVIBE_API_KEY through apiKeyHelper — set it in your environment. On Windows without WSL set ANTHROPIC_AUTH_TOKEN instead.
# macOS / Linux
mkdir -p ~/.claude
curl -fsSL https://getvibeapi.com/api/integrations/claude-code.json -o ~/.claude/settings.json# Windows PowerShell
New-Item -ItemType Directory -Force "$HOME\.claude" | Out-Null
Invoke-WebRequest https://getvibeapi.com/api/integrations/claude-code.json -OutFile "$HOME\.claude\settings.json"- Main model —
claude-opus-5.5: the strongest Claude we serve over /v1/messages. - Small tasks —
claude-haiku-4.5: the cheapest Claude, used by Claude Code for background tasks. - Streaming on, a 600-second request timeout, reasoning effort medium: a long reasoning answer takes minutes, and without streaming it runs into the wait limit.
- Bare model IDs everywhere, no :suffix — that keeps automatic failover to a healthy channel on.
?models= with comma-separated IDs to the URL.Claude Code is the official Anthropic CLI for agentic coding. It works through the /v1/messages endpoint with the x-api-key header.
1. Open a terminal
Windows: Start → type PowerShell → Enter. macOS: Terminal (Applications → Utilities). The npm install needs Node.js 22 or later (node --version) — the block below installs the CLI itself. Prefer no Node.js? Anthropic's native installer works too: curl -fsSL https://claude.ai/install.sh | bash (macOS/Linux) or irm https://claude.ai/install.ps1 | iex (PowerShell); then set the variables below in a new window.
2. Paste one block and press Enter
The block installs the CLI, saves the settings for good (setx), applies them in the current window and starts the program. Replace sk-pv-… with your key.
Windows (PowerShell)
npm.cmd install -g @anthropic-ai/claude-code
setx ANTHROPIC_BASE_URL "https://getvibeapi.com"
setx ANTHROPIC_AUTH_TOKEN "sk-pv-…"
$env:ANTHROPIC_BASE_URL="https://getvibeapi.com"
$env:ANTHROPIC_AUTH_TOKEN="sk-pv-…"
$env:ANTHROPIC_API_KEY=""
claude.cmdmacOS / Linux
npm install -g @anthropic-ai/claude-code
export ANTHROPIC_BASE_URL="https://getvibeapi.com"
export ANTHROPIC_AUTH_TOKEN="sk-pv-…"
export ANTHROPIC_API_KEY=""
claudehttps://getvibeapi.com (without /v1): the CLI adds the suffix itself. The key goes into ANTHROPIC_AUTH_TOKEN, and ANTHROPIC_API_KEY stays empty: if an Anthropic key is already saved on the machine, Claude Code would otherwise warn about two conflicting keys. After setx, new PowerShell windows pick the settings up; windows that were already open do not.Where to type
Once it starts, the line with the > sign at the bottom of the window is where you type and press Enter:
+---------------------------------------+
| |
| > _ |
| |
+---------------------------------------+The first run asks for a theme (press Enter) and whether you trust the folder (choose Yes, I trust this folder). For real work, start the CLI from your project folder.
3. Check the connection
Send any message and open Dashboard → Usage: a fresh record appears with the model and the spend. Inside Claude Code, /status shows an Anthropic base URL line — it must show our address.
Choosing models (optional)
By default Claude Code uses the catalog’s default model. Override it with environment variables:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "sk-pv-…",
"ANTHROPIC_BASE_URL": "https://getvibeapi.com",
"ANTHROPIC_API_KEY": "",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5.5",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5.5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5.5"
}
}If you prefer settings.json
The same result comes from the file ~/.claude/settings.json. On Windows: %USERPROFILE%\.claude\settings.json. Paste the key itself: Claude Code does not expand variables such as $GETVIBE_API_KEY inside settings.json, so that string would be sent as the key and the request rejected.
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "sk-pv-…",
"ANTHROPIC_BASE_URL": "https://getvibeapi.com",
"ANTHROPIC_API_KEY": ""
}
}Common issues
| Parameter | Type | Description |
|---|---|---|
401 | error | Check the ANTHROPIC_AUTH_TOKEN value: settings.json must hold the sk-pv-… key itself, not a $variable. |
Requests go to Anthropic | config | ANTHROPIC_BASE_URL did not reach Claude Code: open a new window after setx, or set the address in settings.json. Check the Anthropic base URL line in /status. |
404 | error | ANTHROPIC_BASE_URL picked up /v1 — it must be the root address without the suffix. |
npm.ps1 is blocked | Windows | That is the PowerShell execution policy. Use npm.cmd and claude.cmd as in the block above — no policy change needed. |
"node is not recognized" | Windows | Node.js is not installed, or the window predates the install: install Node.js LTS and open a NEW PowerShell window. |
claude native binary not installed / warn install-scripts | npm | Newer npm versions skip the Claude Code install step by default. Run npm config set "allow-scripts=@anthropic-ai/claude-code" --location=user and install again, or use the native installer. |
Variables are not picked up | config | settings.json is more reliable than shell profiles — especially on Windows. |