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
| Parameter | Type | Required | Description |
|---|---|---|---|
| prompt | string | Yes | Prompt, up to 1500characters |
| genType | string | No | Generation type, default t2i |
| imageUrls | string[] | Condition | Reference imageURL (i2v: 1images, mi2v: up to 7 images ) |
| base64File | string | No | Base64encoded image (imageUrls) |
| base64FileList | string[] | No | Base64multiple encoded images |
| resolution | string | No | Resolution:720P / 1080P(default) / 2K / 4K |
| aspectRatio | string | No | Aspect ratio:16:9(default) / 9:16 / 1:1 / 4:3 / 3:4 |
| duration | int | No | videoDuration(seconds), default5, range 1-10 |
| callbackUrl | string | No | taskcomplete after Callback NotificationURL |
Supported genType values
| genType | Description | imageUrls Requirements |
|---|---|---|
| t2i | Text-to-Image | Not required |
| t2v | Text-to-Video | Not required |
| i2v | Image-to-Video | 1 images |
| mi2v | Image-to-Video | 1-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
| Parameter | Type | Description |
|---|---|---|
| code | int | Status Code, 0 indicates success |
| msg | string | Message |
| data.taskId | string | Task ID |
| data.status | string | asprocessing |
| data.createdAt | string | Created 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
| Parameter | Type | Description |
|---|---|---|
| code | int | Status Code, 0 indicates success |
| msg | string | Message |
| data.taskId | string | Task ID |
| data.status | string | processing / success / failed |
| data.result | string[] | Generated image/video URL list (Successreturned when applicable) |
| data.errorMsg | string | Error Message (Failurereturned when applicable) |
| data.createdAt | string | Created Time |
| data.updatedAt | string | Updated 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
| code | Description |
|---|---|
| 0 | Success |
| 10002 | Parametermissing or malformed |
| 10005 | API Key invalid or missing |
| 30003 | Task not found |
| 90003 | Internal server error |