Q2 Pro Create Task
POST
/ent/v2/img2videoQ2 Pro Query Creations
GET
/ent/v2/tasks/{id}/creationsVidu Q Video Models
Authorizationstring*Replace {your api key} with your token
Token {your api key}modelstring*Model name
imagesarray*The first frame image
The model uses the image passed in this parameter as the first frame to generate the video.
Note 1: Accepts a Base64-encoded image or an image URL (make sure it is accessible);
Note 2: Only 1 image is supported;
Note 3: Supported formats: png, jpeg, jpg, webp;Note 4: The aspect ratio of the image must be less than 1:4 or 4:1;Note 5: The image size must not exceed 50 MB;Note 6: Note that the byte length after base64 decode must be less than 10M, and the encoding must include an appropriate content type string, for base64,{base64_encode}normal
Authorizationstring*Replace {your api key} with your token
Token {your api key}idstring*Task ID. Returned by the Create Task API upon successful creation
Authorizationstring*Replace {your api key} with your API key
Token {your api key}modelstring*Model name
Accepted values: viduq2-turbo
imagesarray*An image to be used as the start frame of the generated video. The model will generate the video using the image provided in this parameter as the start frame.
Note 1: Accepts a public image URL (make sure it is accessible) or Base64 format.Note 2: Only accepts .Note 3: Supported formats: , , , .Note 4: The aspect ratio of the image must be less than .Note 5: The image size is limited to .Note 6: The byte length after Base64 decoding must be less than , and the encoding must include an appropriate content type string. For instance:data:image/png;base64,{base64_encode}
Authorizationstring*Replace {your api key} with your API key
Token {your api key}idstring*Task ID. Returned by the task creation API upon successful creation.
data:image/pngpromptstringText prompt
A textual description for video generation.
Note 1: The length must not exceed 2000 characters
Note 2: If the is_rec recommended prompt parameter is used, the model will ignore the prompt entered in this parameter
audiobooleanWhether to use the direct audio-video generation capability. Default: false. Enumerated values:
voice_idstringVoice ID. Used to determine the voice character in the video. If empty, the system will automatically recommend one. For the optional values, refer to the list: Voice List
You can also use the Voice Cloning API to clone any voice. The voice_id can be used interchangeably
is_recbooleanWhether to use the recommended prompt.
durationintegerVideo duration
For viduq2-pro, the default is 5. Available values: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
seedintegerRandom seed
If not passed or passed as 0, a random number will be used instead
A manually set value will be used as the seed
resolutionstringResolution. The default value depends on the model and video duration:
payloadstringTransparent transmission parameter
No processing, data transmission only
Note: Maximum of 1048576 characters
off_peakbooleanOff-peak mode. Default: false. Accepted values:
callback_urlstringCallback protocol
You need to actively set the callback_url when creating a task. The request method is POST. When the status of the video generation task changes, Vidu will send a callback request containing the latest status of the task to this URL. The structure of the callback request content is consistent with the return body of the Query Task API
The "status" returned in the callback includes the following states:
promptstringText prompt
A textual description for video generation.
Note 1: The maximum length is 2000 characters.
Note 2: If the is_rec parameter for recommended prompts is used, the model will ignore the manually entered prompt for this parameter.
audiobooleanWhether to use the direct audio-video generation capability. Default: false. Enumerated values:
voice_idstringVoice ID
Used to determine the voice character in the video. If left empty, the system will automatically recommend a suitable voice, and 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.
is_recbooleanWhether to use the recommended prompt.
durationintegerVideo duration.
viduq2-turbo: default 5s, available: 1, 2, 3, 4, 5, 6, 7, 8, 9, 10
seedintegerRandom seed
If this parameter is not provided or is set to 0, a random seed number will be used. Manually set values will be used as the seed.
resolutionstringResolution. The default value depends on the model and video duration.
payloadstringTransparent transmission parameters
No processing, only data transmission.
Note: Maximum length of 1048576 characters.
off_peakbooleanOff peak mode. Default: false. Accepted values:
callback_urlstringCallback
When creating a task, you need to actively set the callback_url with a POST request. When the video generation task changes its status, Vidu will send a callback request to this URL, containing the latest status of the task. The structure of the callback request content will be the same as the return body of the Get Video Generation Task API.
The "status" in the callback response includes the following states:
application/jsonResponse fields
idstringTask ID
statestringProcessing state
Accepted values:created created successfullyqueueing task in queueprocessing task processingsuccess task succeededfailed task failed
err_codestringError code. See the error code table for details
application/jsonResponse fields
idstringTask ID
statestringProcessing state. Accepted values:
created: task created successfully
queueing: task in queue
processing: task is being processed
success: task succeeded
failed: task failed
err_codestringError code. For details, see the error code table.
creditsintegerThe number of credits consumed by this task. Unit: credits.
payloadapplication/jsonResponse fields
task_idstringTask ID generated by Vidu
statestringProcessing state
Accepted values:
created: created successfully
queueing: task in queue
processing: task processing
success: task succeeded
failed: task failed
modelstringThe name of the model used for this call
promptstringThe prompt parameter used for this call
imagesapplication/jsonResponse fields
task_idstringTask ID generated by Vidu
statestringProcessing state. Accepted values:
modelcreditsThe number of credits consumed by this task. Unit: credits
payloadstringThe transparent transmission parameter passed in this task call
bgmbooleanWhether BGM is used in this task call
off_peakbooleanWhether off-peak mode is used in this task call
creationsarrayGeneration results
idstringCreation ID. Used to identify different creations
urlstringCreation URL. Valid for 24 hours
cover_urlstringCreation cover. Valid for 24 hours
watermarked_urlstringWatermarked creation URL. Valid for 24 hours
The pass-through parameter provided for this task
bgmbooleanWhether BGM was used for this task
off_peakbooleanWhether off peak mode was used for this task
creationsarrayGenerated results
idstringCreation ID, used to identify different creations
urlstringCreation URL, valid for 24 hours
cover_urlstringCreation cover, valid for 24 hours
watermarked_urlstringWatermarked creation URL, valid for 24 hours
The image parameter used for this call
durationintegerThe video duration parameter used for this call
seedintegerThe random seed parameter used for this call
resolutionstringThe resolution parameter used for this call
payloadstringThe transparent transmission parameter passed in this call
off_peakbooleanWhether off-peak mode is used in this call
creditsintegerThe number of credits consumed by this call
created_atstringTask creation time
The model name used for this call
promptstringThe text prompt used for this call
imagesstringThe image parameter used for this call
durationintegerThe video duration parameter used for this call
seedintegerThe random seed parameter used for this call
resolutionstringThe resolution parameter used for this call
payloadstringThe pass-through parameter provided for this call
off_peakbooleanWhether off peak mode was used for this call
creditsintegerThe credits consumed by this call
created_atstringTask creation time
curl --request POST \
--url 'https://api.vidu.com/ent/v2/img2video' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"model": "viduq2-pro",
"images": "data:image/png",
"prompt": "The astronaut waved and the camera moved up.",
"audio": true,
"voice_id": "professional_host",
"is_rec": true,
"duration": 5,
"seed": 0,
"resolution": "1080p",
"payload": "string",
"off_peak": true,
"callback_url": "string"
}'{
"task_id": "your_task_id_here",
"state": "created",
"model": "viduq2-pro",
"images": ["https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/image2video.png"],
"prompt": "The astronaut waved and the camera moved up.",
"duration": 5,
"seed": random_number,
"resolution": "1080p",
"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"
}
]
}curl --request POST \
--url 'https://api.vidu.cn/ent/v2/img2video' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"model": "viduq2-turbo",
"images": [
"https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/image2video.png"
],
"prompt": "The astronaut waved and the camera moved up.",
"audio": true,
"voice_id": "professional_host",
"is_rec": true,
"duration": 5,
"seed": 0,
"resolution": "1080p",
"payload": "string",
"off_peak": true,
"callback_url": "string"
}'{
"task_id": "your_task_id_here",
"state": "created",
"model": "viduq2-turbo",
"images": ["https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/image2video.png"],
"prompt": "The astronaut waved and the camera moved up.",
"duration": 5,
"seed": random_number,
"resolution": "1080p",
"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.cn/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"
}
]
}