Create Task
POST
/ent/v2/img2videoVidu Q Video Models
Authorizationstring*Replace {your api key} with your API key
Token {your api key}modelstring*Model name
imagesstring*An image to be used as the start frame of the generated video. The model will use the image provided via this parameter as the first frame to generate the video.Note 1: Accepts Base64-encoded image or image URL (ensure it is accessible).Note 2: Only 1 image is accepted.Note 3: Supported image 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 50MB.Note 6: Note that the byte length after base64 decode must be less than 10MB, and the encoding must contain an appropriate content type string. For base64,{base64_encode}normal
Authorizationstring*Replace {your api key} with your API key
Token {your api key}idstring*Task ID, returned by the Create Task API upon successful creation
data:image/pngpromptstringText prompt
A textual description for video generation.
Note 1: Maximum length of 2000 characters.
Note 2: If the is_rec recommended prompt parameter is used, the model will ignore the prompt entered for this parameter.
audiobooleanWhether to use direct audio-video generation capability. Default: false. Enumerated values:
voice_idstringVoice ID, used to determine the voice character in the video. The system will automatically recommend a suitable voice when empty, 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.
true: Yes, the system will automatically generate and apply a recommended prompt to create the video. The number of recommended prompts = 1.false: No, the video will be generated based on the user-provided prompt.durationintegerVideo duration.
seedintegerRandom seed
resolutionstringResolution (based on model & 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, with a maximum length of 1048576 characters
off_peakbooleanoff peak mode, Defaults to false, accepted value: truefalse
true: off peak generate mode;false: normal generate mode;watermarkbooleanWhether to add a watermark
true: Add watermark;false: Do not add watermark;wm_positionintegerWatermark position, indicates where the watermark appears on the frame. Accepted values:
1: top left
2: top right
3: bottom right
4: bottom left
Default: 3
wm_urlstringWatermark content, here is an image URL
If not provided, the default watermark is used: "AI-generated"
meta_datastringMetadata identifier, a JSON format string, pass-through field. You can use a custom format or the example format shown below:
{
"Label": "your_label","ContentProducer": "yourcontentproducer","ContentPropagator": "your_content_propagator","ProduceID": "yourproductid", "PropagateID": "your_propagate_id","ReservedCode1": "yourreservedcode1", "ReservedCode2": "your_reserved_code2"
}
When this parameter is empty, the metadata identifier generated by Vidu is used by default
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 Generation 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 processingsuccess generation successfulfailed task failed
err_codestringapplication/jsonResponse fields
task_idstringTask ID generated by Vidu
statestringIt will be returned to a specific processing state:
created created task successfullyqueueing task in queueprocessing processingError code, see the error code table for details
creditsintegerThe number of credits consumed by this task
payloadstringThe payload (pass-through) parameter passed in for this task call
bgmbooleanWhether bgm is used for this task call
off_peakbooleanWhether off peak mode is used for this task call
creationsarrayGeneration results
idstringGeneration ID, used to identify different creations
urlstringCreation URL, valid for 24 hours
cover_urlstringCreation cover, valid for 24 hours
watermarked_urlstringsuccessfailed task failedmodelstringThe model parameter 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
resolutionstringThe resolution parameter used for this call
movement_amplitudestringThe camera movement amplitude parameter used for this call
payloadstringThe payload parameter used for this call
off_peakbooleanThe off_peak parameter used for this call
creditsintegerThe credits used for this call
watermarkbooleanWhether a watermark is used for this call
created_atstringTask creation time
Watermarked creation URL, valid for 24 hours
curl --request POST \
--url 'https://api.vidu.com/ent/v2/img2video' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"model": "vidu2.0",
"images": "data:image/png",
"prompt": "The astronaut waved and the camera moved up.",
"audio": true,
"voice_id": "professional_host",
"is_rec": true,
"duration": 4,
"seed": 0,
"resolution": "1080p",
"movement_amplitude": "auto",
"payload": "string",
"off_peak": false,
"watermark": true,
"wm_position": 0,
"wm_url": "string",
"meta_data": "string",
"callback_url": "string"
}'{
"task_id": "your_task_id_here",
"state": "created",
"model": "vidu2.0",
"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": 4,
"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"
}
]
}