Overview
Claude Code is Anthropic’s official command-line AI coding assistant. By pointing it at Vtrix, you can use Claude, GPT, Gemini, and other models through one gateway.
Prerequisites
- Node.js 18 or higher
- A Vtrix API key — create one in Settings
You can also use Vtrix Doctor to check the local Base URL, API key, and model settings before editing files. Supported tools, including OpenClaw and Hermes, can be configured after confirmation.
Configuration Steps
Install Claude Code
Using npm
npm install -g @anthropic-ai/claude-codeOr using install script (macOS / Linux)
curl -fsSL https://claude.ai/install.sh | shConfigure Vtrix API
Vtrix supports a global config file or environment variables. The config file is recommended.
Using a config file (recommended)
Create ~/.claude/settings.json:
mkdir -p ~/.claudeConfig file content: ~/.claude/settings.json
vim ~/.claude/settings.json{
"env": {
"ANTHROPIC_BASE_URL": "https://cloud.vtrix.ai/llm",
"ANTHROPIC_AUTH_TOKEN": "YOUR_VTRIX_API_KEY",
"ANTHROPIC_MODEL": "claude-sonnet-4-5"
}
}Tip: In the Vtrix console, open Models, pick a model (for example Claude Sonnet 4.5), open the API tab, and copy the suggested configuration.
Using environment variables
Add to ~/.bashrc or ~/.zshrc:
# Vtrix API configuration
export ANTHROPIC_BASE_URL="https://cloud.vtrix.ai/llm"
export ANTHROPIC_AUTH_TOKEN="YOUR_VTRIX_API_KEY"
export ANTHROPIC_MODEL="claude-sonnet-4-5"Warning: Restart the terminal or run
source ~/.zshrc(or your shell config) so the variables apply. On Windows, restart Command Prompt.
Switch models
Change ANTHROPIC_MODEL whenever you want to switch models.
| Type | Example model | Notes |
|---|---|---|
| Performance | claude-opus-4-5 | Strong reasoning, heavier tasks |
| Standard | claude-sonnet-4-5 | Daily development, balanced |
| Cost-effective | gemini-3-pro-preview | Fast responses, lower cost |
Example after switching:
{
"env": {
"ANTHROPIC_BASE_URL": "https://cloud.vtrix.ai/llm",
"ANTHROPIC_AUTH_TOKEN": "YOUR_VTRIX_API_KEY",
"ANTHROPIC_MODEL": "gemini-3-pro-preview" // Change this
}
}Tip: Browse models, capabilities, and pricing on the Models page. Choose models that support tool calling for Claude Code.
Start a session
Navigate to your project directory and start Claude Code:
cd /path/to/your/project
claudePrompts are sent through Vtrix once this is configured.
Verify configuration
Inside Claude Code, run the /status command to verify your connection:
> /status
Auth token: ANTHROPIC_AUTH_TOKEN
Base URL: https://cloud.vtrix.ai/llm
Model: claude-sonnet-4-5You can also check billing in Settings in your Vtrix account to confirm requests are arriving.
Troubleshooting
Error: API Error: Connection error
Cause: One task may be too large and hit a timeout.
Solution: Ask Claude Code to break the work into smaller steps, for example:
Please break this task into smaller steps and do one small change at a time. Mac: env: node: No such file or directory
Cause: Node.js is not on PATH in this terminal (common with nvm).
Solution:
\. "$HOME/.nvm/nvm.sh"
claude Error: API Error: 400 tools.3.custom.input_examples: Extra inputs are not permitted
Cause: Known Claude Code issue; it may be resolved in a future release.
Workaround:
rm ~/.claude/statsig/statsig.cached.evaluationsThen quit Claude Code completely and start a new session. Do not keep using the same session.
Other configuration issues
- Confirm
ANTHROPIC_BASE_URL,ANTHROPIC_AUTH_TOKEN, andANTHROPIC_MODELare set as expected - Confirm API Key is valid
- Use a model that supports tool calling
- Check account balance: View balance
Need more help? See the rest of this documentation or contact Vtrix support.