Error Handling
Error Response Format
All error responses use this structure:
HTTP Status Codes
400 - Bad Request
Error Type: invalid_request_error
Invalid request parameters or validation errors.
401 - Unauthorized
Error Type: authentication_error
Missing or invalid API key.
402 - Payment Required
Error Type: insufficient_funds_error
Your account does not have enough credits to complete this request. This occurs when the estimated cost of the video generation exceeds your available balance.
Resolution:
- Check your current balance in your account dashboard
- Add credits to your account before retrying the request
- Consider generating a shorter video or using a lower resolution to reduce cost
See Pricing for details on video generation costs.
413 - Payload Too Large
Error Type: request_too_large
Request exceeds the maximum allowed number of bytes. This error is returned from the infrastructure layer before the request reaches the API. See Input Formats for size limits.
422 - Content Filtered
Error Type: content_filtered_error
Content rejected by safety filters.
429 - Too Many Requests
Error Types: rate_limit_error, concurrency_limit_error
Rate limit or concurrency limit exceeded. See Rate Limits for details.
500 - Internal Server Error
Error Type: api_error
Unexpected server error.
503 - Service Unavailable
Error Type: service_unavailable
Service temporarily unavailable.