Authentication methods
AIOHub supports multiple authentication headers for different client types:| Method | Header | Client |
|---|---|---|
| Bearer auth | Authorization: Bearer sk-xxx | OpenAI SDK, Codex CLI, most OpenAI-compatible tools |
| Anthropic API Key | x-api-key: sk-xxx | Anthropic SDK |
| Anthropic bearer auth | Authorization: Bearer sk-xxx | Claude Code (ANTHROPIC_AUTH_TOKEN) |
| Google API Key | x-goog-api-key: sk-xxx | Gemini CLI, Google SDK |
sk- API key value. AIOHub automatically detects the authentication format.
Examples
Common authentication errors
| Status | Cause | Fix |
|---|---|---|
| 401 | API key is invalid, expired, or sent in the wrong header | Check that the API key is complete, enabled, and sent in the expected header |
| 403 | API key cannot access the requested model | Confirm the API key group includes the model and endpoint |
| 429 | Rate limit reached | Slow down requests and check console announcements or current limits |