Create Task
POST
/ent/v2/text2videoVidu Q Video Models
Authorizationstring*Replace {your api key} with your token
Token {your api key}modelstring*Model name. Accepted values: viduq2
promptstring*Text promptA textual description for video generation.Note: Maximum length is 5000 characters
Authorizationstring*Replace {your api key} with your token
Token {your api key}idstring*Task ID, returned by the Create Task API upon success
durationintegerVideo duration parameter. Default values depend on the model:
seedintegerRandom seed
When not passed or set to 0, a random number will be used instead
Manually set values will be used as the seed
aspect_ratiostringAspect ratio
Default: 16:9. Accepted values: 16:9, 9:16, 3:4, 4:3, 1:1
resolutionstringResolution parameter. Default values depend on the model and video duration:
audiobooleanWhether to use the direct audio-video output capability. Default: true. Accepted values:
payloadstringPassthrough parameter
No processing, only for data transmission
Note: Maximum 1,048,576 characters
off_peakbooleanOff-peak mode. Default: false. Accepted values:
callback_urlstringCallback protocol
You need to actively set callback_url when creating a task. The request method is POST. When the video generation task has a status change, Vidu will send a callback request containing the latest task status to this address. The callback request content structure is consistent with the response body of the Get Creation API
The status returned by the callback includes the following states:
application/jsonResponse fields
idstringTask ID
statestringProcessing status
Accepted values:
created: Task created successfully
queueing: Task in queue
processing: Task is being processed
success: Task succeeded
failed: Task failed
err_codestringError code. See Error Code Table for details
creditsintegerNumber of credits consumed by this task. Unit: credits
application/jsonResponse fields
task_idstringTask ID generated by Vidu
statestringProcessing status
Accepted values:
created: Task created successfully
queueing: Task in queue
processing: Task is being processed
success: Task succeeded
failed: Task failed
modelstringModel name used for this call
promptstringPrompt parameter used for this call
payloadstringPassthrough parameter passed during this task call
bgmbooleanWhether BGM was used in this task call
off_peakbooleanWhether off-peak mode was used in this task call
creationsarrayGenerated results
idstringCreation ID, used to identify different creations
urlstringCreation URL, valid for 24 hours
cover_urlstringCreation cover URL, valid for 24 hours
watermarked_urlstringdurationintegerVideo duration parameter used for this call
seedintegerRandom seed parameter used for this call
aspect_ratiostringAspect ratio parameter used for this call
resolutionstringResolution parameter used for this call
bgmbooleanBackground music parameter used for this call
payloadstringPassthrough parameter passed in this call
off_peakbooleanWhether off-peak mode was used in this call
creditsintegerNumber of credits used for this call
created_atstringTask creation time
Watermarked creation URL, valid for 24 hours
curl --request POST \
--url 'https://api.vidu.com/ent/v2/text2video' \
--header 'Authorization: Token {your api key}' \
--header 'Content-Type: application/json' \
--data '{
"model": "viduq2",
"prompt": "In an ultra-realistic fashion photography style featuring light blue and pale amber tones, an astronaut in a spacesuit walks through the fog. The background consists of enchanting white and golden lights, creating a minimalist still life and an impressive panoramic scene.",
"duration": 5,
"seed": 0,
"aspect_ratio": "4:3",
"resolution": "540p",
"audio": true,
"payload": "string",
"off_peak": false,
"callback_url": "string"
}'{
"task_id": "your_task_id_here",
"state": "created",
"model": "viduq2",
"prompt": "In an ultra-realistic fashion photography style featuring light blue and pale amber tones, an astronaut in a spacesuit walks through the fog. The background consists of enchanting white and golden lights, creating a minimalist still life and an impressive panoramic scene.",
"duration": 5,
"seed": random_number,
"aspect_ratio": "4:3",
"resolution": "540p",
"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"
}
]
}