Skip to main content
All errors return specific codes in the message field for programmatic handling.

Error Categories

Issues caused by invalid requests or insufficient resources.
Description: Not enough credits to complete the requestSolution: Add more credits to your account
{
  "success": false,
  "message": "INSUFFICIENT_CREDITS"
}
Description: Generation with specified ID does not existSolution: Verify the generation ID is correct
{
  "detail": "Generation not found"
}
Description: Request parameters are invalid or missing required fieldsSolution: Check parameter values and types
{
  "detail": "Validation error: prompt is required"
}
Description: One or more input images are not validSolution: Ensure you’re uploading valid JPEG, PNG, or WEBP files
{
  "status": "failed",
  "message": "INVALID_IMAGE"
}
Description: One or more image URLs are inaccessibleSolution: Verify all image URLs are accessible via HTTPS
{
  "status": "failed",
  "message": "IMAGE_INACCESSIBLE"
}
Description: Invalid resolution specified (must be 1k, 2k, or 4k)Solution: Use one of the supported resolution values
{
  "detail": "Invalid resolution. Must be 1k, 2k, or 4k"
}
Description: More than 10 images providedSolution: Limit input images to maximum of 10 total
{
  "detail": "Maximum 10 images allowed (URLs + base64 combined)"
}
Description: Both images_url and images_base64 provided in the same requestSolution: Use only one image input method per request
{
  "detail": "Cannot mix images_url and images_base64 in one request"
}

HTTP Status Code Reference

201
Created
Generation created successfully
200
OK
Request successful
400
Bad Request
Invalid parameters or request format
401
Unauthorized
Invalid or missing API key
402
Payment Required
Insufficient credits
404
Not Found
Generation not found
422
Validation Error
Invalid input format or missing required fields
500
Internal Server Error
Server-side error
503
Service Unavailable
Service temporarily unavailable

Common Issues & Solutions

Possible causes:
  • Prompt contains prohibited content
  • Invalid image format or corrupted file
  • Image URLs are not accessible
Solution: Check webhook payload for specific error code
Normal timeline:
  • Simple text-to-image: 1-2 minutes
  • With reference images: 2-3 minutes
  • 4K resolution: May take longer
If exceeds 5 minutes: Check status endpoint or wait for webhook
If generation failed: Credits are automatically refunded within 5 minutesIf successful but no URL: Check the status endpoint - the webhook may have failed to deliver
Always handle errors programmatically using the error codes, not human-readable messages.