Skip to content

Eligible new accounts get $0.10 in free API credit. Once per account; abuse limits apply. Create an account

Anthropic base URL not working

When ANTHROPIC_BASE_URL seems ignored, Claude Code is usually still signed in to an Anthropic account, the URL has an extra path, or ANTHROPIC_API_KEY is set next to ANTHROPIC_AUTH_TOKEN. For Outrun the base URL is exactly https://api.outrun.to, with no /v1. Run /logout, open a new terminal and check /status.

Error fix

What causes it?

  • Claude Code is still using a saved Anthropic login.
  • The URL ends in /v1 or /v1/messages, so requests go to the wrong path and return 404.
  • ANTHROPIC_API_KEY and ANTHROPIC_AUTH_TOKEN are both set, which causes an authentication conflict.
  • The variable was set in a terminal that Claude Code was not started from.

How do I fix it?

In this order. The Claude Code setup guide has the full setup.

  1. Set ANTHROPIC_BASE_URL to https://api.outrun.to (bare host, no /v1).
  2. Put your Outrun key in ANTHROPIC_AUTH_TOKEN and remove ANTHROPIC_API_KEY from your environment and from ~/.claude/settings.json.
  3. Close every terminal and VS Code window, open a new terminal and run claude.
  4. Run /logout if Claude Code still uses your Anthropic account, then accept the custom API key.
  5. Run /status: it shows the base URL in use.
~/.claude/settings.json
{
  "env": {
    "ANTHROPIC_BASE_URL": "https://api.outrun.to",
    "ANTHROPIC_AUTH_TOKEN": "KEY",
    "ANTHROPIC_MODEL": "claude-sonnet-5-5"
  }
}

Questions

Does ANTHROPIC_BASE_URL need /v1?

Not for Outrun. Claude Code adds /v1/messages itself, so the base URL is the bare host https://api.outrun.to.

How do I check which base URL Claude Code uses?

Run /status inside Claude Code. It shows the base URL and the current model.

Does Outrun keep my prompts or outputs?

Outrun does not store your prompts, images or outputs unless you choose to save them.

Still stuck?

The troubleshooting table lists every error code, or message support on Telegram.