- Request errors answer the HTTP request itself with a
4xxor5xxstatus and an error body. Nothing is created and nothing is charged. - Task failures happen after a task was accepted. The task ends with
status: failed, itserrorexplains why, and its credits are released.
Error format
Every error response has the same body:
New codes may be added over time. Handle an unknown code by its
type and HTTP status.
Request errors
Task failures
A task that was accepted can still fail. Itserror tells you why and whether a new attempt can succeed:
Failed tasks are never charged. To try again, create a new task (with a new
Idempotency-Key); a failed task cannot be restarted.
Retry strategy
Retry only what can succeed:429and503: waitRetry-Afterseconds, then retry.500and network errors: retry with exponential backoff.- Other
4xx: don’t retry. Fix the request.
Idempotency-Key so a retry can never create a second task. See Idempotency.
Get help with an error
Email support@fiveapi.ai with therequest_id of the failed request, or the task id of a failed task, and the time it happened.