Troubleshooting
Auth Errors
Fix invalid API key and authorization issues.
Check these items first:
- The request includes
Authorization: Bearer YOUR_ANYROUTE_API_KEY. - The key has no extra spaces or quotes.
- The key is active in the Dashboard.
- The key is assigned to a provider group.
- The client is using the correct key field.
Common key fields:
| Client | Field |
|---|---|
| Claude Code | ANTHROPIC_AUTH_TOKEN |
| OpenAI SDK | OPENAI_API_KEY |
| Codex | OPENAI_API_KEY in ~/.codex/auth.json |
| Gemini CLI | GEMINI_API_KEY |
AnyRoute Docs