Create a Vidu video
Create a Vidu Q3 or Q4 video task through CometAPI with POST /v1/videos. Use Q3 for text-to-video or image-to-video, and Q4 for image-to-video or reference-to-video. Then poll the task and download the completed MP4 file.
curl https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
-F model=viduq3-turbo \
-F 'prompt=An astronaut walks through soft blue fog with a slow cinematic camera move.' \
-F seconds=1{
"id": "task_example",
"task_id": "task_example",
"object": "video",
"model": "viduq3-turbo",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}viduq4-preview creates image-to-video and reference-to-video tasks. The API returns a task ID immediately, so store the returned id and poll the task until it reaches a terminal status.
POST /v1/videos uses multipart/form-data. Send scalar controls as form fields and reference images as input_reference fields.
Choose an input mode
| Goal | Model ID | Required fields | Optional fields |
|---|---|---|---|
| Text-to-video | viduq3, viduq3-turbo | model, prompt | seconds, size |
| Image-to-video | viduq3, viduq3-turbo | model, prompt, one input_reference file | seconds, size |
| Image-to-video | viduq4-preview | model, prompt, one input_reference file or HTTPS image URL | seconds, size |
| Reference-to-video | viduq4-preview | model, prompt, 2–12 input_reference HTTPS image URLs | seconds, size, reference_audios |
viduq4-preview selects the mode from the request. One reference image without reference audio creates an image-to-video task. Two or more reference images, or one reference image with reference_audios, create a reference-to-video task.
To confirm that viduq3 or viduq3-turbo is available to your API key, use List available models.
Use reference images
For Q3 image-to-video, upload one reference image through theinput_reference multipart field. The file can be up to 20 MB.
The image guides the composition and appearance of the generated video. Use the prompt to describe motion, camera behavior, and details that the video should preserve.
For viduq4-preview image-to-video, send one image as an uploaded file or as a publicly accessible HTTPS URL in input_reference. The video starts from this image and keeps its aspect ratio.
For viduq4-preview reference-to-video, send 2–12 publicly accessible HTTPS image URLs. Repeat input_reference once per image, and send each URL in its own field. Use PNG, JPEG, or WEBP images.
In the prompt, refer to reference images by their order in the request: @1 is the first input_reference image, @2 is the second, and so on. For example: The pink car from @1 drives across the snowy hill from @2.
Add reference audio
Forviduq4-preview reference-to-video, reference_audios adds voice references. Send up to 3 publicly accessible HTTPS URLs of MP3 clips, each 3–12 seconds long, and repeat reference_audios once per clip. Send at least one input_reference image in the same request.
Set duration and size
| Model ID | seconds | Default |
|---|---|---|
viduq3-turbo | integer 1-16 | 5 seconds, 1280x720 |
viduq3 | integer 1-16 | 5 seconds, 1280x720 |
viduq4-preview | integer 3-16 | 5 seconds, 1280x720 |
size to one of the WxH values below.
| Resolution tier | Aspect ratio | size (WxH) |
|---|---|---|
540p | 16:9 | 960x528 |
720p | 16:9 | 1280x720 |
1080p | 16:9 | 1920x1080 |
viduq4-preview, set size to one of the WxH values below. For reference-to-video, size sets the frame shape. For image-to-video, the output keeps the aspect ratio of the input image.
| Resolution tier | Aspect ratio | size (WxH) |
|---|---|---|
720p | 16:9 (default) | 1280x720 |
720p | 9:16 | 720x1280 |
720p | 1:1 | 960x960 |
720p | 4:3 | 1104x816 |
720p | 3:4 | 816x1104 |
viduq4-preview videos include a generated audio track.
Task flow
Create the task
id.Poll the task
status is completed, failed, or error.Download the result
completed, call Retrieve Vidu video content to download the MP4 file.Body
Text prompt that describes the video to generate. For image-to-video, describe the motion and camera behavior that should animate the reference image. For viduq4-preview reference-to-video, refer to reference images as @1, @2, and so on, in the order of the input_reference fields. Up to 5000 characters for viduq4-preview.
"An astronaut walks through soft blue fog with a slow cinematic camera move."
Output size as WxH. Supported WxH size values for viduq3 and viduq3-turbo: 960x528, 1280x720, 1920x1080. Supported WxH size values for viduq4-preview: 1280x720, 720x1280, 960x960, 1104x816, 816x1104. Default is 1280x720. For viduq4-preview reference-to-video, size sets the frame shape. For viduq4-preview image-to-video, the output keeps the aspect ratio of the input image.
Reference images. For Q3 image-to-video, upload one image file up to 20 MB. For viduq4-preview image-to-video, send one image file or one publicly accessible HTTPS image URL. For viduq4-preview reference-to-video, send 2-12 publicly accessible HTTPS image URLs by repeating input_reference once per image. Use PNG, JPEG, or WEBP images. Omit this field for text-to-video.
Voice references for viduq4-preview reference-to-video. Send up to 3 publicly accessible HTTPS URLs of MP3 clips, each 3-12 seconds long, by repeating reference_audios once per clip. Send at least one input_reference image in the same request.
^https://Response
Task created. Store the returned id and poll GET /v1/videos/{task_id}.
curl https://api.cometapi.com/v1/videos \
-H "Authorization: Bearer $COMETAPI_KEY" \
-F model=viduq3-turbo \
-F 'prompt=An astronaut walks through soft blue fog with a slow cinematic camera move.' \
-F seconds=1{
"id": "task_example",
"task_id": "task_example",
"object": "video",
"model": "viduq3-turbo",
"status": "queued",
"progress": 0,
"created_at": 1779938152
}