Errors & Responses

Every error code, what caused it and what to do.

One shape for every error

Whatever went wrong, the body looks like this. Branch on code; the message may change, the codes won’t.

Error
{  "error": {    "code": "insufficient_balance",    "message": "Your API balance is too low for this call. Top up to continue."  }}

One exception: a malformed body

If a field fails the request’s own type checks (a string where a number belongs, say), you get 422 with a detail list instead of the shape above.

On the response

HTTPCodeWhat it means
401unauthorizedMissing, unknown or revoked key.
402insufficient_balanceYour balance won't cover the estimated hold. Top up to continue.
400invalid_inputA field failed validation, or a file_key doesn't start with api/.
400unsupported_formatThat file type isn't accepted.
400input_too_largeOver the size limit for its type.
400capability_unavailableThis capability is switched off right now.
404not_foundNo such job, or it isn't yours.
429rate_limitedYou're sending too fast. Back off and retry.
429at_capacityThe platform is briefly full. Retry shortly.
502capacity_unavailableNo capacity for a live session right now.
502capacity_warmingVoice capacity is starting up. Retry in about a minute.
502 / 500internal_errorFailed on our side. Nothing is charged; retry, and tell us if it keeps happening.

The capacity errors are 502, not 503

capacity_unavailable, capacity_warming and internal_error arrive as 502, and internal_error can also be a 500. If your retry logic keys on the status, treat both as retryable.

On a job

These arrive inside error on a job that finished as failed. The request that started the work succeeded; the work didn’t. A failed job is refunded in full.

Code on the jobWhat it means
face_not_detectedNo face was found in the input.
unsupported_formatThe file couldn't be decoded once work started.
input_too_largeOver a size or duration limit found during processing.
content_rejectedThe input or the result failed a content check.
processing_failedThe render didn't complete.