⌘K

Claude Code

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

Configuration Steps

1

Install Claude Code

Using npm

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

Or using install script (macOS / Linux)

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

Configure Vtrix API

Vtrix supports a global config file or environment variables. The config file is recommended.

Create ~/.claude/settings.json:

mkdir -p ~/.claude

Config 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.

3

Switch models

Change ANTHROPIC_MODEL whenever you want to switch models.

TypeExample modelNotes
Performanceclaude-opus-4-5Strong reasoning, heavier tasks
Standardclaude-sonnet-4-5Daily development, balanced
Cost-effectivegemini-3-pro-previewFast 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.

4

Start a session

Navigate to your project directory and start Claude Code:

cd /path/to/your/project
claude

Prompts 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-5

You 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.evaluations

Then 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, and ANTHROPIC_MODEL are 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.