Claude Code

Use Claude models in Claude Code through SipToken.

Before you start

  • A SipToken key in the Official group. If you don't have one yet, see Quickstart.
  • Base URL: https://api.siptoken.ai. No /v1: Claude Code appends /v1/messages itself.
  • Available models: claude-opus-5-5, claude-sonnet-5-5, claude-haiku-5-5, claude-haiku-4-5.

Older versions of Claude Code don't recognize the newer models:

ModelMinimum Claude Code version
claude-opus-5-5v2.1.280
claude-sonnet-5-5v2.1.284
claude-haiku-5-5v2.1.293

Install

System requirements: macOS 13 or later, Windows 10 1809 or later, Ubuntu 20.04 or later, or Debian 10 or later. On Windows, install Git for Windows first.

macOS / Linux / WSL:

curl -fsSL https://claude.ai/install.sh | bash

Windows PowerShell:

irm https://claude.ai/install.ps1 | iex

You can also use a package manager:

# macOS Homebrew
brew install --cask claude-code
# Windows WinGet
winget install Anthropic.ClaudeCode

Installing with npm requires Node.js 22 or later. Don't use sudo:

npm install -g @anthropic-ai/claude-code@latest

If it's already installed, upgrade with claude update. Install docs: code.claude.com/docs/en/setup.

Configure

We recommend putting the settings in Claude Code's user settings file. They then apply every time it starts.

macOS / Linux

The file is ~/.claude/settings.json. Create it if it doesn't exist:

mkdir -p ~/.claude
nano ~/.claude/settings.json

Windows

The file is %USERPROFILE%\.claude\settings.json. Open it from PowerShell:

New-Item -ItemType Directory -Force "$env:USERPROFILE\.claude" | Out-Null
notepad "$env:USERPROFILE\.claude\settings.json"

File contents

The contents are the same on both systems:

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.siptoken.ai",
    "ANTHROPIC_AUTH_TOKEN": "sk-xxxxxxxx",
    "ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5-5",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-5-5"
  }
}
  • ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN are required. Replace sk-xxxxxxxx with your key.
  • The last three lines are optional. They pin Claude Code's Opus, Sonnet and Haiku slots to SipToken model IDs. Haiku is also used for small background tasks.
  • If the file already has other settings, add these entries to the existing env block instead of overwriting the whole file.

Use ANTHROPIC_AUTH_TOKEN, not ANTHROPIC_API_KEY. The first is sent as a Bearer token and works right away. The second needs a one-time manual approval on first launch, and setting both triggers a conflict warning.

If you used to log in with a claude.ai account, run /logout once after starting Claude Code.

Import with CC Switch

If you'd rather not edit the file by hand, CC Switch can manage it for you and switch between setups. See CC Switch.

Temporary environment variables

To try it in the current terminal only, skip the file.

macOS / Linux:

export ANTHROPIC_BASE_URL="https://api.siptoken.ai"
export ANTHROPIC_AUTH_TOKEN="$SIPTOKEN_API_KEY"
claude

Windows PowerShell:

$env:ANTHROPIC_BASE_URL = "https://api.siptoken.ai"
$env:ANTHROPIC_AUTH_TOKEN = $env:SIPTOKEN_API_KEY
claude

These go away when you close the terminal. Note that the env block in settings.json takes precedence: if both are set, the file wins.

Verify

Check the version first:

claude --version

It must meet the minimums in the table above. If not, run claude update. If the install looks broken, run claude doctor for diagnostics.

Then send a test message:

claude -p "Reply with exactly: ok"

If it returns ok, you're connected.

You can also start an interactive session and run /status to confirm:

  • The Anthropic base URL shows https://api.siptoken.ai.
  • The auth line shows an Auth token is in use.

If it still fails, test the key itself with the curl commands in Quickstart. If curl works and Claude Code doesn't, the problem is in the configuration.

Common errors

ErrorCause and fix
401, "invalid token"Usually the key is wrong or no longer valid. Check it on the Tokens page and copy it again.
403, mentions quotaUsually your balance or the key's quota is used up. Top up on the Wallet page or raise the key's quota.
503, "no available channel"Usually the model name doesn't match a SipToken ID. Add the three ANTHROPIC_DEFAULT_* variables from the config above, or pick a model with /model claude-sonnet-5-5.
404Usually the Base URL has an extra /v1. Change it to https://api.siptoken.ai.
429Usually you've hit 120 requests per minute. Parallel sessions and subagents share the limit. Wait a moment and retry.
API returned an empty or malformed response (HTTP 200)Usually the Base URL points somewhere else, such as the console. Change it to https://api.siptoken.ai.
ENOTFOUND, connection refusedUsually a typo in the Base URL or a network problem. Check the URL, then test with curl.
400, Extra inputs are not permitted or Unexpected value(s)Usually the request includes preview-feature fields. Add "CLAUDE_CODE_DISABLE_EXPERIMENTAL_BETAS": "1" to env.
Warning about two auth methodsBoth ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN are set. Remove ANTHROPIC_API_KEY, and check your shell profile for it too.
Certificate or TLS errorsUsually a corporate network that replaces certificates. Point NODE_EXTRA_CA_CERTS at your company's root certificate.

FAQ

It's configured but still asks me to log in

Make sure the settings are in the user-level ~/.claude/settings.json, not in a project's .claude/settings.json. Project settings only apply after the first-run wizard and the trust prompt are done.

If it still stops at the login screen, add "hasCompletedOnboarding": true to ~/.claude.json to skip the first-run wizard. CC Switch also has a toggle that skips the first-run confirmation.

How do I switch models?

Run /model claude-opus-5-5 in a session, or start with claude --model claude-opus-5-5. To make it permanent, add "ANTHROPIC_MODEL": "claude-opus-5-5" to env in settings.json.

Can the /model menu list SipToken models?

Add "CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1" to env. Claude Code then fetches the list from /v1/models and keeps only IDs that contain "claude".

How do I set up the VS Code extension?

The extension reads the same ~/.claude/settings.json. Set it up as above, then reopen the VS Code window.

Can it send fewer requests unrelated to my session?

Add "CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC": "1" to env. This turns off things like update checks and error reporting.

How do I go back to my claude.ai account?

Remove ANTHROPIC_BASE_URL and ANTHROPIC_AUTH_TOKEN from settings.json, then run /login in Claude Code. If you use CC Switch, switch to its account sign-in preset.

No key yet?Sign up and top up, then create one on the Tokens page in the console.
Create one in the console →