Video Generating
POST https://api.vidu.com/ent/v2/template-storyField | Value | Description |
|---|---|---|
Content-Type | application/json | Data Exchange Format |
Authorization | Token {your api key} | Replace {} with your API key |
Field | Type | Required | Description |
|---|---|---|---|
story | String | Required | Template Story Accepted values: love_story workday_feels monkey_king pigsy monk_tang one_shot |
images | Array[String] | Required | An image to be used as the start frame of the generated video 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 aspect ratio of the images must be 9:16 - The aspect ratio of one_shot is the same as the first input image - 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, |
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 |
story | String | The parameter of the story used for this call |
images | Array[String] | The images 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", "story": "choose_one_accept_value", "images": ["input_your_images"], "payload":"", "credits": credits_number, "created_at": "2025-01-01T15:41:31.968916Z" }