{"slug": "debugging-a-relay-api-in-claude-code-codex-401-vs-404-vs-429", "title": "Debugging a relay API in Claude Code / Codex: 401 vs 404 vs 429", "summary": "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.", "body_md": "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:\n\n`/v1` on `base_url`: Anthropic-compatible endpoints have `/v1/messages`); OpenAI-compatible endpoints `ANTHROPIC_AUTH_TOKEN` (Bearer), not `ANTHROPIC_API_KEY`.\nKeep 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/)\n\nSignup links carry my referral param; strip `?aff=` if you prefer.", "url": "https://wpnews.pro/news/debugging-a-relay-api-in-claude-code-codex-401-vs-404-vs-429", "canonical_source": "https://dev.to/_e69fe8657895dd4754bbf/debugging-a-relay-api-in-claude-code-codex-401-vs-404-vs-429-33en", "published_at": "2026-10-11 01:11:54+00:00", "updated_at": "2026-10-11 01:19:41.563008+00:00", "lang": "en", "topics": ["ai-tools", "developer-tools", "ai-infrastructure"], "entities": ["Claude Code", "Codex", "Anthropic", "OpenAI"], "also_reported_by": [], "alternates": {"html": "https://wpnews.pro/news/debugging-a-relay-api-in-claude-code-codex-401-vs-404-vs-429", "markdown": "https://wpnews.pro/news/debugging-a-relay-api-in-claude-code-codex-401-vs-404-vs-429.md", "text": "https://wpnews.pro/news/debugging-a-relay-api-in-claude-code-codex-401-vs-404-vs-429.txt", "jsonld": "https://wpnews.pro/news/debugging-a-relay-api-in-claude-code-codex-401-vs-404-vs-429.jsonld"}}