Error codes
Errors follow the OpenAI format: an HTTP status and JSON with an error field.
{ "error": { "code": "insufficient_balance", "message": "Top up your balance to continue" } }| Status | Code | Reason | What to do |
|---|---|---|---|
| 401 | invalid_key | The key doesn't exist, was revoked or is malformed | Check the Authorization: Bearer eni-sk-... header. You can reissue the key in the console |
| 402 | insufficient_balance | The balance is empty | Top up: requests start working right away |
| 403 | model_not_allowed | The key is for a different model, or the model is temporarily disabled | Use your key's model in model, or buy a key for the model you need |
| 403 | user_banned | The account is blocked | Contact support |
| 429 | rate_limited | Too many requests in a row | Retry in a few seconds, ideally with growing pauses |
| 5xx | upstream_error | The model provider or our service failed | Retry later and check the status page. Failed requests are not billed |
Retries
Retrying 429 and 5xx with pauses of 1, 2, 4, 8 seconds is safe. The official OpenAI libraries do this for you (max_retries).
Notifications
Link a key to Telegram under “API keys” and the bot will tell you when the balance is low or empty.
