
Connect Claude Code to LaRouter
Use one LaRouter API key for your configured accounts. Each account retains its own quota.
Option 1: Use Configure
Sign in and select your local configuration file. Apply LaRouter fills your key and model and writes the file immediately; Reset defaults also writes immediately. If your browser cannot write local files, follow the manual instructions.
Configuration file location
- macOS
~/.claude/settings.json- Linux
~/.claude/settings.json- Windows
%USERPROFILE%\.claude\settings.json
These are default locations. For a tool running in WSL, use its Linux path inside WSL. If you changed the configuration directory, select the tool’s actual file. Your browser can only read or write files you select.
Option 2: Configure manually
Back up your files and replace only the placeholders shown below. Codex already uses gpt-5.6-sol. Use model names without router prefixes such as cx/. Keep tool-required local provider bindings such as larouter/ where shown, and preserve unrelated settings.
Before you start
Retrieve your assigned key in the portal and make sure at least one account is connected. Shell examples use Bash or zsh on macOS/Linux. Replace YOUR_API_KEY, call /models, and replace YOUR_MODEL_ID with an ID supported by your accounts.
export LAROUTER_API_KEY="YOUR_API_KEY"curl https://i-larouter.lapage.vn/v1/models \
-H "Authorization: Bearer $LAROUTER_API_KEY"Manual configuration
Install the tool first, back up its configuration, then merge the fields below. Replace YOUR_API_KEY and YOUR_MODEL_ID with your own values. Do not overwrite an existing file wholesale.
{
"env": {
"ANTHROPIC_BASE_URL": "https://i-larouter.lapage.vn",
"ANTHROPIC_AUTH_TOKEN": "YOUR_API_KEY",
"ANTHROPIC_MODEL": "YOUR_MODEL_ID",
"ANTHROPIC_DEFAULT_OPUS_MODEL": "YOUR_MODEL_ID",
"ANTHROPIC_DEFAULT_SONNET_MODEL": "YOUR_MODEL_ID",
"ANTHROPIC_DEFAULT_HAIKU_MODEL": "YOUR_MODEL_ID"
}
}claudeClaude Code uses the Messages endpoint. ANTHROPIC_BASE_URL omits /v1 because the tool appends the path. The example maps Opus/Sonnet/Haiku aliases to your selected model. Start a new Claude Code session to test.