Debugging a relay API in Claude Code / Codex: 401 vs 404 vs 429 A developer published a troubleshooting guide for pointing Claude Code and Codex at third-party relay APIs, mapping HTTP status codes to their causes: 401 indicates an authentication problem such as using ANTHROPIC_API_KEY instead of the Bearer ANTHROPIC_AUTH_TOKEN, 404 points to base_url path issues like appending /v1 to Anthropic-compatible endpoints that already expect /v1/messages, and 429 signals rate limiting. The guide recommends registering multiple relay stations so a single rate-limited provider never blocks work, and includes a dated list of tested relay stations. When you point Claude Code or Codex at a third-party relay and it errors, read the status code first — it tells you exactly what's wrong: /v1 on base url : Anthropic-compatible endpoints have /v1/messages ; OpenAI-compatible endpoints ANTHROPIC AUTH TOKEN Bearer , not ANTHROPIC API KEY . Keep a couple of stations registered so a single one rate-limiting never blocks you. List with tested dates: AI relay station list https://jliushi.github.io/ai-relay/ Signup links carry my referral param; strip ?aff= if you prefer.