Skip to content

Connect Claude Code to OpusVIP

Two environment variables: ANTHROPIC_BASE_URL points at OpusVIP and ANTHROPIC_AUTH_TOKEN holds your key. Your terminal then runs on the same Claude Opus lane that production projects use. Setup takes about five minutes.

Last updated:

Built for Claude Code: OpusVIP is built for the official Claude Code CLI only. Requests from other clients, including SDKs and plain curl, are not accepted.

New to relays? What is a Claude Code relay? explains how requests flow.

Before you start

  1. Sign up for the OpusVIP console (you can sign in with Google). You can top up in the console with Stripe (card, Alipay or WeChat Pay); the minimum is $1.50 (1,000 credits).
  2. Open the token page, create an API key (it starts with sk-) and copy it. Anyone with the key can spend your balance, so keep it out of repositories and don't share it.
  3. Install Claude Code if you haven't already:
Install Claude Code
npm install -g @anthropic-ai/claude-code
claude --version

OpusVIP needs only these two values:

Environment variableValue
ANTHROPIC_BASE_URLhttps://api.opusvip.dev (do not add /v1)
ANTHROPIC_AUTH_TOKENThe sk- key you created in the console

macOS / Linux

Temporary (current terminal only)

zsh / bash
export ANTHROPIC_BASE_URL=https://api.opusvip.dev
export ANTHROPIC_AUTH_TOKEN=sk-your-key
claude

Permanent

Add the variables to your shell config file so every new terminal picks them up:

Append to ~/.zshrc
# zsh (macOS default); for bash, use ~/.bashrc instead of ~/.zshrc
cat >> ~/.zshrc <<'EOF'
export ANTHROPIC_BASE_URL=https://api.opusvip.dev
export ANTHROPIC_AUTH_TOKEN=sk-your-key
EOF
source ~/.zshrc

Windows

PowerShell, temporary

PowerShell
$env:ANTHROPIC_BASE_URL = "https://api.opusvip.dev"
$env:ANTHROPIC_AUTH_TOKEN = "sk-your-key"
claude

PowerShell, permanent

Set user environment variables
[Environment]::SetEnvironmentVariable("ANTHROPIC_BASE_URL", "https://api.opusvip.dev", "User")
[Environment]::SetEnvironmentVariable("ANTHROPIC_AUTH_TOKEN", "sk-your-key", "User")

Command Prompt (CMD), permanent

CMD
setx ANTHROPIC_BASE_URL "https://api.opusvip.dev"
setx ANTHROPIC_AUTH_TOKEN "sk-your-key"

setx and SetEnvironmentVariable only affect newly opened terminals. After setting them, close the current window, reopen it and run claude.

Use settings.json (recommended)

You can also put the configuration in Claude Code's own settings file, which applies to every terminal and IDE extension:

  • macOS / Linux: ~/.claude/settings.json
  • Windows: %USERPROFILE%\.claude\settings.json
~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.opusvip.dev",
    "ANTHROPIC_AUTH_TOKEN": "sk-your-key"
  }
}

If the file already has other settings, merge the env entries in rather than overwriting the file.

These two variables are all you need. Claude Code's default aliases map directly to OpusVIP's four models: the default and opus are claude-opus-5-5, fable is claude-fable-5-1, sonnet is claude-sonnet-5-5, and haiku is claude-haiku-5-5. No model mapping is required.

The four models and switching

OpusVIP offers Opus 5.5, Fable 5.1, Sonnet 5.5 and Haiku 5.5, with the flagship Opus 5.5 as the default. Billing is in credits: 1 credit = $0.01 of usage at list price, so each credit price is Anthropic's USD list price times 100, and 100 credits cost you $0.15 (15% of list price). Prices below are in credits per 1M tokens:

Model IDInput (credits)Output (credits)Cache read (credits)
claude-opus-5-54002,00020
claude-fable-5-11,0005,00025
claude-sonnet-5-52001,00010
claude-haiku-5-510501

To change models, pass one at startup or switch inside a session:

Switch models
# at startup
claude --model sonnet

# or inside a session
/model opus
/model sonnet
/model fable
/model haiku

Cache-write prices are on Models and pricing, and tips on splitting work across the four models are in how to choose a model.

Verify the setup

Run this in a terminal:

One-off prompt
claude -p "hello"

A reply means the setup works. You can also:

  1. Run claude for interactive mode and type /status. Anthropic base URL should show https://api.opusvip.dev, with ANTHROPIC_AUTH_TOKEN as the auth source.
  2. Type /model to confirm the current model is Opus 5.5 (the default).
  3. Open the usage log in the console to see that request and its token usage.

Troubleshooting

SymptomCause and fix
Request rejected: client not supported OpusVIP only accepts requests from the official Claude Code CLI. Use the official Claude Code and keep it up to date; requests from other clients, SDKs and curl are rejected.
Still asked to sign in to Anthropic Check that the variables are active in the current terminal (echo $ANTHROPIC_BASE_URL). On a fresh install, add hasCompletedOnboarding to ~/.claude.json as shown below to skip onboarding.
401 / authentication failed The key was copied incompletely or has been deleted; copy it again from the console. If you previously signed in to claude.ai, run /logout to clear that login. If ANTHROPIC_API_KEY is set, unset it.
404 / path not found ANTHROPIC_BASE_URL ends with /v1 or another path. Use only https://api.opusvip.dev.
Insufficient balance Your credits have run out. Top up in the console with Stripe (card, Alipay or WeChat Pay): $0.15 buys 100 credits, and the minimum is $1.50 (1,000 credits). Failed requests are never billed.
Connection timeout or TLS error Check HTTPS_PROXY, HTTP_PROXY, ALL_PROXY and your proxy software's rules, and make sure nothing blocks or misroutes api.opusvip.dev.
Settings don't take effect on Windows setx only affects new windows. Close all terminals and IDEs, reopen them and try again.
~/.claude.json (add only this entry)
{
  "hasCompletedOnboarding": true
}

If none of that helps, find the request in the console log and email hello@opusvip.dev with the request time and the error message.