error.details, an array of field-level validation messages.
The same request id is also sent as the X-Request-Id response header. Include it when contacting support.
Common Error Codes
| HTTP | Code | Typical Cause |
|---|---|---|
| 400 | VALIDATION_ERROR | Request payload failed validation |
| 400 | INVALID_PERSONA | Persona id is not a valid UUID |
| 400 | INVALID_STYLE | Style id is not a valid UUID |
| 400 | INVALID_AMOUNT | Amount is invalid or negative |
| 400 | CONTENT_POLICY | Request blocked by content policy |
| 400 | CANNOT_DELETE_PROCESSING | Attempted to delete a persona or style while processing |
| 400 | SUPPORT_IMAGE_NOT_SUPPORTED | Support image is not available on the selected model |
| 413 | IMAGE_TOO_LARGE | Input image exceeds the 10 MB size limit |
| 401 | MISSING_API_KEY | Missing X-Api-Key header |
| 401 | INVALID_API_KEY_FORMAT | API key does not start with pkz_ |
| 401 | INVALID_API_KEY | API key is unknown |
| 401 | API_KEY_INACTIVE | API key is disabled |
| 401 | API_KEY_DELETED | API key was deleted |
| 402 | INSUFFICIENT_CREDITS | API balance is too low for the requested operation, or Smart Balance is enabled but the configured top-up cannot cover this request |
| 402 | SMART_BALANCE_PAYMENT_FAILED | Smart Balance is paused because the automatic top-up payment could not be processed |
| 403 | API_ACCESS_NOT_ENABLED | Account does not have API access |
| 403 | ACCOUNT_SUSPENDED | Account is suspended |
| 404 | NOT_FOUND | Requested resource or route was not found |
| 409 | NAME_RESERVED | Persona or style name is reserved |
| 409 | NAME_ALREADY_EXISTS | Persona or style name already in use |
| 409 | CONFLICT | Request conflicts with existing state |
| 422 | GENERATION_REJECTED | Request could not be processed |
| 499 | CANCELLED | Generation was cancelled |
| 500 | GENERATION_FAILED | Generation request failed |
| 400 | INVALID_IMAGE | Image URL/body is invalid or not an accessible image |
| 500 | INTERNAL_ERROR | Unexpected server error |
| 503 | SERVICE_UNDER_MAINTENANCE | Service maintenance window is active |
| 504 | GENERATION_TIMEOUT | Generation request exceeded timeout |
| 504 | SCORING_TIMEOUT | Thumbnail scoring exceeded timeout |
| 504 | TITLE_TIMEOUT | Title generation exceeded timeout |
| 429 | TOO_MANY_REQUESTS | Rate limit exceeded |
code for programmatic handling and use message for a safe public summary.