Errors
Understand how Aether API handles errors and what to do when things go wrong.
Error format
When an error occurs, the API returns a JSON response with the following structure:
{
"error": {
"message": "The API key is invalid.",
"type": "invalid_request_error",
"code": "invalid_api_key",
"param": null,
"hint": "Check your Aether API key or create a new key in the dashboard.",
"request_id": "req_7e84d123-e652-46fa-bb0c-2acc016356a5"
}
}HTTP status codes
200OK- The request was successful.
400Bad Request- The request was malformed or missing required parameters.
401Unauthorized- Invalid or missing API key.
403Forbidden- Your account does not have permission for this action.
404Not Found- The requested resource does not exist.
429Too Many Requests- Rate limit exceeded. Retry after the specified time.
500Internal Server Error- Something went wrong on our end. Retry the request.
502Bad Gateway- Upstream provider error. Retry the request.
503Service Unavailable- The service is temporarily unavailable. Retry later.
Common errors
invalid_api_key- The API key is invalid, disabled, or has been deleted. Check your key in the dashboard.
insufficient_credits- Your account does not have enough credits for this request. Top up in the dashboard.
rate_limit_exceeded- You have exceeded the rate limit for your tier. Wait before retrying or upgrade your plan.
model_not_found- The requested model does not exist or is not available on your account. Check the models list for valid IDs.
provider_rate_limit_exceeded- Model capacity is temporarily rate limited. Retry with exponential backoff and respect Retry-After when present.
invalid_request_error- The request parameters are invalid. Check the error message for details.
Tip
All error responses include aRetry-After header when applicable. Use it to implement exponential backoff in your client.