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: viduq1
promptstring*Authorizationstring*Replace {your api key} with your token
Token {your api key}idstring*idstring*Task ID, returned by the Create Task API upon success
Text prompt
A textual description for video generation.
Note: Maximum length is 5000 characters
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:
watermarkbooleanWhether to add a watermark
watermarked_url parameter. For details, see Get Creation APIwm_positionintegerWatermark position, indicating where the watermark appears on the image. Accepted values:
1: Bottom right
2: Bottom left
3: Top right
4: Top left
Default: 1
wm_urlstringWatermark content, which is an image URL
If not provided, the default watermark is used: content generated by AI
meta_datastringMetadata identifier, a JSON-formatted string and passthrough field. You can customize the format or use the example format below:
{
"Label": "your_label","ContentProducer": "your_content_producer","ContentPropagator": "your_content_propagator","ProduceID": "your_product_id", "PropagateID": "your_propagate_id","ReservedCode1": "your_reserved_code1", "ReservedCode2": "your_reserved_code2"
}
When this parameter is empty, the metadata identifier generated by Vidu is used by default
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
movement_amplitudestringCamera movement amplitude 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
watermarkbooleanWhether watermark was used for this submitted task
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": "viduq1",
"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,
"watermark": true,
"wm_position": 0,
"wm_url": "string",
"meta_data": "string",
"callback_url": "string"
}'{
"task_id": "your_task_id_here",
"state": "created",
"model": "viduq1",
"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",
"movement_amplitude": "auto",
"payload":"",
"off_peak": false,
"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}' \
--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"
}
]
}