Skip to main content
For routing rules, see Routing & Protocols. For available model IDs, see List Models. Claude Code works with Anthropic Messages-compatible gateways. PipeLLM supports that in two ways:
Use caseBase URLWhy
Call Claude modelshttps://api.pipellm.aiUse PipeLLM’s native Anthropic-compatible route
Keep Claude Code, call GPT or Geminihttps://api.pipellm.ai/anthropicUse the Anthropic converter route

Config File

Claude Code reads configuration from ~/.claude/settings.json.
Remove conflicting shell variables before testing a new setup, especially ANTHROPIC_BASE_URL, ANTHROPIC_API_KEY, and ANTHROPIC_AUTH_TOKEN.
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.pipellm.ai",
    "ANTHROPIC_AUTH_TOKEN": "your-pipellm-api-key",
    "ANTHROPIC_DEFAULT_SONNET_MODEL": "claude-sonnet-4-6",
    "ANTHROPIC_DEFAULT_HAIKU_MODEL": "claude-haiku-4-5-latest"
  }
}

Run Claude Code

claude
If you want to keep a checked-in project config instead of editing your global settings, keep the same env block in the settings file that Claude Code reads for your environment.

Notes

  • Claude Code expects Anthropic Messages-compatible endpoints such as /v1/messages.
  • PipeLLM’s native route is the cleanest choice for Claude models.
  • PipeLLM’s /anthropic converter route is the safest way to keep Claude Code’s protocol while switching to OpenAI or Gemini models.

Developer Tools

Compare Claude Code, OpenCode, and OpenClaw

Anthropic Converter

Keep Anthropic format across providers

Claude Code Gateway Docs

Official Claude Code gateway requirements