Core API

Errors

Errors are JSON with a standard HTTP status. Failed jobs are never billed.

Error shape#

4xx / 5xx
{ "error": "invalid or missing API key" }

Status codes#

FieldTypeDescription
400Bad RequestMalformed body, missing model, or an engine that isn’t available.
401UnauthorizedMissing or invalid API key (or the key was revoked).
402Payment RequiredThe key hit its cumulative spend cap, or the free $5 trial is spent and no card is on file. Raise the cap in API keys, or add a card in Billing.
404Not FoundTask id doesn’t exist, or isn’t owned by this key’s account.
502Bad GatewayThe upstream engine failed to accept or complete the job. Not billed.
503UnavailableThe service isn’t configured to serve this request right now.

A job that fails after it started is reported as a task with status: "failed" and an error field — and costs nothing.

API Docs · Errors