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

FieldTypeDescription
idStringTask ID
objectStringFixed value "video"
createdIntegerTask creation timestamp (Unix seconds)
modelStringModel name used
statusStringTask status
dataArrayArray of generated files
data[].urlStringFile URL
data[].cover_urlString/nullVideo cover URL (if available)
errorObject/nullError 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. The data field will contain the output file information.
  • failed — The task encountered an error. Check the error field for details.

Error Response

{
  "id": "2044657634195480577",
  "object": "video",
  "created": 1716398000,
  "model": "runninghub-i2v-v1",
  "status": "failed",
  "data": [],
  "error": {
    "code": "timeout",
    "message": "Task timed out"
  }
}