Claude Code
Connect Claude Code CLI, desktop, and VS Code to the Triton AI Developer API.
Claude Code can use the Developer API as an Anthropic-compatible LLM gateway. This setup supports Claude model aliases only.
Supported by Triton AI
Triton AI has verified messages, streaming, and tool calls on the production gateway. Anthropic documents LiteLLM as a supported gateway pattern.
Before you start
Set the API key in your shell. Then choose a Claude model alias that supports tool use.
export TRITONAI_API_KEY="<YOUR_TRITON_AI_API_KEY>"For one terminal session, set these values before you start Claude Code:
export ANTHROPIC_BASE_URL="https://tritonai-api.ucsd.edu"
export ANTHROPIC_AUTH_TOKEN="$TRITONAI_API_KEY"
export ANTHROPIC_MODEL="<CLAUDE_MODEL_ALIAS>"
claudeFor persistent user settings, use the file for your platform:
| Platform | User settings file |
|---|---|
| macOS, Linux, or WSL | ~/.claude/settings.json |
| Native Windows | %USERPROFILE%\.claude\settings.json |
{
"model": "<CLAUDE_MODEL_ALIAS>",
"apiKeyHelper": "printenv TRITONAI_API_KEY",
"env": {
"ANTHROPIC_BASE_URL": "https://tritonai-api.ucsd.edu",
"CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY": "1"
}
}Start Claude Code from an environment that contains TRITONAI_API_KEY. The shown helper requires printenv. Native Windows users can run it through Git Bash or use an approved credential helper.
Verify the connection
Ask Claude Code to identify the selected model and describe the current project without changing files. Confirm that the client shows the expected alias.
Configuration notes
| Setting source | CLI | VS Code | Desktop app |
|---|---|---|---|
| Shell variables | Yes | Not reliable | No |
User settings.json | Yes | Partial | No |
| VS Code user settings | No | Yes | No |
| Third-party inference form | No | No | Yes |
Anthropic explains these differences in its gateway connection guide. See the gateway protocol reference for required routes and headers.
Use the host root
Set ANTHROPIC_BASE_URL to https://tritonai-api.ucsd.edu. Adding /v1 creates an invalid /v1/v1/messages request path.