Video / Vidu

Vidu Q4 Preview Video Generation

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

ParameterTypeRequiredDescription
genTypestringNoGeneration type:i2v Image-to-Video / r2v Reference-to-Video.If omittedwhen asset ( 1 images image or sounds r2v; i2v).t2v Text-to-Videosupported
promptstringConditionPrompt, up to 20000 characters.r2v Required, i2v Optional
imageUrlsstring[]Yesimageasset.i2v 1 images;r2v 1-15 images
soundsstring[]NoReference audio, only r2v supported, up to 3, Duration 3-12 seconds
resolutionstringNoResolution:540p / 720p(default) / 1080p / 2K / 4K
durationintNovideoDuration(seconds), default 5, range 3-16
aspectRatiostringNoAspect ratio, only r2v supported:16:9(default) / 9:16 / 1:1 / 4:3 / 3:4
audioboolNowhen audio, If omittedDefault
isRecboolNoPrompt, onlyi2v supported, If omittedDefault
seedintNorandom seed, localized example text[0, 2147483647].If omittedor 0
watermarkboolNoAdd watermark, If omittedDefault
wmPositionintNowatermarkLocation:1 /2 /3 /4 localized example text
wmUrlstringNowatermarkimage URL
payloadstringNofield, up to 1048576 characters,
taskNicknamestringNoTask label, in tasklist in
callbackUrlstringNotaskcomplete after Callback NotificationURL

Supported genType values

genTypeDescriptionimageUrls Requirementspromptcan use Parameter
i2vImage-to-Video1 imagesOptionalisRec
r2vReference-to-Video1-15 imagesRequiredsounds, aspectRatio
Note:Type Parameter, will return ParameterError will:> - i2v localized example textsounds andaspectRatio, localized example textimageUrls 1 images;> - r2v localized example textisRec.

localized example textgenType=t2v orimageUrls will 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

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

codeDescription
0Success
10002Parametermissing or malformed
10005API Key invalid or missing
10007Insufficient balance
30003Task not found
90003Internal server error
Updated 2026-10-10