Skip to main content

Authentication Failed

HTTP 401 - Token is invalid or expired.
{
  "success": false,
  "error": "AUTHENTICATION_FAILED",
  "message": "Authentication failed."
}

Missing API Token

HTTP 401 - Authorization header not provided.
{
  "success": false,
  "error": "MISSING_API_TOKEN",
  "message": "Missing API token. Include it in Authorization header as \"Bearer YOUR_API_TOKEN\" or in X-API-Key header."
}

Invalid API Token

HTTP 401 - Token format is incorrect or not found.
{
  "success": false,
  "error": "INVALID_API_TOKEN",
  "message": "Invalid or expired API token."
}

Failed to Validate Token

HTTP 500 - Server error during token validation.
{
  "success": false,
  "error": "FAILED_TO_VALIDATE_TOKEN",
  "message": "Failed to validate API token."
}

Invalid JSON

HTTP 400 - Request body is not valid JSON.
{
  "success": false,
  "error": "INVALID_JSON",
  "message": "Request body must be valid JSON. Please check your request format."
}

Validation Error

HTTP 400 - Request parameters failed validation.
{
  "success": false,
  "error": "VALIDATION_ERROR",
  "message": "One or more request parameters are invalid. Please check the required fields."
}

Invalid Generation ID

HTTP 404 - Generation ID not found or doesn’t belong to your account.
{
  "success": false,
  "error": "INVALID_GENERATION_ID",
  "message": "Invalid generation ID format. Must be a valid UUID."
}

NSFW Content Detected

HTTP 400 - Prompt or image contains inappropriate content.
{
  "success": false,
  "error": "NSFW_CONTENT_DETECTED",
  "message": "Your prompt contains content that violates our content policy. Please modify your prompt and try again."
}

Image Size Limit Exceeded

HTTP 400 - Reference image exceeds maximum file size.
{
  "success": false,
  "error": "IMAGE_SIZE_LIMIT_EXCEEDED",
  "message": "Total image size exceeds 20MB limit. Current total: 25.50MB."
}

Image Download Failed

HTTP 400 - Unable to download or process reference image from provided URL.
{
  "success": false,
  "error": "IMAGE_DOWNLOAD_FAILED",
  "message": "Could not download image from the provided URL. Please verify the URL is accessible and points to a valid image."
}

Insufficient Credits

HTTP 402 - Account does not have enough credits for this generation.
{
  "success": false,
  "error": "INSUFFICIENT_CREDITS",
  "message": "Not enough credits to complete this request. Required: 2 credits. Please add more credits to your account."
}

Account Not Found

HTTP 404 - Account associated with token not found.
{
  "success": false,
  "error": "ACCOUNT_NOT_FOUND",
  "message": "Account not found. Please verify your account ID."
}

Generation Not Found

HTTP 404 - Generation with specified ID does not exist.
{
  "success": false,
  "error": "GENERATION_NOT_FOUND",
  "message": "Generation not found or access denied."
}

Rate Limit Error

HTTP 429 - Too many requests, please slow down and retry after reset time.
{
  "success": false,
  "error": "RATE_LIMIT_ERROR",
  "message": "You can create up to 10 generations per minute. Please wait and try again."
}

Concurrent Generation Error

HTTP 429 - Maximum concurrent generations reached (1 max).
{
  "success": false,
  "error": "CONCURRENT_GENERATION_ERROR",
  "message": "You already have a generation in progress. Please wait for it to complete."
}

Fetch Failed

HTTP 500 - Failed to fetch data from external service.
{
  "success": false,
  "error": "FETCH_FAILED",
  "message": "Failed to fetch images. Please try again."
}

Image Upload Failed

HTTP 500 - Failed to upload generated images to storage.
{
  "success": false,
  "error": "IMAGE_UPLOAD_FAILED",
  "message": "Failed to process image 1. Please ensure the image is valid and accessible."
}

Generation Update Failed

HTTP 500 - Failed to update generation status in database.
{
  "success": false,
  "error": "GENERATION_UPDATE_FAILED",
  "message": "Could not update the generation record. Please try again or contact support if the issue persists."
}

Generation Init Failed

HTTP 500 - Failed to initialize generation in database.
{
  "success": false,
  "error": "GENERATION_INIT_FAILED",
  "message": "Could not initialize your generation request. Please try again."
}

Credit Processing Failed

HTTP 500 - Failed to process credit deduction from account.
{
  "success": false,
  "error": "CREDIT_PROCESSING_FAILED",
  "message": "Could not process credit payment. Please try again or contact support."
}

Generation Start Failed

HTTP 500 - Failed to start generation process on AI service.
{
  "success": false,
  "error": "GENERATION_START_FAILED",
  "message": "Failed to start image generation. Your credits have been refunded. Please try again."
}

Internal Server Error

HTTP 500 - Unexpected server error, contact support with error details.
{
  "success": false,
  "error": "INTERNAL_SERVER_ERROR",
  "message": "An unexpected error occurred. Please try again or contact support if the issue persists."
}