CloseRouter

Claude Code

Claude Code reads ~/.claude/settings.json. The host has no /v1 suffix.

1. Open the settings file

text
~/.claude/settings.json

2. Add the settings

Replace YOUR_API_KEY with your key. Set ANTHROPIC_BASE_URL without /v1. Remove a conflicting ANTHROPIC_AUTH_TOKEN if present.

JSON
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.closerouter.dev",
    "ANTHROPIC_API_KEY": "YOUR_API_KEY"
  }
}

Check the connection

In Claude Code, run /model anthropic/claude-sonnet-5 or enter another supported catalog ID.

Save the file and restart the application. Select the configured CloseRouter model. If it is missing or the key is rejected, check the file location, API address and key.