Skip to main content
API request errors use an error envelope:
Branch on type and code, not the human-readable message. Handle unknown codes using their type. param identifies the invalid field, such as inputs[1].role. retryable indicates whether a retry may succeed. Keep the original idempotency key when retrying a submission.

Handle processing errors

An accepted request can later finish as failed, expired, or partial. Read the job status and error. A partial batch can contain usable outputs and per-image failures. Log the error’s request_id, the job ID when available, and the endpoint slug. The response header X-Request-Id also identifies the request.