Claude Code
Claude Code supports custom gateways through environment variables — no code changes needed.
Base URL for this tool
https://api.laalaa.meProtocol
/v1/messages (Anthropic)1. Set the environment variables
Claude Code reads ANTHROPIC_BASE_URL (the API endpoint) and ANTHROPIC_AUTH_TOKEN (the credential sent as Authorization: Bearer).
bash (macOS / Linux)
export ANTHROPIC_BASE_URL="https://api.laalaa.me"export ANTHROPIC_AUTH_TOKEN="sk-xxxxxxxxxxxx"PowerShell (Windows)
$env:ANTHROPIC_BASE_URL = "https://api.laalaa.me"
$env:ANTHROPIC_AUTH_TOKEN = "sk-xxxxxxxxxxxx"To persist them, add them to ~/.claude/settings.json under "env":
json · ~/.claude/settings.json
{ "env": { "ANTHROPIC_BASE_URL": "https://api.laalaa.me", "ANTHROPIC_AUTH_TOKEN": "sk-xxxxxxxxxxxx" }}2. Start Claude Code
bash
claudeEvery request now flows through the gateway — use model ids from the Models page.
Notes
ANTHROPIC_AUTH_TOKEN is sent as a Bearer header; ANTHROPIC_API_KEY as x-api-key — the gateway accepts both styles.
Model names
Claude Code requests its default model ids (Opus/Sonnet/Haiku families) — make sure your gateway serves those ids (see the Models page). If ids differ, ANTHROPIC_MODEL overrides the main model.
Other tools
ទំព័រនេះមានប្រយោជន៍?