Create Task
POST
/ent/v2/reference2videoQuery Creations
GET
/ent/v2/tasks/{id}/creationsVidu Q Video Models
How to create a subject: Create Subject
modelString*Model name
Accepted values: viduq1
imagesArray[String]The model will use the subjects in the provided images as references to generate a video with subject consistency. Different model versions accept different numbers of reference images
Note 1: The viduq1 series models accept 1 to 7 images
Note 2: Assets can be provided via Base64 encode or image URLs (make sure they are accessible)
Note 3: Supported formats: png, jpeg, jpg, webp
Note 4: The dimensions of the images must be at least 128x128 pixels, and the aspect ratio of the images must be less than 1:4 or 4:1
Note 5: The post body of the HTTP request should not exceed 20MB, and it must include an appropriate content type string. For instance:data:image/png;base64,{base64_encode}
promptString*Text prompt
A textual description for video generation
Note: The maximum length is 5000 characters
bgmBoolWhether to add background music to the generated video. Default: false. Accepted values: true, false
durationIntVideo duration parameter, with default values depending on the model:
5seedIntRandom seed
When it is not passed or set to 0, a random number will be used instead
Manually set values will be used as the seed
aspect_ratioStringThe aspect ratio of the output video
Defaults to 16:9, accepted values: 1:1, 9:16, 16:9, 3:4, 4:3
auto: Automatically recommended based on the input image or video
movement_amplitudeStringThe movement amplitude of objects in the frame
Defaults to auto, accepted values: auto, small, medium, large
resolutionStringResolution parameter, with default values depending on the model and video duration:
payloadStringTransparent transmission parameters
No processing, only data transmission
Note: Maximum of 1048576 characters
off_peakBoolOff-peak mode. Default: false. Accepted values:
watermarkBoolWhether to add a watermark
wm_positionIntWatermark position, indicating where the watermark appears on the image. Default: 3. Accepted values:
1: Top left
2: Top right
3: Bottom right
4: Bottom left
wm_urlStringWatermark content, which is an image URL
If not provided, the default watermark will be used: Content generated by AI
meta_dataStringMetadata identifier, a JSON-formatted string and a transparent transmission field. You can customize the format or use the sample format below:
{
"Label": "your_label","ContentProducer": "your_content_producer","ContentPropagator": "your_content_propagator","ProduceID": "your_product_id", "PropagateID": "your_propagate_id","ReservedCode1": "your_reserved_code1", "ReservedCode2": "your_reserved_code2"
}
When this parameter is empty, the metadata identifier generated by Vidu is used by default
callback_urlStringCallback protocol
You need to actively set the callback_url when creating a task. The request method is POST. When the video generation task changes its status, Vidu will send a callback request containing the latest status of the task to this URL. The structure of the callback request content is the same as the return body of the Get Creation API
The "status" returned in the callback includes the following states:
task_idStringTask ID generated by Vidu
stateStringIt will be returned to a specific processing state:
modelStringThe model used for this call
promptAuthorizationstring*Replace {your api key} with your API key
Token {your api key}modelstring*Model name
Accepted values: viduq1
auto_subjectsbooleanWhether to use the intelligent subject library capability. Default: false. Accepted values: true, false
Authorizationstring*Replace {your api key} with your API key
Token {your api key}idstring*Task id. The id is returned upon the successful creation of a task by the Start Generating API
curl --request POST \
--url 'https://api.vidu.com/ent/v2/reference2video' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"model": "viduq1",
"auto_subjects": true,
"subjects": {
"name": "[@image1]normal",
"images": [
"your_image1",
"your_image2"
],
"videos": "string",
"voice_id": "string",
"server_id": "string"
},
"prompt": "@1 and @2 are eating hot pot together, and the voiceover says everyone loves hot pot.",
"audio": true,
"duration": 8,
"seed": 0,
"aspect_ratio": "3:4",
"resolution": "1080p",
"movement_amplitude": "string",
"payload": "string",
"off_peak": true,
"watermark": true,
"wm_position": 0,
"wm_url": "string",
"meta_data": "string",
"callback_url": "string"
}'{
"task_id": "your_task_id_here",
"state": "created",
"model": "viduq1",
"images": [""],
"prompt": "[@1] and [@2] are eating hot pot together in [@3]",
"duration": 5,
"seed": random_number,
"aspect_ratio": "3:4",
"resolution": "720p",
"audio": true,
"payload":"",
"off_peak": false,
"credits":credits_number,
"created_at": "2025-01-01T15:41:31.968916Z"
}
{
"task_id": "your_task_id_here",
"state": "created",
"model": "viduq1",
"images": ["https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/reference2video-1.png","https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/reference2video-2.png","https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/reference2video-3.png"],
"prompt": "Santa Claus and the bear hug by the lakeside.",
"duration": 5,
"seed": random_number,
"aspect_ratio": "3:4",
"resolution": "540p",
"movement_amplitude": "auto",
"payload":"",
"off_peak": false,
"credits":credits_number,
"created_at": "2025-01-01T15:41:31.968916Z"
}curl --request GET \
--url 'https://api.vidu.com/ent/v2/tasks/{your_id}/creations' \
--header 'Authorization: Token {your api key}'{
"id":"your_task_id",
"state": "success",
"err_code": "",
"credits": 4,
"payload": "",
"creations": [
{
"id": "your_creations_id",
"url": "your_generated_results_url",
"cover_url": "your_generated_results_cover_url",
"watermarked_url": "your_generated_results_watermarked_url"
}
]
}The text prompt used for this call
imagesArray[String]The images used for this call
durationIntThe video duration parameter used for this call
seedIntThe random seed parameter used for this call
aspect_ratioStringThe aspect ratio parameter used for this call
resolutionStringThe resolution parameter used for this call
bgmBoolThe background music parameter used for this call
movement_amplitudeStringThe camera movement amplitude parameter used for this call
payloadStringThe payload parameter used for this call
off_peakBoolWhether to use off-peak mode for this call
creditsIntThe credits used for this call
watermarkBoolWhether to use a watermark for this submitted task
created_atStringTask creation time
subjectsstring*When using the q3, q2, q1, and 2.0 models, only image subjects and text subjects can be used
namestring*Subject name specified by the user. It can be used in the prompt via [@name] during generation. For
[@image1]normalimagesstringTemporary subject images. Up to 3 images per subject
Note 1: Assets can be provided via Base64 encode or image URLs (make sure they are accessible)
Note 2: Supported formats: png, jpeg, jpg, webp
Note 3: The dimensions of the images must be at least 128x128 pixels, and the aspect ratio of the images must be less than 1:4 or 4:1
Note 4: The post body of the HTTP request should not exceed 20MB, and it must include an appropriate content type string. For instance:data:image/png;base64,{base64_encode}
videosstringTemporary subject videos. Up to one 5-second video
Note 1: Only the viduq2-pro model of Reference to Video supports video subjects
Note 2: Supports uploading at most one 5-second video
Note 3: Supported formats: mp4, avi, mov
Note 4: The dimensions of the videos must be at least 128x128 pixels, and the aspect ratio must be less than 1:4 or 4:1
Note 5: The byte length after base64 decoding must be less than 20M, and the encoding must include an appropriate content type string. For instance:data:video/mp4;base64,{base64_encode}
voice_idstringVoice ID, used to determine the voice character in the video. The system will automatically recommend a suitable voice when it is empty. Optional values can be found in the Voice List
You can also use the Voice Cloning API to clone any voice. The voice_id parameters can be used interchangeably
server_idstringThe subject id obtained via the Create Subject API
Note: When server_id is not provided, it is treated as a temporary subject and will not be saved by the system
promptstring*Text prompt
A textual description for video generation
Note 1: The maximum length is 5000 characters
Note 2: Use [@subjects_name] to represent subject content. For normal
@1 and @2 are eating hot pot together, and the voiceover says everyone loves hot pot.audiobooleanWhether to use the direct audio-video output capability. Default: false. Accepted values: true, false
durationintegerVideo duration parameter, with default values depending on the model:
5seedintegerRandom seed
When it is not passed or set to 0, a random number will be used instead
Manually set values will be used as the seed
aspect_ratiostringThe aspect ratio of the output video
Defaults to 16:9, accepted values: 1:1, 9:16, 16:9, 3:4, 4:3
auto: Automatically recommended based on the input image or video
resolutionstringResolution parameter, with default values depending on the model and video duration:
movement_amplitudestringThe movement amplitude of objects in the frame
Defaults to auto, accepted values: auto, small, medium, large
payloadstringTransparent transmission parameters
No processing, only data transmission
Note: Maximum of 1048576 characters
off_peakbooleanOff-peak mode. Default: false. Accepted values:
watermarkbooleanWhether to add a watermark
wm_positionintegerWatermark position, indicating where the watermark appears on the image. Default: 3. Accepted values:
1: Top left
2: Top right
3: Bottom right
4: Bottom left
wm_urlstringWatermark content, which is an image URL
If not provided, the default watermark will be used: Content generated by AI
meta_datastringMetadata identifier, a JSON-formatted string and a transparent transmission field. You can customize the format or use the sample format below:
{
"Label": "your_label","ContentProducer": "your_content_producer","ContentPropagator": "your_content_propagator","ProduceID": "your_product_id", "PropagateID": "your_propagate_id","ReservedCode1": "your_reserved_code1", "ReservedCode2": "your_reserved_code2"
}
When this parameter is empty, the metadata identifier generated by Vidu is used by default
callback_urlstringCallback protocol
You need to actively set the callback_url when creating a task. The request method is POST. When the video generation task changes its status, Vidu will send a callback request containing the latest status of the task to this URL. The structure of the callback request content is the same as the return body of the Get Creation API
The "status" returned in the callback includes the following states:
application/jsonResponse fields
task_idstringTask ID generated by Vidu
statestringIt will be returned to a specific processing state:
application/jsonResponse fields
idstringTask ID
statestringIt will be returned to a specific processing state:
created: created task successfullyqueueing: task in queueprocessing: processingsuccess: generation successfulfailed: task failederr_codestringError code. See Error Code for details
creditsintegerThe number of credits consumed by this task. Unit: credits
payloadstringThe payload parameter used for this call
bgmbooleanWhether to use bgm for this call
off_peakbooleanWhether to use off-peak mode for this call
creationsarrayGenerated results
idstringCreation id, used to identify different creations
urlstringThe URL of the generated results, valid for 24 hours
cover_urlstringThe cover URL of the generated results, valid for 24 hours
watermarked_urlstringThe watermarked URL of the generated results, valid for 24 hours
modelThe model used for this call
promptstringThe text prompt used for this call
imagesstringThe images used for this call
durationintegerThe video duration parameter used for this call
seedintegerThe random seed parameter used for this call
aspect_ratiostringThe aspect ratio parameter used for this call
resolutionstringThe resolution parameter used for this call
bgmbooleanThe background music parameter used for this call
movement_amplitudestringThe camera movement amplitude parameter used for this call
payloadstringThe payload parameter used for this call
off_peakbooleanWhether to use off-peak mode for this call
creditsintegerThe credits used for this call
watermarkbooleanWhether to use a watermark for this submitted task
created_atstringTask creation time