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*Start frame image
The model generates the video using the image passed in this parameter as the start frame.
Note 1: Accepts a Base64-encoded image or an image URL (make sure it is accessible)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 decode should not exceed , and the encoding must include an appropriate content type string. For instance,
Authorizationstring*Replace {your api key} with your API key
Token {your api key}idstring*idstring*Task id. The id is returned upon the successful creation of a task by the Start Generating API
data:image/png;base64,{base64_encode}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 prompt entered 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. The system will automatically recommend a suitable voice when it is 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
durationintegerVideo duration
viduq1-classic: default is 5, available: 5
seedintegerRandom 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
resolutionstringResolution. The default value depends on the model and video duration:
movement_amplitudestringMovement amplitude
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. Accepted values:
1: Top left
2: Top right
3: Bottom right
4: Bottom left
Default: 3
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": "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 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
idstringTask ID
statestringIt will be returned to a specific processing state:
created: created task successfullyqueueing: task in queueprocessing: processingapplication/jsonResponse fields
task_idstringTask ID generated by Vidu
statestringIt will be returned to a specific processing state:
successfailed: 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_urlstringmodelThe 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
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_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
The watermarked URL of the generated results, 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": "viduq1-classic",
"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",
"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": "viduq1-classic",
"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}' \
--header 'Content-Type: application/json'{
"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"
}
]
}