Skip to main content
The Wizzx API uses conventional HTTP response codes to indicate the success or failure of an API request. The API returns errors in an OpenAI-compatible format for easy integration with existing SDKs.

Error Response Format

All error responses follow this structure:

HTTP Status Codes Overview


Authentication Errors (401)

Authentication errors occur when there’s an issue with your API key.

missing_api_key

Solution: Add the Authorization header to your request:

invalid_api_key

Solution: Verify your API key is correct. You can find your API keys in the Dashboard.

api_key_revoked

Solution: Generate a new API key from your dashboard.

Invalid Request Errors (400)

These errors indicate issues with the request format or parameters.

missing_required_parameter

Solution: Include the required parameter in your request body.

invalid_parameter_value

Solution: Check the API documentation for valid parameter values.

invalid_json_body

Solution: Validate your JSON syntax before sending. Use a JSON validator if needed.

model_not_supported

Solution: Use a supported model name. Check the pricing page for available models.

Insufficient Quota Errors (402)

These errors indicate billing or credit issues.

insufficient_credits

Solution: Add more credits to your account from the Dashboard.

billing_not_active

Solution: Activate billing by adding a payment method in your account settings.

Permission Denied Errors (403)

These errors indicate access restrictions.

access_denied

Solution: Contact your administrator or upgrade your plan.

model_access_denied

Solution: Upgrade your subscription plan or contact support for access.

ip_not_allowed

Solution: Update the IP allowlist in your API key settings.

Not Found Errors (404)

These errors indicate the requested resource doesn’t exist.

task_not_found

Solution: Verify the task ID is correct. Note that task data expires after a period of time.

model_not_found

Solution: Use the /v1/models endpoint to list available models.

resource_not_found

Solution: Check that the endpoint URL is correct.

Conflict Errors (409)

These errors indicate conflicts with the current resource state.

resource_conflict

Solution: Refresh your local state and retry the operation.

duplicate_resource

Solution: Use a unique identifier or update the existing resource instead.

concurrent_update

Solution: Fetch the latest version and retry your update.

Unprocessable Entity Errors (422)

These errors indicate the request was well-formed but cannot be processed.

validation_failed

Solution: Check the error message for specific validation requirements.

invalid_image_url

Solution: Verify the image URL is publicly accessible and returns a valid image.

image_too_large

Solution: Compress or resize your image to meet the size requirements.

unsupported_image_format

Solution: Convert your image to JPEG, PNG, or WebP format.

Rate Limit Errors (429)

These errors indicate you’re sending requests too quickly.

rate_limit_exceeded

Solution: Implement exponential backoff in your code. The retry_after field indicates when you can retry.

requests_quota_exceeded

Solution: Wait for your quota to reset or upgrade to a higher tier.

Server Errors (500)

These errors indicate problems on our end.

internal_error

Solution: Retry after a brief wait. If the issue persists, contact support with the request_id.

upstream_provider_error

Solution: This is a temporary issue with our AI providers. Retry after a brief wait.

Service Unavailable Errors (503)

These errors indicate temporary service issues.

service_overloaded

Solution: Retry with exponential backoff.

model_overloaded

Solution: Try an alternative model or retry later.

maintenance_mode

Solution: Wait for maintenance to complete. Check our status page for updates.

Error Handling Best Practices

Always implement retry logic with exponential backoff for transient errors (429, 500, 503):
Always log the request_id from error responses. This helps our support team diagnose issues quickly.
Handle specific error codes rather than just HTTP status codes for more precise error handling: