Video Generating
POST https://api.vidu.com/ent/v2/templateField | Value | Description |
|---|---|---|
Content-Type | application/json | Data Exchange Format |
Authorization | Token {your api key} | Replace {} with your API key |
Field | Type | Required | Description |
|---|---|---|---|
template | String | Required | AI video template Different templates have different call parameters.For details, please visit: Official website example:Templates Document (supports querying by update time):Template details |
images | Array[String] | Required | Images For fields that accept images: - Images Assets can be provided via URLs or Base64 encode - You must use one of the following codecs: PNG, JPEG, JPG, WebP - The pixel density of the images must be at least 128x128 pixels -- 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, |
prompt | String | Optional | Text prompt A textual description for video generation, with a maximum length of 2000 characters - when template = subject_3 pubg_winner_hit, you don’t need to input prompt. |
seed | Int | Optional | Random seed - Defaults to a random seed number - Manually set values will override the default random seed |
aspect_ratio | String | Optional | The aspect ratio of the output video Defaults to 16:9, accepted: 16:9 9:16 1:1 - Different templates accepted different aspect ratio |
area | String | Optional | Exotic Princess style control field only for templateexotic_princess, Default:auto, accepts:denmark,uk,africa,china,mexico,switzerland,russia,italy,korea,thailand,india,japan |
beast | String | Optional | beast companion style control field only for template beast_companion, Default auto, accepts:bear,tiger,elk,snake,lion,wolf |
bgm | Bool | Optional | Whether to add background music to the generated video. Default: false. Acceptable values: true, false. When true, the system will automatically add a suitable BGM. BGM has no time limit and the system automatically adapts. |
payload | String | Optional | transparent transmission parameters No processing, only data transmission,with a maximum length of 1048576 characters |
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 | 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 - failedtask failed |
template | String | The parameter of the template used for this call |
images | Array[String] | The images used for this call |
prompt | String | The text prompt used for this call |
seed | Int | The random seed parameter used for this call |
aspect_ratio | String | The aspect ratio parameter used for this call |
bgm | Bool | The bgm parameter used for this call |
payload | String | The payload parameter used for this call |
credits | Int | The credits used for this call |
created_at | String | Task creation time |
{ "task_id": "your_task_id_here", "state": "created", "template": "hugging", "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" }
On this page
Overview
- Request Header
- Request Body
- Response Body