Skip to main content
Every error returns this body. Handle errors by code, which may gain new values over time; message is a safe summary to show.
  • request_id is also the X-Request-Id response header. Include it when contacting support.
  • Validation errors add error.details, a list of field-level messages, each with a message & usually its field.
  • A request that ends in an error is never charged. With "async": true, errors after the 202 arrive through the request’s status & result.

Error Codes

HTTPCodeTypical Cause
400VALIDATION_ERRORA field is missing, unknown or invalid, or upscale does not accept the image’s size or shape
400INVALID_IMAGEImage cannot be fetched or decoded, or breaks the image input rules
400INVALID_PERSONAA persona ID is not a valid UUID
400INVALID_STYLEStyle ID is not a valid UUID
400INVALID_AMOUNTAmount is invalid or negative
400CONTENT_POLICYRequest blocked by content policy
400CANNOT_DELETE_PROCESSINGPersona or style is still processing
400SUPPORT_IMAGE_NOT_SUPPORTEDThe model does not take support images
400MODEL_UNAVAILABLEThe model is not available for this endpoint
400PERSONA_NOT_SUPPORTEDThe model does not take personas
400STYLE_NOT_SUPPORTEDThe model does not take styles
400REQUEST_IN_PROGRESSResult fetched before the request’s status is COMPLETED
401MISSING_API_KEYMissing X-Api-Key header
401INVALID_API_KEY_FORMATAPI key does not start with pkz_
401INVALID_API_KEYAPI key is unknown
401API_KEY_INACTIVEAPI key is disabled
401API_KEY_DELETEDAPI key was deleted
402INSUFFICIENT_CREDITSAPI balance is too low, or the Smart Balance top-up cannot cover the request
402SMART_BALANCE_PAYMENT_FAILEDSmart Balance is paused after a failed top-up payment
403API_ACCESS_NOT_ENABLEDAccount does not have API access
403ACCOUNT_SUSPENDEDAccount is suspended
403BUILTIN_READ_ONLYBuilt-in personas and styles cannot be updated or deleted
404PERSONA_NOT_FOUNDPersona ID is not one of your API personas or a built-in one, or it failed or was deleted
404STYLE_NOT_FOUNDStyle ID is not one of your API styles or a built-in one, or it failed or was deleted
404NOT_FOUNDRequested resource or route was not found
409PERSONA_NOT_READYPersona is still processing
409STYLE_NOT_READYStyle is still processing
409NAME_RESERVEDPersona or style name is reserved
409NAME_ALREADY_EXISTSPersona or style name already in use
409CONFLICTRequest conflicts with existing state
413IMAGE_TOO_LARGEImage or request body is over its size limit
422GENERATION_REJECTEDRequest could not be processed
429TOO_MANY_REQUESTSThe account’s limit of requests in flight is reached
499CANCELLEDGeneration was cancelled
500GENERATION_FAILEDGeneration request failed
500INTERNAL_ERRORUnexpected server error
503SERVICE_UNDER_MAINTENANCEA maintenance window is active. GET requests still work
504GENERATION_TIMEOUTThumbnail generation took over 300 seconds, or an input image download timed out
504SCORING_TIMEOUTScoring took over 120 seconds
504TITLE_TIMEOUTTitle generation took over 60 seconds