Skip to main content

Vivienne Vidu Text-to-Video

POST 

/open/aigw/gateway/generations

Submit a video generation task and receive results via callback or polling.

Call Flow

  1. Call this endpoint to submit a video generation task and obtain a taskNo
  2. Upon completion, the system will POST callback notification results to your callbackUrl
  3. You can also poll via GET /open/aigw/gateway/generationTask?taskNo=xxx

Request

Responses

任务提交成功

Callback Notification Format

Upon completion, the system will POST the following data to your callbackUrl:

On success:

{
"taskNo": "a1b2c3d4...",
"status": "success",
"model": "viduq2_text2video",
"timestamp": 1234567890,
"data": {
"task_id": "6928de47-2e53-4ee6-901b-be05a8bf7669",
"status": "SUCCESS",
"request_id": "7d8d7f71a7314779b6947eed659085fa",
"result": ["https://cdn.example.com/result_1.mp4"],
"error_info": "",
"traceback": ""
},
"usage": { "totalPoints": 10 },
"sign": "sha256hex..."
}

On failure:

{
"taskNo": "a1b2c3d4...",
"status": "failed",
"model": "viduq2_text2video",
"timestamp": 1234567890,
"error": "Error message",
"sign": "sha256hex..."
}

Signature verification: sign = SHA256(taskNo + timestamp + apiKey)

Query Generation Task Status

GET /open/aigw/gateway/generationTask?taskNo={taskNo}

It is recommended to use the callback method first; this endpoint serves as a polling fallback.

Request parameters:

ParameterTypeRequiredDescription
taskNostringYesThe task number returned when the task was submitted

Response example (success):

{
"code": 1000,
"message": "success",
"data": {
"taskNo": "a1b2c3d4...",
"model": "viduq2_text2video",
"status": "success",
"createTime": "2025-01-01 12:00:00",
"data": { "result": ["https://cdn.example.com/result_1.mp4"] },
"usage": { "totalPoints": 10 }
}
}

Response example (failure):

{
"code": 1000,
"message": "success",
"data": {
"taskNo": "a1b2c3d4...",
"model": "viduq2_text2video",
"status": "failed",
"error": "Failure reason"
}
}

status values: pending (queued), processing (in progress), success (completed), failed (failed)