Skip to article

Errors & limits

Understand stable error codes and recovery actions.

Read the code before retrying

Errors include an English message, stable code, retry information and recovery advice. Validation errors include field paths. HTTP status distinguishes authentication, permissions, invalid input, conflicts, insufficient credits and temporary service failures.

Status / codeAction
401 UNAUTHORIZEDReplace an invalid, expired or revoked key
403 FORBIDDENCheck your account status and access permissions
403 INSUFFICIENT_SCOPECreate a key with the needed scope
402 INSUFFICIENT_CREDITSAdd credits before an intentional generation
422 INVALID_PARAMETERSFix the indicated fields
404 INPUT_ASSET_UNAVAILABLECheck ownership, readiness and upload confirmation
409 IDEMPOTENCY_CONFLICTRecover the original body; use a new key only for new work
409 GENERATION_ALREADY_EXISTSQuery the identified existing task
5xx or lost responseKeep the original request identity and reconcile its task

Limits

Keys: 30 active, 90-day lifetime. Uploads: PNG/JPEG/WebP up to 20 MiB. Generation limits differ by business and are available in capabilities and the article's parameter table. Batch item counts do not always equal output asset counts.

Protect recovery information

Keep task ID, operation, idempotency key, error code and field errors when diagnosing a failure. Do not place Bearer keys or full private image URLs in public issue reports. A transport error is not proof that generation was never accepted.