Create Task
POST
/ent/v2/templateQuery Creations
GET
/ent/v2/tasks/{id}/creationsOne-click Solutions
Authorizationstring*Replace {your api key} with your token
Token {your api key}templatestring*Scene template parameter
Different scene templates correspond to different calling parameters. We provide two ways to view them:
Official website example center: Scene Example Center
Documentation (supports querying by launch date): Scene Example Center Documentation
Authorizationstring*Replace {your api key} with your token
Token {your api key}idstring*The ID of the task, taken from the path.
{your_id}idstring*Task ID, returned upon successful creation by the Create Task API
imagesImages
The model will use the images passed in this parameter to generate the video.
Note 1: Supports passing image Base64 encoding or image URL (must be accessible)
Note 2: Images support png, jpeg, jpg, webp formats
Note 3: The image aspect ratio must be less than 1:4 or 4:1;
Note 4: Image size must not exceed 50 MB;
Note 5: Please note that the post body of an http request must not exceed 20MB, and the encoding must include an appropriate content type string, for base64,{base64_encode}normal
data:image/pngpromptstringText prompt
Text description for generating the video, no more than 2000 characters in length.
Note: When template= subject_3 or pubg_winner_hit, the prompt is not required
seedintegerRandom seed
If not passed or set to 0 by default, a random number will be used instead
If set manually, the specified seed will be used
aspect_ratiostringAspect ratio
Default 16:9, available values are as follows: 16:9, 9:16
* Different templates support different available values; see the template description for details
areastringParameter exclusive to the Exotic Princess effect
Only available when template is exotic_princess, available values are as follows:
Default: auto, options: denmark,uk,africa,china,mexico,switzerland,russia,italy,korea,thailand,india,japan
beaststringParameter exclusive to the Walk with Beasts effect
Only available when template is beast_companion, available values are as follows:
Default auto, options: bear,tiger,elk,snake,lion,wolf
bgmbooleanWhether to add background music to the generated video.
Default: false, available values true, false
payloadstringPass-through parameter
Not processed in any way, used only for data transmission
Note: Up to 1,048,576 characters
watermarkbooleanWhether to add a watermark
wm_positionintegerWatermark position, indicates where the watermark appears on the image, options are:1: top left2: top right3: bottom right4: bottom left
Default: 3
wm_urlstringWatermark content, here referring to an image URL
If not passed, the default watermark is used: Content generated by AI
meta_datastringMetadata identifier, a JSON-format string, a pass-through field. You may use a custom format or the example 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"
}
If this parameter is empty, the metadata identifier generated by Vidu is used by default
callback_urlstringCallback protocol
You need to actively set callback_url when creating the task; the request method is POST. When the status of the video generation task changes, Vidu will send a callback request containing the task's latest status to this address. The content structure of the callback request is consistent with the response body of the Query Task API
The "status" returned by the callback includes the following states:
processing Task is processingsuccess Task completed (if sending fails, callback is retried three times)failed Task failed (if sending fails, callback is retried three times)application/jsonResponse fields
task_idstringTask ID generated by Vidu
statestringProcessing status
Available values:created Created successfullyqueueing Task is queuedprocessing Task is processingsuccess Task succeededfailed Task failed
templatestringapplication/jsonResponse fields
idstringTask ID
statestringProcessing status
Available values:
created Created successfully
queueing Task is queued
processing Task is processing
success Task succeeded
failed Task failed
err_codestringError code, see the error code table for details
creditsintegerNumber of credits consumed by this task, unit: credits
The scene parameter used in this call
promptstringThe prompt parameter used in this call
imagesstringThe image parameter used in this call
seedintegerThe random seed parameter used in this call
aspect_ratiostringThe aspect ratio parameter used in this call
bgmbooleanThe background music parameter used in this call
payloadstringThe pass-through parameter passed in this call
watermarkbooleanWhether a watermark was used in this call
creditsintegerNumber of credits used in this call
created_atstringTask creation time
payloadstringThe pass-through parameter passed in this task call
bgmbooleanWhether BGM was used in this task call
off_peakbooleanWhether off-peak mode was used in this task call
creationsarrayGeneration results
idstringGeneration result ID, used to identify different generation results
urlstringGeneration result URL, valid for 24 hours
cover_urlstringGeneration result cover, valid for 24 hours
watermarked_urlstringcurl --request POST \
--url 'https://api.vidu.com/ent/v2/template' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"template": "string",
"images": "data:image/png",
"prompt": "string",
"seed": 0,
"aspect_ratio": "string",
"area": "string",
"beast": "string",
"bgm": true,
"payload": "string",
"watermark": true,
"wm_position": 0,
"wm_url": "string",
"meta_data": "string",
"callback_url": "string"
}'{
"task_id": "your_task_id_here",
"state": "created",
"template": "hug",
"images": ["https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/scene-template/hug.jpeg"],
"prompt": "hug",
"seed": random_number,
"payload":"",
"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"
}
]
}Watermarked generation result URL, valid for 24 hours