Create Task
POST
/ent/v2/template-storyQuery Creations
GET
/ent/v2/tasks/{id}/creationsOne-click Solutions
Authorizationstring*Replace {your api key} with your token
Token {your api key}storystring*Template story parameter
Optional values: love_story, workday_feels, monkey_king, pigsy, monk_tang, one_shot
choose_one_accept_valueimagesstring*Images
The model will use the image(s) passed in this parameter to generate the video.
Note 1: Supports passing image Base64 encoding or an image URL (make sure it is accessible);
Note 2: Images support png, jpeg, jpg, webp formats;
Note 3: For image aspect ratio requirements, please refer to the Scenario Examples Center - Template Story;
Note 4: For one_shot, the video aspect ratio is the same as that of the input first image;
Note 5: Image size must not exceed 50 MB;
Note 6: Please note that the post body of an http request must not exceed 20MB, and the encoding must include an appropriate content type string, for base64,{base64_encode}normal
data:image/pngpayloadstringPass-through parameter
Not processed in any way, used only for data transmission
Note: Up to 1,048,576 characters
callback_urlstringCallback protocol
You need to actively set callback_url when creating the task; the request method is POST. When the video generation task's status changes, Vidu will send a callback request containing the task's latest status to this address. The content structure of the callback request is consistent with the response body of the task query API
The "status" returned in the callback includes the following states:
processing Task is being processedsuccess Task completed (if sending fails, the callback will be retried three times)failed Task failed (if sending fails, the callback will be retried three times)Authorizationstring*Replace {your api key} with your token
Token {your api key}idstring*Task ID, returned upon successful creation by the create task API
{your_id}curl --request POST \
--url 'https://api.vidu.com/ent/v2/template-story' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"story": "choose_one_accept_value",
"images": "data:image/png",
"payload": "string",
"callback_url": "string"
}'{
"task_id": "your_task_id_here",
"state": "created",
"story": "your_choose_value",
"images": ["input_your_images"],
"payload":"",
"credits":credits_number,
"created_at": "2025-01-01T15:41:31.968916Z"
}curl --request GET \
--url 'https://api.vidu.com/ent/v2/tasks/{your_id}/creations' \
--header 'Authorization: Token {your api key}'{
"id":"your_task_id",
"state": "success",
"err_code": "",
"credits": 4,
"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"
}
]
}application/jsonResponse fields
task_idstringTask ID generated by Vidu
statestringProcessing status
Optional values:created Created successfullyqueueing Task is queuedprocessing Task is being processedsuccess Task succeededfailed Task failed
storystringapplication/jsonResponse fields
idstringTask ID
statestringProcessing status
Optional values:
created Created successfully
queueing Task is queued
processing Task is being processed
success Task succeeded
failed Task failed
err_codestringError code, see the error code table for details
creditsintegerNumber of credits consumed by this task, unit: credits
payloadstringThe pass-through parameter passed in this task call
bgmbooleanWhether background music (bgm) was used in this task call
off_peakbooleanWhether off-peak mode was used in this task call
creationsarrayGeneration results
idstringGeneration result ID, used to identify different generation results
urlstringGeneration result URL, valid for 24 hours
cover_urlstringGeneration result cover image, valid for 24 hours
watermarked_urlstringWatermarked generation result URL, valid for 24 hours
The template story parameter used in this call
imagesstringThe image parameters used in this call
payloadstringThe pass-through parameter passed in this call
creditsintegerNumber of credits used in this call
created_atstringTask creation time