Skip to main content

Error Response Format

When an error occurs, the API returns a JSON response with the following structure:
Some legacy endpoints may return messege instead of message. Handle both fields for compatibility.

HTTP Status Codes

Cause: The request contains invalid parameters or is malformed.Common Issues:
  • Missing required parameter (e.g., prompt, key)
  • Invalid parameter type (e.g., string instead of number)
  • Parameter value out of allowed range
  • Malformed JSON in request body
Example Response:
Solution: Review your request parameters against the API documentation. Ensure all required fields are included and properly formatted.
Cause: Authentication failed or API key is invalid.Common Issues:
  • Missing key parameter in request body
  • Invalid or revoked API key
  • Expired API key
Example Response:
Solution:
  1. Verify your API key is correct
  2. Check the key is included in the request body
  3. Ensure the key hasn’t been revoked in your dashboard
Cause: Insufficient credits or expired subscription.Example Response:
Solution: Add credits or renew your subscription from your dashboard or view pricing plans.
Cause: The requested feature is not available on your current plan.Example Response:
Solution: Upgrade your subscription to access this feature.
Cause: You’ve exceeded your rate limit (queue limit).Example Response:
Solution:
  1. Wait for current requests to complete
  2. Implement exponential backoff in your code
  3. Consider upgrading your plan for higher limits
See Rate Limits for plan-specific queue limits.
Cause: An internal server error occurred during processing.Example Response:
Solution:
  1. Wait a few seconds and retry the request
  2. If the error persists, check the status page
  3. Contact support if the issue continues
Cause: The service is temporarily unavailable, usually due to high load or maintenance.Example Response:
Solution: Wait and retry with exponential backoff. Check the status page for any ongoing maintenance.

Common Error Scenarios

Missing Required Parameters

Invalid Model ID

Image URL Issues

When using image URLs, ensure the image is publicly accessible and returns proper CORS headers.

Handling Errors in Code

Python

JavaScript

Validation Errors

When request validation fails, you’ll receive specific error messages:

Processing Status vs Errors

Not all non-success responses are errors. Some indicate the request is still processing:
Use the fetch endpoint to check the status of processing requests.

Getting Help

Discord

Get community help

Email Support

Contact support team

Status Page

Check service status