Common errors
401 Unauthorized — invalid token
{"error": {"message": "Invalid API key", "code": "invalid_api_key"}}
Check:
- Token was copied correctly (no extra spaces)
- Token has not been deleted or expired
- Request header format is correct:
Authorization: Bearer sk-xxxxx
402 Payment Required — insufficient balance
{"error": {"message": "Insufficient quota", "code": "insufficient_quota"}}
Solution: Log in to the dashboard and top up your account.
404 Not Found — endpoint doesn’t exist
Check:
- Base URL is correct:
https://api.anyone.ai/v1
- Make sure you haven’t added or omitted
/v1
# ✅ Correct
base_url = "https://api.anyone.ai/v1"
# ❌ Wrong — this will result in /v1/v1/chat/completions
base_url = "https://api.anyone.ai/v1/"
429 Too Many Requests — request rate too high
Solution: Wait a few seconds and retry, or reduce your request rate. See rate limits for details.
500 / 502 / 503 — server error
The upstream model may be temporarily unavailable.
Solution:
- Wait a minute and retry
- Try a different model
- If the issue persists, contact support
Base URL setup
Make sure your base URL is set correctly:
| Setting | Value |
|---|
| Base URL | https://api.anyone.ai/v1 |
| API Key | The token you created in the dashboard |
The most common mistake is adding a trailing / to the base URL. Use https://api.anyone.ai/v1, not https://api.anyone.ai/v1/.
Still stuck?
- Check the Logs page in the dashboard to see if your request reached Anyone
- Confirm that your network can access
api.anyone.ai
- Contact support with your error details