Free test tokens — try any model

Connect Claude Code

4 min readAPI v1Report a problem

Claude Code speaks the Anthropic protocol, so the whole integration is a base URL and a key. The tool itself needs no changes — and because the protocol is the provider’s own, prompt caching and extended thinking keep working through the gateway.

Install Claude Code#

Claude Code ships as an npm package. On macOS and Linux:

Terminal
npm install -g @anthropic-ai/claude-code
claude --version

On Windows, install Git for Windows first so bash and curl are available, then run the same two commands in Git Bash. There is no separate Windows installer.

Point it at VipAI#

Claude Code reads these at startup, so nothing inside the tool has to be edited. Open a new terminal afterwards, or the shell will keep the old values.

~/.zshrc
export ANTHROPIC_BASE_URL="https://api.vipai.site"
export ANTHROPIC_API_KEY="YOUR_API_KEY"

Pin the models Claude Code uses#

Left alone, the CLI resolves its own defaults and may pick a model the router does not carry. Pinning all three makes the choice explicit and priced, and keeps the /model menu inside the session predictable.

~/.zshrc
export ANTHROPIC_DEFAULT_OPUS_MODEL="claude-opus-5"
export ANTHROPIC_DEFAULT_SONNET_MODEL="claude-sonnet-5"
export ANTHROPIC_DEFAULT_HAIKU_MODEL="claude-haiku-4-5"
VariableModel idUsed for
ANTHROPIC_DEFAULT_OPUS_MODELclaude-opus-5Deep reasoning, architecture work
ANTHROPIC_DEFAULT_SONNET_MODELclaude-sonnet-5Everyday edits and tool calls
ANTHROPIC_DEFAULT_HAIKU_MODELclaude-haiku-4-5Cheap background tasks and titles

Verify the chain#

Start the CLI and ask for something that forces a real completion:

Terminal
claude

Then, inside the session:

claude
> Summarise the VipAI base URL and the auth header in one line each.

A correct answer names https://api.vipai.site and x-api-key. Anything else means the environment variables did not load.

Confirm usage is landing#

Open the usage view in the dashboard. The first Claude Code request should appear within a minute, tagged with the model id you pinned. If the row is missing, the CLI is still calling Anthropic directly — check that the shell you launched claude from is the one you exported the variables in.

Ready to bill this?

Claude Code is usually the highest-volume client people run. Check the per-model rates before pointing it at a large repository.