Skip to main content
POST
cURL
Sử dụng endpoint này để tạo một tác vụ text-to-video Vidu Q3. API trả về một task ID ngay lập tức, vì vậy hãy lưu id được trả về và poll tác vụ cho đến khi nó đạt trạng thái kết thúc. POST /v1/videos sử dụng multipart/form-data; truyền các điều khiển scalar dưới dạng các trường form.

Chọn model

Đặt thời lượng và kích thước

Đặt size thành một trong các giá trị WxH bên dưới.

Luồng tác vụ

1

Tạo tác vụ

Gửi request form multipart và lưu id được trả về.
2

Poll 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, 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
enum<string>
bắt buộc

Vidu Q3 model ID for this endpoint.

Tùy chọn có sẵn:
viduq3-turbo,
viduq3
Ví dụ:

"viduq3-turbo"

prompt
string
bắt buộc

Text prompt that describes the video to generate.

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: 640x352, 960x528, 1280x720, 1920x1080. Default is 1280x720.

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.