Create Task
POST
/ent/v1/explain-comic/tasksQuery Creations
GET
/ent/v2/tasks/{id}/creationsOne-click Solutions
Authorizationstring*Replace {your api key} with your token
Token {your api key}script_namestring*Drama title, must not exceed 20 characters
script_contentstring*No character limit.If the script content exceeds 1200 Chinese characters or 3000 English characters, it will automatically be split into multiple tasksNote 1: The approximate mapping between character count and final duration is about 400 characters per minute, with some variation
assetsarray<object>Asset list, strongly recommended for ensuring consistency
idstring*Number, e.g. 01, 02, 03, and so onNote 1: Supports uploading up to 14 assets; 3-10 is recommended
typestring*Asset type, only supports: character, scene, toolNote: Character, Scene, Prop
namestring*Asset name, must not exceed 30 characters
image_uristringReference image; each asset can correspond to only one imageNote 1: Supports passing an image as a Base64 encoding or an image URL (must be accessible)Note 2: Images support png, jpeg, jpg, and webp formatsNote 3: Image pixel dimensions must not be smaller than 128*128, preferably no larger than 2k, and the aspect ratio must be less than 1:4 or 4:1Note 4: Please note that the POST body of the HTTP request must not exceed 20MB, and the encoding must include the appropriate content type string, for base64,{base64_encode}Note 5: Please note that this field name is image_uri, not image_url — a typo here will cause the asset image parameter to failnormal
resolutionstringResolution, default 720pOptional values: 720p, 1080p
aspect_ratiostringOutput aspect ratio, default 9:16Optional values: 16:9, 9:16, 4:3, 3:4
stylestringVideo style; you can enter styles such as 3D modeling style, 2D animation style, etc., limited to 30 characters. **No punctuation allowed.**Default is live-action realistic
languagestringLanguage, supports Chinese (zh), English (en)Default zh
tts_speednumberTTS speech rate, supports 1-1.5Default 1.1Recommended rate 1.3 (approximately 400 characters/min)
enable_lipsyncbooleanWhether to enable lip syncDefault true (lip sync enabled); selecting false disables lip sync.Without lip sync, consistency is better; with lip sync, dialogue is more natural
callback_urlstringCallback protocolYou 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 "status" returned in the callback includes the following states:- processing: Task is processing- success: Task completed (retried 3 times if sending fails)- failed: Task failed (retried 3 times if sending fails)Vidu uses a callback signature algorithm for authentication; see: Callback Signature Algorithm
comic_bgmstringBackground musicSupports URL; duration follows the video — if shorter than the video it will loop, if longer than the video it will be cut off directly
add_subtitlebooleanWhether to add subtitles to the videotrue, false; default false (no subtitles)
subtitle_typestringsource_han_serif (Source Han Serif)source_han_sans (Source Han Sans)
qualitystringhigh/standardDefault standard
Authorizationstring*Replace {your api key} with your token
Token {your api key}idstring*idstring*Task ID, returned upon successful creation by the task creation API
curl --request POST \
--url 'https://api.vidu.cn/ent/v1/explain-comic/tasks' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"script_name": "string",
"script_content": "string",
"assets": [
{
"id": "string",
"type": "string",
"name": "string",
"image_uri": "data:image/png",
"description": "string",
"voice_id": "string"
}
],
"resolution": "string",
"aspect_ratio": "string",
"style": "string",
"language": "string",
"tts_speed": 0,
"enable_lipsync": true,
"callback_url": "string",
"comic_bgm": "string",
"add_subtitle": true,
"subtitle_type": "string",
"quality": "string"
}'{
"id": "your_id_here"
}curl --request GET \
--url 'https://api.vidu.com/ent/v2/tasks/{your_id}/creations' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json'{
"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"
}
]
}data:image/pngdescriptionstringDescription of the asset — information such as identity, appearance, age, etc.
voice_idstringVoice ID. **Only characters need content for this parameter; scenes and props can leave it empty ("voice_id":"")**Recommended for China - Adult Female narration: Chinese_Female_CurrencyRecommended for China - Adult Male narration: Chinese_Male_CurrencyNote 1: Other voice options:- Chinese_Male_Currency (All languages - Male) - Chinese_Female_Currency (All languages - Female) - Chinese_gravelly_storyteller_vv2 (China - Middle-aged Male) - Chinese (Mandarin)_Reliable_Executive (Steady Executive: entrepreneur, leader) - Chinese (Mandarin)_News_Anchor (News Female Voice: announcer, host) - Chinese (Mandarin)_Unrestrained_Young_Man (Unrestrained Youth: free-spirited character) - Arrogant_Miss (Arrogant Miss: wealthy heiress, villain) - Robot_Armor (Robot Armor: robot, AI) - Chinese (Mandarin)_Kind-hearted_Antie (Wealthy Middle-aged Woman) - Chinese (Mandarin)_Humorous_Elder (China - Elderly Male) - Chinese (Mandarin)_Male_Announcer (Broadcast Male Voice: narrator) - Chinese (Mandarin)_Wise_Women (Experienced Sister: wise woman) - Chinese (Mandarin)_Gentle_Youth (Gentle Youth: literary youth) - Chinese (Mandarin)_Warm_Girl (Warm Girl: warm character) - Chinese (Mandarin)_Kind-hearted_Elder (Elderly Woman) - Chinese (Mandarin)_Cute_Spirit (General - Little Boy) - Chinese (Mandarin)_Radio_Host (Radio Male Host: host) - Chinese (Mandarin)_Sincere_Adult (Sincere Youth: upright character) - Chinese (Mandarin)_Gentle_Senior (Gentle Senior Sister: gentle senior sister) You can preview these at New Voice ListNote 2: If the voice you want is not in the voice list, you can go to Voice Cloning | Vidu API to clone the voice you need, save the voice ID, and upload the ID in this fieldNote 3: Narration voices need to be controlled by creating a narrator character; the narrator character's image can be anything.
application/jsonResponse fields
idstringThe task ID generated by Vidu for this task
application/jsonResponse fields
idstringTask ID
statestringProcessing status
Optional values:
created: Created successfully
queueing: Task queued
processing: Task processing
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 passthrough parameter provided when this task was invoked
bgmbooleanWhether this task invocation used background music
off_peakbooleanWhether this task invocation used off-peak mode
creationsarrayGeneration results
idstringGeneration ID, used to identify different generated results
urlstringGeneration URL, valid for 24 hours
cover_urlstringGeneration cover image, valid for 24 hours
watermarked_urlstringWatermarked generation URL, valid for 24 hours