Solutions
POST https://api.vidu.com/ent/v2/ad-one-click
Field
Value
Description
Content-Type
application/json
Data Exchange Format
Authorization
Token \{your api key\}
Replace \{\} with your API key
Field
Type
Required
Description
images
Array[String]
Required
Need to generate finished ad videos, product images, model photos, etc
- Accepts 1-7 images
- Accepts public URL or Base64 format.
- Supported formats: png, jpeg, jpg, webp
- The aspect ratio of the images must be less than 1:4 or 4:1
- All images are limited to 50MB
- The post body of the HTTP request should not exceed 20MB, and it must include an appropriate content type string. For instance,
data:image/png;base64,\{base64_encode\}
prompt
String
Optional
Text prompt
A textual description for video generation, with a maximum length of 2000 characters
duration
int
Optional
Video duration.
Default value :15,available: 10 - 60
aspect_ratio
String
Optional
The aspect ratio of the output video
Defaults to 16:9, accepted: 16:9 9:16 1:1
language
String
Optional
The language used in dialogue or narration,default zh
available zh,en
callback_url
String
Optional
Callback
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:
- processing: Task is being processed.
- success: Task is completed (if sending fails, it will retry the callback three times).
- failed: Task failed (if sending fails, it will retry the callback three times).
Vidu uses a callback signature algorithm for verification, check out the details here: ~Callback Signature~
Field
Type
Description
task_id
String
AD-Film Task ID
state
String
It will be returned to a specific processing state:
- created created task successfully
- queueing task in queue
- processing processing
- success generation successful
- failed task failed
images
Array[String]
The images used for this call
prompt
String
The text prompt used for this call
duration
Int
The video duration parameter used for this call
aspect_ratio
String
The aspect ratio parameter used for this call
language
string
The language generated for this call
credits
int
The credits used for this call
{
  "task_id": "your_task_id_here",
  "state": "created",
  "images": ["https://prod-ss-images.s3.com-northwest-1.amazonaws.com.com/vidu-maas/template/image2video.png"],
  "prompt": "",
  "duration": 15,
  "aspect_ratio": "16:9",
  "language": "en"
  "credits":credits_number
}
GET https://api.vidu.com/ent/v2/tasks/{id}/creations
Field
Value
Description
Content-Type
application/json
Data Exchange Format
Authorization
Token \{your api key\}
Replace \{\} with your API key
Field
Type
Required
Description
id
String
Required
AD-Film task id OR Footage sub_task id
Field
Subfield
Type
Description
state
String
It will be returned to a specific processing state:
- created created task successfully
- queueing task in queue
- processing processing
- success generation successful
- failed task failed
err_code
String
In case of an error, a specific error code will be returned.
credits
Int
The number of credits consumed by this task.
Unit: credits.
payload
String
The payload parameter used for this call
bgm
Bool
Whether to use bgm for this call.
off_peak
Bool
Whether to use off_peak mode for this call.
creations
Array
Generated results
id
String
Creation id
url
String
The URL of the generated results, valid for one hour
cover_url
String
The cover URL of the generated results, valid for one hour
{
  "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
}

Used to query all subtasks of a fragmented task, including:

  • List of storyboards and collection of video information for each footage
  • Narrator task information collection
  • Background music task information set
  • Synthesize into a set of task information
⠀GET https://api.vidu.com/ent/v2/ad-one-click/{id}
Field
Value
Description
Content-Type
application/json
Data Exchange Format
Authorization
Token \{your api key\}
Replace \{\} with your API key
Field
Type
Required
Description
id
String
Required
Completed Main AD-Film task id
Field
Type
Description
id
string
AD-Film Main Task Id used for this call
err_code
string
Error code
state
string
It will be returned to a specific processing state:
- created created task successfully
- queueing task in queue
- processing processing
- success generation successful
- failed task failed
data_records
object
Subtask set

data_records

Field
Type
Description
storyboards
Array of storyboard
storyboard task records
narration_records
Array of record
narration task records
bgm_records
Array of record
bgm task records
completed_creation_records
Array of composed_task
compose task records

storyboard

Field
Type
Description
stroyboard_id
int
Storyboard sequence number, starting from 0, for example 0, 1, 2, 3
records
Array
All video task records for the current storyboard number

record

