Errors
HTTP status codes, error format, and retry guidance
Errors use a consistent JSON envelope:
{
"error": {
"type": "invalid_request_error",
"code": "unsupported_duration",
"message": "Duration must be one of: 5, 10.",
"param": "duration"
}
}| HTTP | Meaning | Retry? |
|---|---|---|
400 | Invalid JSON, parameter, model option, or idempotency key | Fix request |
401 | Missing, invalid, or revoked API key | Replace key |
402 | Insufficient credits | Add credits |
413 | Request body is too large | Reduce request size |
429 | API-key rate limit exceeded | Retry with backoff |
404 | Generation not found for this account | Do not retry |
500 | Unexpected Mistrounter error | Retry with backoff |
502 | Upstream provider rejected submission | Safe to retry with the same idempotency key |
503 | Video provider is not configured or temporarily unavailable | Retry later |
Retry network errors and 5xx responses with exponential backoff and jitter.
Always reuse the original Idempotency-Key; do not automatically retry other
4xx responses.