Create Task
POST
/ent/v2/ad-one-clickQuery Creations
GET
/ent/v2/tasks/{id}/creationsOne-click Solutions
Authorizationstring*Replace {your api key} with your token
Token {your api key}imagesstring*Product images, model images (optional), etc. used to generate the AD-film
Note 1: Supports Base64-encoded images or image URLs (must be accessible);
Note 2: Supports 1~7 input images;
Note 3: Images support png, jpeg, jpg, webp formats;
Note 4: Image aspect ratio must be less than 1:4 or 4:1;
Note 5: Image size must not exceed 50 MB;
Note 6: Note that the POST body of the HTTP request must not exceed 20MB, and the encoding must include the appropriate content type string, for base64,{base64_encode}
Note 7: The first product image works best when it shows a front-facing viewnormal
data:image/pngpromptAuthorizationstring*Replace {your api key} with your token
Token {your api key}idstring*AD-film id or subtask id
Authorizationstring*Replace {your api key} with your token
Token {your api key}idstring*AD-film task id, returned upon successful creation via the create task interface
Authorizationstring*Replace {your api key} with your token
Token {your api key}ad_one_click_task_idstring*Main one-click AD-film task id
typestring*Task type
generate_video: Video generation task
generate_narration: Narration generation task
generate_bgm: Background music generation task
storyboard_video_indexintegerAuthorizationstring*Replace {your api key} with your token
Token {your api key}ad_one_click_task_idstring*Main one-click AD-film task id (obtained via the create task interface)
video_task_idsstring*List of video task ids; must match the number of storyboard segments in the original main task
bgm_task_idstring*User prompt
Text description for the generated video.
Note 1: Character length must not exceed 2000 characters
durationintegerDuration, 8–60s, default is 15s
aspect_ratiostringOutput aspect ratio, default 16:9
Available values: 1:1, 16:9, 9:16
languagestringLanguage used for dialogue or narration, default zh
Available values: zh, en
creativebooleanWhether the AD-film should include creative segments, default is false
callback_urlstringCallback protocol
You need to actively set callback_url when creating the task; the request method is POST. When the video generation task's status changes, Vidu will send a callback request containing the task's latest status to this address. The structure of the callback request content is consistent with the response body of the task query API
The "status" returned in the callback includes the following states:
Storyboard segment number; required when type is generate_video, used to specify the segment number to modify
Note: Storyboard segment numbering starts at 0
promptstring*Meaning varies by task type:
generate_video: Prompt used to generate the storyboard segment
generate_narration: Text used to generate the AD-film narration (voice remains unchanged)
generate_bgm: Prompt used to generate the AD-film background music
Note: Duration remains unchanged when editing
callback_urlstringCallback protocol
You need to actively set callback_url when creating the task; the request method is POST. When the video generation task's status changes, Vidu will send a callback request containing the task's latest status to this address. The structure of the callback request content is consistent with the response body of the task query API
The "status" returned in the callback includes the following states:
payloadstringCallback pass-through parameter
Background music task id
narration_task_idstring*Narration task id
callback_urlstringCallback protocol
You need to actively set callback_url when creating the task; the request method is POST. When the video generation task's status changes, Vidu will send a callback request containing the task's latest status to this address. The structure of the callback request content is consistent with the response body of the task query API
The "status" returned in the callback includes the following states:
payloadstringCallback pass-through parameter
application/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
application/jsonResponse fields
idstringThis AD-film task id
err_codestringError code
statestringTask status
created: Created successfully
queueing: Task is queued
processing: Task is processing
success: Task succeeded
failed: Task failed
application/jsonResponse fields
task_idstringThe task id generated by Vidu for this task
statestringTask status
Available values:
created: Created successfully
queueing: Task is queued
processing: Task is processing
success: Task succeeded
failed: Task failed
imagesstringImages used in this AD-film
promptstringUser-input prompt for this AD-film
application/jsonResponse fields
ad_one_click_task_idstringMain one-click AD-film task id
sub_task_idstringTask id for this edit; task status can be retrieved via the query creations interface
statestringTask status
created: Created successfully
queueing: Task is queued
processing: Task is processing
success: Task succeeded
failed: Task failed
creditsintegerNumber of credit points consumed for this AD-film
application/jsonResponse fields
ad_one_click_task_idstringMain one-click AD-film task id
compose_sub_task_idstringTask id for this recomposition; task status can be retrieved via the query creations interface
statestringTask status
created: Created successfully
queueing: Task is queued
processing: Task is processing
success: Task succeeded
failed: Task failed
creditsintegerNumber of credit points consumed for this AD-film
payloadstringPass-through parameter provided when this task was invoked
bgmbooleanWhether background music was used for this task invocation
off_peakbooleanWhether off-peak mode was used for this task invocation
progressintegerTask generation progress
creationsarrayGenerated result(s)
idstringGeneration result id, used to identify different generated results
urlstringURL of the generated result, valid for one hour
cover_urlstringCover image of the generated result, valid for one hour
watermarked_urlstringdata_recordsSet of subtasks
storyboardsstringStoryboard task records
narration_recordsstringNarration task records
bgm_recordsstringBackground music task records
completed_creation_recordsstringComposed AD-film task records
storyboards.stroyboard_idintegerStoryboard segment number, starting from 0, e.g. 0, 1, 2, 3
storyboards.recordsarrayidstringUnique subtask id
statestringTask status
created: Created successfully
queueing: Task is queued
processing: Task is processing
success: Task succeeded
failed: Task failed
err_codestringError code
typestringTask type
generate_video: Video generation task
generate_narration: Narration generation task
generate_bgm: Background music generation task
promptstringMeaning varies by task type:
generate_video: Prompt used to generate the storyboard segment
generate_narration: Narration content
generate_bgm: Prompt used to generate the background music
creation_urlstringURL of the generated result
idstringUnique subtask id
statestringTask status
created: Created successfully
queueing: Task is queued
processing: Task is processing
success: Task succeeded
failed: Task failed
err_codestringError code
creation_urlstringURL of the generated result
paramsobjectParameter information
video_task_idsstringList of video task ids used in the composition
bgm_task_idstringBackground music task id used in the composition
bgm_task_idstringNarration task id used in the composition
durationintegerDuration of the generated video for this AD-film
aspect_ratiostringVideo aspect ratio for this AD-film
languagestringLanguage used for narration/dialogue generation in this AD-film
creditsintegerNumber of credit points consumed for this AD-film
Watermarked URL of the generated result, valid for one hour
All video task records for the current storyboard segment number
curl --request POST \
--url 'https://api.vidu.com/ent/v2/ad-one-click' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"images": "data:image/png",
"prompt": "",
"duration": 15,
"aspect_ratio": "16:9",
"language": "zh",
"creative": true,
"callback_url": "string"
}'{
"task_id": "your_task_id_here",
"state": "created",
"images": ["https://prod-ss-images.s3.cn-northwest-1.amazonaws.com.cn/vidu-maas/template/image2video.png"],
"prompt": "",
"duration": 15,
"aspect_ratio": "16:9",
"language": "zh",
"credits":credits_number
}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": 400,
"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"
}
],
"progress":90
}curl --request GET \
--url 'https://api.vidu.com/ent/v2/ad-one-click/{id}' \
--header 'Authorization: Token {your api key}'{
"id": "891100896237203456",
"err_code": "",
"state": "success",
"data_records": {
"storyboards": [
{
"stroyboard_id": 0,
"records": [
{
"id": "891101095923822592",
"type": "generate_video",
"prompt": "string",
"creation_url": "string",
"state": "success",
"err_code": ""
},
{
"id": "891101095923822593",
"type": "generate_video",
"prompt": "string",
"creation_url": "string",
"state": "success",
"err_code": ""
},
]
},
{
"stroyboard_id": 1,
"records": [
{
"id": "891101095923822594",
"type": "generate_video",
"prompt": "string",
"creation_url": "string",
"state": "success",
"err_code": ""
}
]
},
{
"stroyboard_id": 2,
"records": [
{
"id": "891101095923822595",
"type": "generate_video",
"prompt": "string",
"creation_url": "string",
"state": "success",
"err_code": ""
}
]
}
],
"narration_records": [
{
"id": "891101095923822596",
"type": "generate_video",
"prompt": "string",
"creation_url": "string",
"state": "success",
"err_code": ""
}
],
"bgm_records": [
{
"id": "891101095923822597",
"type": "generate_video",
"prompt": "string",
"creation_url": "string",
"state": "success",
"err_code": ""
}
],
"completed_creation_records": [
{
"id": "891100914109132807",
"state": "success",
"params": {
"video_task_ids": [
"891101095923822592",
"891101095923822593",
"891101095923822594",
"891101095923822595",
],
"bgm_task_id": "891101095923822597",
"narration_task_id": "891101095923822596"
},
"creation_url": "string"
"err_code": ""
}
]
}
}curl --request POST \
--url 'https://api.vidu.com/ent/v2/ad-one-click/edit' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"ad_one_click_task_id": "123",
"type": "generate_video",
"storyboard_video_index": 0,
"prompt": "your_prompt",
"callback_url": "string",
"payload": "string"
}'{
"ad_one_click_task_id":"your_ad_one_click_task_id",
"sub_task_id": "new_sub_task_id",
"state": "success",
"err_code": "",
"credits": 400
}curl --request POST \
--url 'https://api.vidu.com/ent/v2/ad-one-click/compose' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"ad_one_click_task_id": "123",
"video_task_ids": [
"your_sub_task_id_1",
"your_sub_task_id_2",
"your_sub_task_id_3"
],
"bgm_task_id": "your_bgm_id_1",
"narration_task_id": "your_narration_id_1",
"callback_url": "string",
"payload": "string"
}'{
"ad_one_click_task_id":"your_task_id",
"compose_sub_task_id": "new_id",
"state": "success",
"credits": 400
}