Field
Type
Description
id
string
Unique ID for subtask
state
string
It will be returned to a specific processing state:
- created created task successfully
- queueing task in queue
- processing processing
- success generation successful
- failed task failed
err_code
string
Error code
type
string
Task type
generate_video generates footage-video task
generate_narration generates footage-narration task
generate_bgm generates footage-bgm task
prompt
string
Depending on the type of task, it has different meanings:
generate_video is a prompt word used to generate storyboards
generate_narration is used to generate text with voiceover (unchanged tone)
generate_bgm is used to generate prompt words for background music in movies
Note: When making modifications, the duration remains unchanged
creation_url
string
The URL of the generated results, valid for one hour

composed_task

Field
Type
Description
id
string
Unique ID for subtask
state
string
It will be returned to a specific processing state:
- created created task successfully
- queueing task in queue
- processing processing
- success generation successful
- failed task failed
err_code
string
Error code
creation_url
string
The URL of the generated results, valid for one hour
params
object
Parameter Information
params.video_task_ids
array of string
List of storyboard task IDs involved in compose task
params.bgm_task_id
string
BGM task ID involved in compose task
params.bgm_task_id
string
Narration task ID involved in compose task
{
    "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": ""
            }
        ]
    }
}
POST https://api.vidu.com/ent/v2/ad-one-click/edit
Field
Value
Description
Content-Type
application/json
Data Exchange Format
Authorization
Token \{your api key\}
Replace \{\} with your API key
Field
Type
Required
Description
ad_one_click_task_id
string
Required
AD-Film creation main task ID
type
string
Required
Task type
generate_video generates footage-video task
generate_narration generates footage-narration task
generate_bgm generates footage-bgm task
storyboard_video_index
int
Optional
When type isgenerate_video,Required
Footage number
When only type is generate_video, it is used to specify the storyboard number that you want to modify
Attention: The storyboard number starts from 0
prompt
string
Required
Depending on the type of task, it has different meanings:
generate_video is a prompt word used to generate storyboards
generate_narration is used to generate text with voiceover (unchanged tone)
generate_bgm is used to generate prompt words for background music in movies
Note: When making modifications, the duration remains unchanged
callback_url
string
Optional
Callback
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:
- processing: Task is being processed.
- success: Task is completed (if sending fails, it will retry the callback three times).
- failed: Task failed (if sending fails, it will retry the callback three times).
Vidu uses a callback signature algorithm for verification. Check out the details here: ~Callback Signature~
payload
string
Optional
Transparent transmission parameters
No processing, only data transmission,with a maximum length of 1048576 characters
Edit Storyboard

Edit Narration

Edit BGM

Field
Type
Description
ad_one_click_task_id
string
AD-Film creation main task ID
sub_task_id
string
The task ID for this editing task, can be obtained from the Get Generation API to obtain the task status
state
string
It will be returned to a specific processing state:
- created created task successfully
- queueing task in queue
- processing processing
- success generation successful
- failed task failed
credits
int
The credits used for this call
{
  "ad_one_click_task_id":"your_ad_one_click_task_id",
  "sub_task_id": "new_sub_task_id",
  "state": "success",
  "err_code": "",
  "credits": 400
}
POST https://api.vidu.com/ent/v2/ad-one-click/compose
Field
Value
Description
Content-Type
application/json
Data Exchange Format
Authorization
Token \{your api key\}
Replace \{\} with your API key
Field
Type
Required
Description
ad_one_click_task_id
string
Required
AD-Film creation main task ID (obtained through the create task interface)
video_task_ids
Array of string
Required
sub_task_id List. must have the same number of storyboards as the original main task
Retrieve from Edit FootageAPI, and edit type = generate_video
bgm_task_id
string
Required
sub_task_id,Retrieve from Edit FootageAPI, and edit type = generate_bgm
narration_task_id
string
Required
sub_task_id,Retrieve from Edit FootageAPI, and edit type = generate_narration
callback_url
string
Optional
Callback
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:
- processing: Task is being processed.
- success: Task is completed (if sending fails, it will retry the callback three times).
- failed: Task failed (if sending fails, it will retry the callback three times).
Vidu uses a callback signature algorithm for verification. Check out the details here: ~Callback Signature~
payload
string
Optional
Transparent transmission parameters
No processing, only data transmission,with a maximum length of 1048576 characters
Field
Type
Description
ad_one_click_task_id
string
AD-Film Task ID
compose_sub_task_id
string
The task ID synthesized this time can be obtained from the Get GenerationAPI to obtain the task status
state
string
It will be returned to a specific processing state:
- created created task successfully
- queueing task in queue
- processing processing
- success generation successful
- failed task failed
credits
int
The credits used for this call
{
  "ad_one_click_task_id":"your_task_id",
  "compose_sub_task_id": "new_id",
  "state": "success",
  "credits": 400
}