Video / Vidu

Vidu Q2-Pro Video Generation

Overview

Vidu Q2-Pro height quality, supported Text-to-Video(t2v), Image-to-Video(i2v), First/Last Frame to Video(se2v), videoDuration1-10 seconds.

Base URL: https://mm-internal-cn.leonecloud.com


Authentication

Authorization: Bearer {YOUR_AUTH_TOKEN}

Quick Start

Create Text-to-Video task

curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/vidu-q2-pro" \
 -H "Authorization: Bearer your_auth_token_here" \
 -H "Content-Type: application/json" \
 -d '{
 "prompt": "no,, height",
 "genType": "t2v",
 "resolution": "1080P",
 "aspectRatio": "16:9",
 "duration": 5
 }'

create First/Last Frame to Videotask

curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/vidu-q2-pro" \
 -H "Authorization: Bearer your_auth_token_here" \
 -H "Content-Type: application/json" \
 -d '{
 "prompt": "localized example text",
 "genType": "se2v",
 "imageUrls": ["https://example.com/start_frame.jpg", "https://example.com/end_frame.jpg"],
 "resolution": "1080P",
 "duration": 5
 }'

Query Task Status

curl -X GET "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/task_abc123" \
 -H "Authorization: Bearer your_auth_token_here"

Create Task

POST /api/v2/open/aigc/vidu-q2-pro

Content-Type: application/json

Request Parameters

ParameterTypeRequiredDescription
promptstringYesPrompt, up to 1500characters
genTypestringNoGeneration type, default t2v
imageUrlsstring[]ConditionReference imageURL (i2v: 1images, se2v: 2 images )
base64FilestringNoBase64encoded image (imageUrls)
base64FileListstring[]NoBase64multiple encoded images
resolutionstringNoResolution:720P / 1080P(default) / 2K / 4K
aspectRatiostringNoAspect ratio:16:9(default) / 9:16 / 1:1 / 4:3 / 3:4
durationintNovideoDuration(seconds), default5, range 1-10
callbackUrlstringNotaskcomplete after Callback NotificationURL

Supported genType values

genTypeDescriptionimageUrls Requirements
t2vText-to-VideoNot required
i2vImage-to-Video1 images
se2vFirst/Last Frame to Video2images image ( first frame+last frame )

Request Example

Text-to-Video:

{
 "prompt": "no,, height",
 "genType": "t2v",
 "resolution": "1080P",
 "aspectRatio": "16:9",
 "duration": 8
}

Image-to-Video:

{
 "prompt": "image in the",
 "genType": "i2v",
 "imageUrls": ["https://example.com/flower.jpg"],
 "resolution": "1080P",
 "duration": 5
}

First/Last Frame to Video:

{
 "prompt": "localized example text",
 "genType": "se2v",
 "imageUrls": [
 "https://example.com/start_frame.jpg",
 "https://example.com/end_frame.jpg"
 ],
 "resolution": "1080P",
 "duration": 5
}

Response Parameters

ParameterTypeDescription
codeintStatus Code, 0 indicates success
msgstringMessage
data.taskIdstringTask ID
data.statusstringasprocessing
data.createdAtstringCreated Time

Response Example

{
 "code": 0,
 "msg": "success",
 "data": {
 "taskId": "task_20260507103000_abc12345",
 "status": "processing",
 "createdAt": "2026-05-07 10:30:00"
 }
}

Query Task Status

GET /api/v2/open/aigc/{taskId}

Response Parameters

ParameterTypeDescription
codeintStatus Code, 0 indicates success
msgstringMessage
data.taskIdstringTask ID
data.statusstringprocessing / success / failed
data.resultstring[]Generated video URL list (Successreturned when applicable)
data.errorMsgstringError Message (Failurereturned when applicable)
data.createdAtstringCreated Time
data.updatedAtstringUpdated Time

Response Example

{
 "code": 0,
 "msg": "success",
 "data": {
 "taskId": "task_20260507103000_abc12345",
 "status": "success",
 "result": [
 "https://fc-gw-sh.oss-accelerate.aliyuncs.com/videos/2026/05/07/output_001.mp4"
 ],
 "createdAt": "2026-05-07 10:30:00",
 "updatedAt": "2026-05-07 10:32:30"
 }
}

Batch Query Task Status

POST /api/v2/open/aigc/batch

{
 "taskIds": ["task_20260507103000_abc12345", "task_20260507103200_def67890"]
}

Callback Notification

task complete when, if providecallbackUrl, is provided, the system sends a POST request:

{
 "event": "task.completed",
 "taskId": "task_20260507103000_abc12345",
 "status": "success",
 "result": ["https://fc-gw-sh.oss-accelerate.aliyuncs.com/videos/output_001.mp4"],
 "errorMsg": "",
 "timestamp": "2026-05-07T10:32:30+08:00"
}

Error Codes

codeDescription
0Success
10002Parametermissing or malformed
10005API Key invalid or missing
30003Task not found
90003Internal server error
Updated 2026-09-02