Use Vtrix API as the backend for Claude Code to access more AI models and better pricing.
Claude Code is Anthropic's official command-line AI coding assistant. By configuring Vtrix API, you can use GPT-4, Claude, Gemini, and many other models.
π‘ Get these config parameters: Go to Vtrix β Models page β Select a model (e.g., Claude Sonnet 4.5) β Click "API" tab β Copy config parameters
Using Environment Variables
Add the following to your shell profile:
π ~/.bashrc or ~/.zshrc
Shell profile
# Vtrix API ConfigurationexportANTHROPIC_BASE_URL="https://cloud.vtrix.ai/llm/"exportANTHROPIC_AUTH_TOKEN="sk-xxxxxxxxxxxxxxxxxxxxx"exportANTHROPIC_MODEL="claude-sonnet-4-5"
After configuration, restart your terminal or run source ~/.bashrc (or your respective config file) to apply changes. Windows users need to restart Command Prompt.
3
Switch Models
You can change the ANTHROPIC_MODEL variable anytime to switch models. Vtrix supports all major AI models:
Model Type
Recommended Model
Features
Performance
claude-opus-4-5
Best reasoning, complex tasks
Standard
claude-sonnet-4-5
Daily development, balanced
Cost-Effective
gemini-3-pro-preview
Fast response, low cost
Update model (modify config file or environment variable):
# Reload nvm environment
\. "$HOME/.nvm/nvm.sh"
# Then start Claude Code again
claude
Delete cache and restart session
# Delete cache file
rm ~/.claude/statsig/statsig.cached.evaluations
# Then you must close and start a new session
# Do not continue using in the same session