EniCloud

Error codes

Errors follow the OpenAI format: an HTTP status and JSON with an error field.

json
{ "error": { "code": "insufficient_balance", "message": "Top up your balance to continue" } }
StatusCodeReasonWhat to do
401invalid_keyThe key doesn't exist, was revoked or is malformedCheck the Authorization: Bearer eni-sk-... header. You can reissue the key in the console
402insufficient_balanceThe balance is emptyTop up: requests start working right away
403model_not_allowedThe key is for a different model, or the model is temporarily disabledUse your key's model in model, or buy a key for the model you need
403user_bannedThe account is blockedContact support
429rate_limitedToo many requests in a rowRetry in a few seconds, ideally with growing pauses
5xxupstream_errorThe model provider or our service failedRetry 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.