Skip to content

Claude Code with a custom API endpoint: ANTHROPIC_BASE_URL

Claude Code signs in with an Anthropic account by default. Two environment variables, ANTHROPIC_BASE_URL and ANTHROPIC_API_KEY, point it at an Anthropic-compatible endpoint such as 6090ti, so you pay per call with an API key. This is the short version; the full steps are in the Claude Code guide.

Variables to set

Variable Value
ANTHROPIC_BASE_URL https://api.6090ti.com (no /v1)
ANTHROPIC_API_KEY An API key created in the 6090ti console. The first time Claude Code runs, it asks whether to use this key; approve it
ANTHROPIC_MODEL (optional) The default model name, for example claude-sonnet-4-6 from the price table

Put them in the settings file (recommended)

Edit ~/.claude/settings.json (Windows: %USERPROFILE%\.claude\settings.json):

{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.6090ti.com",
    "ANTHROPIC_API_KEY": "<your key>",
    "ANTHROPIC_MODEL": "<model name>"
  }
}

Save, open a new terminal and run claude. If claude -p "Reply with OK only" answers, the setup works.

Common issues