Claude Code is Anthropic's command-line agent for coding. It talks to one endpoint, /v1/messages in the Anthropic Messages format, and it lets you change the base URL. Point it at GetVibe API and the same CLI can run Claude Opus 5.5, Claude Sonnet 5 or a non-Claude model from our catalog, all on one prepaid key.
Step 1: settings.json
Install Claude Code (npm install -g @anthropic-ai/claude-code, Node.js 22+), then create or edit ~/.claude/settings.json. On Windows the file is %USERPROFILE%\.claude\settings.json.
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "sk-pv-...",
"ANTHROPIC_BASE_URL": "https://getvibeapi.com",
"ANTHROPIC_API_KEY": ""
}
}
Two details matter:
ANTHROPIC_API_KEYmust be an empty string, not missing. If it is absent, Claude Code ignores the base URL and goes straight to Anthropic.- The base URL has no
/v1. Claude Code adds/v1/messagesitself, sohttps://getvibeapi.com/v1would double the path.
Run claude and type /status. The Anthropic base URL line should read https://getvibeapi.com.
Step 2: choose the models
Claude Code has three model slots, Opus, Sonnet and Haiku. By default it uses the Sonnet slot for most tasks and the Haiku slot for quick operations. Each slot is an environment variable, and the value can be any model ID from our catalog that accepts the Messages format:
{
"env": {
"ANTHROPIC_AUTH_TOKEN": "sk-pv-...",
"ANTHROPIC_BASE_URL": "https://getvibeapi.com",
"ANTHROPIC_API_KEY": "",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "claude-opus-5.5",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4.5"
}
}
To run the agent on a lower-cost model, put its ID in the Sonnet slot, for example deepseek-v4.1-flash or gemini-3.8-flash. Use exact catalog IDs: dated Anthropic snapshot names such as claude-haiku-4-5-20251001 do not resolve.
Which models work in Claude Code
Not every model in the catalog accepts the Anthropic Messages format. The public catalog at https://getvibeapi.com/api/catalog marks each model with anthropicFormat. Where it is true, the model works over /v1/messages. At the time of writing that includes:
| Model | ID | Context | Price |
|---|---|---|---|
| Claude Opus 5.5 | claude-opus-5.5 | 1M | $0.1067 input · $0.5334 output per 1M tokens |
| Claude Sonnet 5 | claude-sonnet-5 | 1M | $0.3334 input · $1.6667 output per 1M tokens |
| GPT-5.6 Sol | gpt-5.6-sol | 1.05M | $0.0667 input · $0.40 output per 1M tokens |
| DeepSeek V4.1 Flash | deepseek-v4.1-flash | 1M | $0.0112 input · $0.0445 output per 1M tokens |
| Gemini 3.8 Flash | gemini-3.8-flash | 1M | $0.0097 input · $0.0483 output per 1M tokens |
| GLM-5.3 | glm-5.3 | 1.048M | $0.10 input · $0.3143 output per 1M tokens |
| Kimi K3 | kimi-k3 | 262K | $0.1715 input · $0.8572 output per 1M tokens |
| Qwen3.8 Max | qwen3.8-max | 256K | $0.1543 input · $0.4629 output per 1M tokens |
The GPT-6 models (Luna, Sol, Astra) do not accept the Messages format and are refused on /v1/messages. To use them in a terminal agent, use Codex CLI, which speaks the Responses API, or any tool with an OpenAI-compatible base URL (see the integrations list).
Common issues
- 401: check the
ANTHROPIC_AUTH_TOKENvalue and thatANTHROPIC_API_KEYis"". - Requests still go to Anthropic:
ANTHROPIC_API_KEYis not set as an empty string. - Variables not picked up:
settings.jsonis more reliable than shell profiles, especially on Windows. - Model not available: the ID is misspelled, retired or not in the Messages format. Check it on the Models page.
Keep the cost down
Coding agents resend a long, mostly unchanged prefix on every turn. Claude models cache only when the request carries a cache_control breakpoint. If Claude Code does not send one, the gateway adds one for you. Cached input is billed at a fraction of the input rate. The caching guide and our prompt caching article explain how to keep the prefix stable.
The full reference is in the Claude Code guide and Messages and Responses. You pay per token from a prepaid balance. There is no subscription.
