Overview
Vidu Q4 Preview supported Image-to-Video(i2v) and Reference-to-Video(r2v), videoDuration 3-16 seconds, Resolution height 4K, can video.
Text-to-Video(t2v)supported, use Image-to-Video or Reference-to-Video.
Base URL: https://mm-internal-cn.leonecloud.com
Authentication
Authorization: Bearer {YOUR_AUTH_TOKEN}Quick Start
Create Image-to-Video task
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/vidu-q4-preview" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "image in the",
"genType": "i2v",
"imageUrls": ["https://example.com/reference.jpg"],
"resolution": "720p",
"duration": 5
}'create Reference-to-Videotask
curl -X POST "https://mm-internal-cn.leonecloud.com/api/v2/open/aigc/vidu-q4-preview" \
-H "Authorization: Bearer your_auth_token_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "in the character in and,",
"genType": "r2v",
"imageUrls": [
"https://example.com/character.jpg",
"https://example.com/scene.jpg"
],
"resolution": "1080p",
"aspectRatio": "16:9",
"duration": 8
}'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-q4-preview
Content-Type: application/json
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| genType | string | No | Generation type:i2v Image-to-Video / r2v Reference-to-Video.If omittedwhen asset ( 1 images image or sounds r2v; i2v).t2v Text-to-Videosupported |
| prompt | string | Condition | Prompt, up to 20000 characters.r2v Required, i2v Optional |
| imageUrls | string[] | Yes | imageasset.i2v 1 images;r2v 1-15 images |
| sounds | string[] | No | Reference audio, only r2v supported, up to 3, Duration 3-12 seconds |
| resolution | string | No | Resolution:540p / 720p(default) / 1080p / 2K / 4K |
| duration | int | No | videoDuration(seconds), default 5, range 3-16 |
| aspectRatio | string | No | Aspect ratio, only r2v supported:16:9(default) / 9:16 / 1:1 / 4:3 / 3:4 |
| audio | bool | No | when audio, If omittedDefault |
| isRec | bool | No | Prompt, onlyi2v supported, If omittedDefault |
| seed | int | No | random seed, localized example text[0, 2147483647].If omittedor 0 |
| watermark | bool | No | Add watermark, If omittedDefault |
| wmPosition | int | No | watermarkLocation:1 /2 /3 /4 localized example text |
| wmUrl | string | No | watermarkimage URL |
| payload | string | No | field, up to 1048576 characters, |
| taskNickname | string | No | Task label, in tasklist in |
| callbackUrl | string | No | taskcomplete after Callback NotificationURL |
Supported genType values
| genType | Description | imageUrls Requirements | prompt | can use Parameter |
|---|---|---|---|---|
| i2v | Image-to-Video | 1 images | Optional | isRec |
| r2v | Reference-to-Video | 1-15 images | Required | sounds, aspectRatio |
Note:Type Parameter, will return ParameterError will:> -i2vlocalized example textsoundsandaspectRatio, localized example textimageUrls1 images;> -r2vlocalized example textisRec.
localized example textgenType=t2vorimageUrlswill return ParameterError (Text-to-Video supported ), task will create, will.resolution, in will return ParameterError, will default.
Request Example
Image-to-Video (540p / 3 seconds):
{
"prompt": ",",
"genType": "i2v",
"imageUrls": ["https://example.com/portrait.jpg"],
"resolution": "540p",
"duration": 3,
"isRec": true
}Reference-to-Video (Reference audio):
{
"prompt": "character in in,",
"genType": "r2v",
"imageUrls": [
"https://example.com/char-a.jpg",
"https://example.com/char-b.jpg",
"https://example.com/street.jpg"
],
"sounds": ["https://example.com/rain.mp3"],
"resolution": "1080p",
"aspectRatio": "9:16",
"duration": 8,
"audio": true
}4K height Resolution:
{
"prompt": ",",
"genType": "i2v",
"imageUrls": ["https://example.com/mountain.jpg"],
"resolution": "4K",
"duration": 5
}Response Example
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20260507103000_abc12345",
"status": "processing",
"createdAt": "2026-05-07 10:30:00"
}
}Billing
localized example text「Resolutionlocalized example text× videoDuration(seconds)」, DurationRequest in theduration as.
taskcreate when,onlyin Success when; Failure.
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 video URL list (Successreturned when applicable) |
| data.errorMsg | string | Error Message (Failurereturned when applicable) |
| data.createdAt | string | Created Time |
| data.updatedAt | string | Updated Time |
validity period 24 hours:data.result in the video as when, after 24 hours, when after will return Error.in after and store with.Response Example
{
"code": 0,
"msg": "success",
"data": {
"taskId": "task_20260507103000_abc12345",
"status": "success",
"result": [
"https://example-video-store.s3.amazonaws.com/tasks/2026/05/07/video.mp4?X-Amz-Expires=86400&X-Amz-Signature=xxx"
],
"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://example-video-store.s3.amazonaws.com/tasks/video.mp4?X-Amz-Expires=86400&X-Amz-Signature=xxx"],
"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 |
| 10007 | Insufficient balance |
| 30003 | Task not found |
| 90003 | Internal server error |