API Reference
Task Status
Query the status of a video generation task
The Task Status API allows you to retrieve the progress and results of tasks initiated via the video generation endpoint.
Endpoint
GET /api/ai/videos/[taskId]
Optimized Polling You can safely poll this endpoint every 3 to 5 seconds.
Request Parameters
taskId (Path parameter, String, Required)
The ID of the task returned by the generation API (a numeric string).
Example Request
curl -X GET "https://qxan.net/api/ai/videos/2044657634195480577" \
-H "Authorization: Bearer YOUR_API_KEY"Response
The API returns a JSON object detailing the task's state, timestamps, and its final payload if it has succeeded.
{
"id": "2044657634195480577",
"object": "video",
"created": 1716398000,
"model": "runninghub-i2v-v1",
"status": "success",
"data": [
{
"url": "https://rh-images.xiaoyaoyou.com/1fed4ce62b6a35e17d9103980f90ef6a/output/ComfyUI_00001_ynbbq_1776760390.png",
"cover_url": null
}
],
"error": null
}Field Description
| Field | Type | Description |
|---|---|---|
id | String | Task ID |
object | String | Fixed value "video" |
created | Integer | Task creation timestamp (Unix seconds) |
model | String | Model name used |
status | String | Task status |
data | Array | Array of generated files |
data[].url | String | File URL |
data[].cover_url | String/null | Video cover URL (if available) |
error | Object/null | Error message, null on success |
Status Lifecycle
The status field can contain one of the following values:
pending— The task has been accepted and is waiting to be processed.processing— The task is currently being generated.success— The task has completed. Thedatafield will contain the output file information.failed— The task encountered an error. Check theerrorfield for details.
Error Response
{
"id": "2044657634195480577",
"object": "video",
"created": 1716398000,
"model": "runninghub-i2v-v1",
"status": "failed",
"data": [],
"error": {
"code": "timeout",
"message": "Task timed out"
}
}