Vidu API
Dashboard
Docs
Sign in

Template Story

POST https://api.vidu.com/ent/v2/template-story

Request Header

FieldValueDescription
Content-Typeapplication/jsonData Exchange Format
AuthorizationToken {your api key}Replace {} with your API key

Request Body

FieldTypeRequiredDescription
storyStringRequiredTemplate Story
Accepted values: love_story workday_feels
imagesArray[String]RequiredAn 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,
data:image/png;base64,{base64_encode}
payloadStringOptionaltransparent transmission parameters
No processing, only data transmission,with a maximum length of 1048576 characters
callback_urlStringOptionalCallback
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

FieldTypeDescription
task_idStringTask ID
stateStringIt will be returned to a specific processing state:
- created created task successfully
- queueing task in queue
- processing processing
- success generation successful
- failedtask failed
storyStringThe parameter of the story used for this call
imagesArray[String]The images used for this call
payloadStringThe payload parameter used for this call
created_atStringTask 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"
}