Claude Code

Route Claude Code at LLMRPM's Anthropic-compatible endpoint.

Configuration

SettingValue
API shapeAnthropic-compatible
Base URLhttps://llmrpm.com/api
AuthAuthorization: Bearer llmrpm_...
  • Set ANTHROPIC_AUTH_TOKEN to your LLMRPM API key so the client sends a bearer token.
  • Set ANTHROPIC_BASE_URL to https://llmrpm.com/api — the client appends /v1/messages.
  • Set default model IDs with ANTHROPIC_DEFAULT_SONNET_MODEL and ANTHROPIC_DEFAULT_HAIKU_MODEL.
  • Increase API_TIMEOUT_MS for long, tool-heavy sessions.

Example

settings.json
{
  "env": {
    "ANTHROPIC_AUTH_TOKEN": "llmrpm_YOUR_KEY",
    "ANTHROPIC_BASE_URL": "https://llmrpm.com/api",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-5",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4.5",
    "API_TIMEOUT_MS": "3000000"
  }
}

Troubleshooting

SymptomCause & fix
Authentication errorCheck that the API key has no extra spaces and has not been revoked in the dashboard.
Model rejectedUse a public model ID returned by GET /api/v1/models; do not use display names or aliases.
Connection issueConfirm the configured base URL is exactly the one shown above and that your network allows HTTPS to llmrpm.com.

Notes

  • Claude Code calls /v1/messages, not /v1/chat/completions.
  • LLMRPM authenticates with a bearer token, so use ANTHROPIC_AUTH_TOKEN rather than an x-api-key value.
  • If authentication fails, confirm the key has not been revoked in the dashboard.