Claude Code
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.
Prerequisites
Node.js 18 or higher
SeaCloud API key (create one in Settings)
Configure Vtrix API
Vtrix provides two configuration methods: global config file or environment variables. Config file method is recommended.
Using Config File (Recommended)
Create global config file ~/.claude/settings.json:
mkdir -p ~/.claude
vim ~/.claude/settings.jsonConfig file content:
π ~/.claude/settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://cloud.vtrix.ai/llm/",
"ANTHROPIC_AUTH_TOKEN": "sk-xxxxxxxxxxxxxxxxxxxxx",
"ANTHROPIC_MODEL": "claude-sonnet-4-5"
}
}Using Environment Variables
Add the following to your shell profile:
π ~/.bashrc or ~/.zshrc
# Vtrix API Configuration
export ANTHROPIC_BASE_URL="https://cloud.vtrix.ai/llm/"
export ANTHROPIC_AUTH_TOKEN="sk-xxxxxxxxxxxxxxxxxxxxx"
export ANTHROPIC_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.
Switch Models
You can change the ANTHROPIC_MODEL variable anytime to switch models. Vtrix supports all major AI models:
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):
π ~/.claude/settings.json
{
"env": {
"ANTHROPIC_BASE_URL": "https://cloud.vtrix.ai/llm/",
"ANTHROPIC_AUTH_TOKEN": "sk-xxxxxxxxxxxxxxxxxxxxx",
"ANTHROPIC_MODEL": "gemini-3-pro-preview" // Change this
}
}π‘ To see all available models, features, and pricing, visit Models page. Make sure to choose models with "Tool Calling" support.
Start Your Session
Navigate to your project directory and start Claude Code:
cd /path/to/your/project
claudeYou are now connected! Any prompt you send will be routed through Vtrix.
Verify Configuration
Run the /status command in Claude Code to verify your connection:
> /status
Auth token: ANTHROPIC_AUTH_TOKEN
Base URL: https://openresty-gateway.api.seaart.ai
Model: claude-sonnet-4-5You can also check the SeaCloud Activity Dashboard to see your requests in real-time:
# Open in browser
open https://cloud.seaart.ai/en/usageTroubleshooting
Last updated