Errors
OmniVideo API Error Handling
Handle authentication, validation, billing, and task processing errors for Gemini Omni video generation.
Error response
{
"code": 400,
"message": "Bad Request: 'duration' must be between 3 and 15 seconds.",
"data": null
}Common errors
| Status | Cause | Action |
|---|---|---|
| 400 | Invalid model, prompt, duration, aspect ratio, or mode. | Validate request payload before submitting. |
| 401 | Missing or invalid Bearer token. | Create an API key and send it in the Authorization header. |
| 402 | Insufficient credits. | Top up credits or upgrade the account. |
| 404 | Task ID not found. | Confirm you are polling the task_id returned by /api/generate. |
| 429 | Rate limit or upstream capacity pressure. | Retry with exponential backoff. |
| 500 | Temporary server or provider failure. | Retry later and contact support if it persists. |
Retry guidance
Do not retry validation errors unchanged
Fix 400-level parameter issues before submitting another generation task.
Use backoff for capacity errors
For 429 or 5xx responses, wait and retry with jitter instead of looping immediately.
Poll status at a steady interval
A 5 to 10 second interval is usually enough for status polling.