Skip to main content
POST
Sử dụng endpoint này để tạo tác vụ text-to-video hoặc image-to-video Vidu Q3. API ngay lập tức trả về ID tác vụ, vì vậy hãy lưu id được trả về và thăm dò tác vụ cho đến khi tác vụ đạt trạng thái kết thúc. POST /v1/videos sử dụng multipart/form-data. Gửi các tham số vô hướng dưới dạng trường biểu mẫu và tham chiếu hình ảnh dưới dạng trường tệp input_reference.

Chọn chế độ đầu vào

Để xác nhận model ID Vidu khả dụng với API key của bạn, hãy sử dụng Liệt kê các model khả dụng.

Sử dụng hình ảnh tham chiếu

Đối với image-to-video, hãy tải lên một hình ảnh tham chiếu thông qua trường multipart input_reference. Tệp có thể có kích thước tối đa 20 MB. Hình ảnh định hướng bố cục và diện mạo của video được tạo. Sử dụng Prompt để mô tả chuyển động, hành vi của camera và các chi tiết mà video cần giữ lại.

Thiết lập thời lượng và kích thước

Đặt size thành một trong các giá trị WxH dưới đây.

Quy trình tác vụ

1

Tạo tác vụ

Gửi yêu cầu biểu mẫu multipart và lưu id được trả về.
2

Thăm dò tác vụ

Gọi Truy xuất video Vidu cho đến khi statuscompleted, failed hoặc error.
3

Tải xuống kết quả

Khi tác vụ ở trạng thái completed, hãy gọi Truy xuất nội dung video Vidu để tải xuống tệp MP4.

Ủy quyền

Authorization
string
header
bắt buộc

Bearer authentication. Use your CometAPI API key.

Nội dung

multipart/form-data
model
string
bắt buộc

Vidu Q3 model ID for this route. Choose an available model from the Models page.

Ví dụ:

"viduq3-turbo"

prompt
string
bắt buộc

Text prompt that describes the video to generate. For image-to-video, describe the motion and camera behavior that should animate the reference image.

Ví dụ:

"An astronaut walks through soft blue fog with a slow cinematic camera move."

seconds
string

Requested clip duration in seconds. Use an integer from 1 through 16. Default is 5.

Ví dụ:

"1"

size
string

Supported WxH size values: 960x528, 1280x720, 1920x1080. Default is 1280x720.

input_reference
file

One reference image file for image-to-video. Omit this field for text-to-video. The file can be up to 20 MB. The image guides the composition and appearance of the generated video.

Phản hồi

Task created. Store the returned id and poll GET /v1/videos/{task_id}.

id
string
bắt buộc

Task ID. Use this value with retrieve and content endpoints.

Ví dụ:

"task_example"

object
string
bắt buộc

Object type. Video tasks return video.

Ví dụ:

"video"

model
string
bắt buộc

Model ID used for the task.

Ví dụ:

"viduq3-turbo"

status
enum<string>
bắt buộc

Task lifecycle status. Poll until the value is completed, failed, or error.

Tùy chọn có sẵn:
queued,
in_progress,
completed,
failed,
error
Ví dụ:

"queued"

progress
integer
bắt buộc

Task progress as a coarse percentage.

Phạm vi bắt buộc: 0 <= x <= 100
Ví dụ:

0

created_at
integer
bắt buộc

Task creation time as a Unix timestamp in seconds.

Ví dụ:

1779938152

task_id
string

Compatibility alias for id when present.

Ví dụ:

"task_example"

completed_at
integer

Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.

Ví dụ:

1779938219

video_url
string

Temporary video delivery URL. This field appears on completed tasks.

Ví dụ:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.

Lần sửa đổi cuối 12 tháng 8, 2026