Video / Vidu

Vidu Q2 Image / Video Generation

Overview

Vidu Q2, supported Text-to-Image(t2i), Text-to-Video(t2v), Image-to-Video(i2v), Image-to-Video(mi2v), videoDuration 1-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" \
 -H "Authorization: Bearer your_auth_token_here" \
 -H "Content-Type: application/json" \
 -d '{
 "prompt": "in",
 "genType": "t2v",
 "resolution": "1080P",
 "aspectRatio": "16:9",
 "duration": 5
 }'

Create Text-to-Image Task

curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/vidu-q2" \
 -H "Authorization: Bearer your_auth_token_here" \
 -H "Content-Type: application/json" \
 -d '{
 "prompt": ",",
 "genType": "t2i",
 "resolution": "2K",
 "aspectRatio": "1:1"
 }'

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

Content-Type: application/json

Request Parameters

ParameterTypeRequiredDescription
promptstringYesPrompt, up to 1500characters
genTypestringNoGeneration type, default t2i
imageUrlsstring[]ConditionReference imageURL (i2v: 1images, mi2v: up to 7 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
t2iText-to-ImageNot required
t2vText-to-VideoNot required
i2vImage-to-Video1 images
mi2vImage-to-Video1-7 images
Description:Image Generation(t2i)Not required duration Parameter

Request Example

Text-to-Image (2KResolution):

{
 "prompt": ",",
 "genType": "t2i",
 "resolution": "2K",
 "aspectRatio": "1:1"
}

Text-to-Video (5seconds):

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

Image-to-Video:

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

Image-to-Video:

{
 "prompt": "will image video",
 "genType": "mi2v",
 "imageUrls": [
 "https://example.com/img1.jpg",
 "https://example.com/img2.jpg",
 "https://example.com/img3.jpg"
 ],
 "resolution": "1080P",
 "duration": 6
}

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 image/video URL list (Successreturned when applicable)
data.errorMsgstringError Message (Failurereturned when applicable)
data.createdAtstringCreated Time
data.updatedAtstringUpdated Time

Response Example

Success

{
 "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

Request Example

{
 "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