Template Story
POST https://api.vidu.com/ent/v2/template-story
Request Header
Field | Value | Description |
---|---|---|
Content-Type | application/json | Data Exchange Format |
Authorization | Token {your api key} | Replace {} with your API key |
Request Body
Field | Type | Required | Description |
---|---|---|---|
story | String | Required | Template Story Accepted values: love_story workday_feels |
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 - All images are limited to 50MB - The length of the base64 decode must be under 10MB, 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). |
curl -X POST -H "Authorization: Token {your_api_key}" -H "Content-Type: application/json" -d '{"story": "choose_one_accept_value","images": ["input_your_images"]}' https://api.vidu.com/ent/v2/template-story
Response Body
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 |
created_at | String | Task creation time |
{"task_id": "your_task_id_here","state": "created","story": "choose_one_accept_value","images": ["input_your_images"],"payload":"","created_at": "2025-01-01T15:41:31.968916Z"}