Errors and limits
The error format, each status code, and the requests-per-minute limit.
Every error has the same format: a stable code for your program and a message for people (written in Spanish).
{
"code": "bad_request",
"message": "prompt no puede estar vacío.",
"details": [{ "path": "prompt", "message": "prompt no puede estar vacío." }]
}Codes
HTTPcodeCause and what to do
400
bad_requestThe body is not JSON or a field is not valid. Check
details to see which field to fix.401
unauthorizedThe key is missing, invalid or was revoked. Check the
Authorization header or create another key. Includes WWW-Authenticate: Bearer.402
insufficient_creditsThe workspace does not have enough credits. Wait for the renewal or get a top-up.
403
forbiddenThe key does not have the required permission or the workspace is not active. Create a key with the right permission.
403
email_unverifiedThe Owner's email is not verified. Verify it from the app before using credits.
404
not_foundThe resource does not exist or belongs to another workspace (on purpose, we do not tell these apart). Check the id.
409
conflictThere is a request with that
Idempotency-Key still in progress, the export needs approved pieces, or the resource is not ready yet.410
expiredThe export has expired. Create a new one.
413
payload_too_largeThe body exceeds the limit:
256 KB on POST /api/v1/banners and 64 KB on the rest of the endpoints. A library file cannot exceed 5 MB.422
idempotency_mismatchThat
Idempotency-Key was already used with another request. Use a new key for each different request.429
rate_limitedYou exceeded the limit per minute. Wait the number of seconds indicated by
Retry-After.429
concurrency_limitYour plan already has the maximum number of jobs at once. Wait for one to finish;
Retry-After says how long.500
internal_errorA failure on our side. Retry with the same
Idempotency-Key; if it persists, write to support.Request limit
Each key can make 60 requests per minute. When you go over, you receive 429 with the Retry-After header (in seconds): wait that long before retrying. Repeated attempts with invalid keys are also limited. [PLACEHOLDER: confirm the value in production]
Tipp. Retry only
429 and 5xx responses, with increasing waits, and always with the same Idempotency-Key.Hat dir diese Seite geholfen?