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 manage your API keys in the API Keys 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 Billing. Insufficient-credit rejections roll back atomically before queuing—no failed task record is created and zero credits are deducted.

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.

music_action_not_found

Solution: Use one of the actions listed in the message. See Submit music action.

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.

idempotency_key_conflict

Solution: Use a fresh Idempotency-Key whenever you change the submit endpoint or request JSON body.

idempotency_key_in_progress

Solution: Wait a moment for the original submission to finish, then retry with the same Idempotency-Key to receive the cached response without double-billing.

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.

content_policy_violation

Solution: Revise the prompt or reference inputs to comply with safety guidelines. No task is created and zero credits are deducted.

Rate Limit Errors (429)

These errors indicate you’re sending requests too quickly.

rate_limit_exceeded

Solution: Implement exponential backoff in your code. Both the retry_after JSON field and the standard HTTP Retry-After (plus X-Retry-After) response header indicate how many seconds to wait before retrying.

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.

model_unavailable

The model is not accepting new submissions. No task is created and no credits are reserved. If the message says the model is offline, do not retry; choose a model listed in GET /pricing. If the message says the model is temporarily unavailable, retry later.

maintenance_mode

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

moderation_unavailable

Solution: Retry after a brief wait with exponential backoff. No credits were reserved.

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: