Criar minha primeira campanha
Menu da documentação
API

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_request
The body is not JSON or a field is not valid. Check details to see which field to fix.
401
unauthorized
The key is missing, invalid or was revoked. Check the Authorization header or create another key. Includes WWW-Authenticate: Bearer.
402
insufficient_credits
The workspace does not have enough credits. Wait for the renewal or get a top-up.
403
forbidden
The key does not have the required permission or the workspace is not active. Create a key with the right permission.
403
email_unverified
The Owner's email is not verified. Verify it from the app before using credits.
404
not_found
The resource does not exist or belongs to another workspace (on purpose, we do not tell these apart). Check the id.
409
conflict
There is a request with that Idempotency-Key still in progress, the export needs approved pieces, or the resource is not ready yet.
410
expired
The export has expired. Create a new one.
413
payload_too_large
The 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_mismatch
That Idempotency-Key was already used with another request. Use a new key for each different request.
429
rate_limited
You exceeded the limit per minute. Wait the number of seconds indicated by Retry-After.
429
concurrency_limit
Your plan already has the maximum number of jobs at once. Wait for one to finish; Retry-After says how long.
500
internal_error
A 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]

Dica. Retry only 429 and 5xx responses, with increasing waits, and always with the same Idempotency-Key.
Esta página foi útil?