Video Generation Overview
UniAll video models share one default asynchronous task lifecycle. Use each model page for model IDs, input fields, and capability limits; use this page for task polling, status handling, errors, and result retrieval.
Models
- Happy Horse
- Seedance 2.0
- Seedance 2.5
- Grok Video 1.5
- Grok Imagine
- Veo 3.1
- Gemini Omni Flash Preview
- Vidu Q3
- Hailuo
- Kling
- Wan 2.6
- Sora 2
Default Endpoints
{BASE_URL} is https://api.uniall.ai.
| Action | Method | Endpoint |
|---|---|---|
| Create a task | POST | /v1/videos |
| Query status and result | GET | /v1/videos/{task_id} |
| Download completed content | GET | /v1/videos/{task_id}/content |
Send Authorization: Bearer sk-*** on every request. A model page may document a compatible creation path or a protocol-specific exception; its model IDs and request body still come from that model page.
Video Task Lifecycle
1. Save The Task ID
A successful create request returns a public id. Some responses also include the same value as task_id for compatibility. Store either value before leaving the request flow.
{
"id": "task_xxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxx",
"object": "video.generation.job",
"model": "model-name",
"status": "queued",
"progress": 0,
"created_at": 1785801600
}
2. Poll The Task
Query the task every 3 to 10 seconds:
curl "{BASE_URL}/v1/videos/task_xxxxxxxxxxxxx" \
-H "Authorization: Bearer sk-***"
Stop only when status becomes completed or failed. Do not create a duplicate task only because the current task remains queued or in_progress.
| Status | Terminal | Meaning |
|---|---|---|
queued | No | The task was accepted and is waiting for processing. |
in_progress | No | Generation or result processing is still running. |
completed | Yes | The final result is ready. |
failed | Yes | The task ended without a result; inspect error. |
3. Read The Result
A completed task returns the public result in video_url, result.video_url, or result.outputs[0]. These fields can point to the same video.
{
"id": "task_xxxxxxxxxxxxx",
"task_id": "task_xxxxxxxxxxxxx",
"object": "video.generation.job",
"model": "model-name",
"status": "completed",
"progress": 100,
"video_url": "https://example.com/generated-video.mp4",
"result": {
"video_url": "https://example.com/generated-video.mp4",
"outputs": [
"https://example.com/generated-video.mp4"
]
},
"error": null
}
Use the authenticated content endpoint when you need the finalized file:
curl -L "{BASE_URL}/v1/videos/task_xxxxxxxxxxxxx/content" \
-H "Authorization: Bearer sk-***" \
-o output.mp4
Do not call the content endpoint before completion. Download generated media promptly instead of treating a result URL as permanent storage.
4. Handle Failure
{
"id": "task_xxxxxxxxxxxxx",
"object": "video.generation.job",
"model": "model-name",
"status": "failed",
"progress": 100,
"result": null,
"error": {
"code": "task_failed",
"message": "Video generation failed"
}
}
Fix invalid inputs before creating a new task. Retry transient service errors with backoff, but do not repeatedly resubmit the same request while the original task is still active.
Shared Response Fields
| Field | Type | Description |
|---|---|---|
id | string | Public task ID used for polling. |
task_id | string | Compatible alias of id when present. |
object | string | Task object type, commonly video.generation.job. |
model | string | Public model ID used for creation. |
status | string | queued, in_progress, completed, or failed. |
progress | integer | Progress from 0 to 100 when available; it does not replace status. |
video_url | string or null | Public result URL after completion. |
result | object or null | Completed output details, including video_url or outputs. |
error | object or null | Public code and message for a failed task. |
created_at | integer | Unix creation timestamp when available. |
completed_at | integer | Unix completion timestamp when available. |
Model-Specific Exceptions
Gemini Omni Flash Preview creates requests through POST /v1beta/interactions. When a follow-up query is needed, use the returned interaction_id with GET /v1/videos/generations/{interaction_id}. Its terminal statuses, error handling, and result fields follow the same rules above.
Protocol-specific pages such as Sora 2 Native OpenAI Format may stream their own response instead of returning a standard video task. Follow the response flow documented on that page.