API

Errors.

Errors use a stable envelope with a request id. Include that id when contacting support.

Envelope

Error
{
  "error": {
    "type": "invalid_request_error",
    "code": "image_too_large",
    "message": "Image exceeds the 40 megapixel limit for your plan.",
    "param": "image_url",
    "request_id": "req_01J...",
    "details": { "max_megapixels": 40 }
  }
}

Status codes

NAMETYPEDESCRIPTION
400invalid_requestMalformed JSON, header, or idempotency key.
401authenticationMissing, invalid, expired, or revoked key.
402billingInsufficient credits or plan limit.
403permissionScope, IP, suspended workspace, or model gate.
404not_foundJob, file, or webhook not found.
409conflictIdempotency reuse/in-progress or invalid job state.
413too_largeFile or request body exceeds the limit.
415media_typeUnsupported content type.
422validationImage decode, mask mismatch, prompt required, no target.
429rate_limitToo many requests or too many concurrent jobs.
500 / 503api_errorUnexpected error or provider unavailable.

Retry guidance

Retry 429, 503, and network errors with exponential backoff. Do not retry 4xx except 409 idempotency_in_progress after the suggested delay.