Skip to main content
GET
cURL
Sử dụng endpoint này sau khi bạn tạo một tác vụ video Vidu. Endpoint này trả về trạng thái tác vụ và bao gồm video_url sau khi tác vụ hoàn tất.

Kiểm tra các trường này

  • status cho biết liệu tác vụ đang ở trạng thái queued, in_progress, completed, failed hay error.
  • progress là phần trăm hoàn thành ở mức khái quát.
  • video_url xuất hiện trong các phản hồi đã hoàn tất.
  • error xuất hiện khi tác vụ thất bại.

Luồng polling

1

Tạo tác vụ trước

Bắt đầu với Tạo một video Vidu và lưu id được trả về.
2

Polling theo task ID

Gửi task ID tới endpoint này cho đến khi status đạt completed, failed hoặc error.
3

Tải xuống tệp MP4

Khi statuscompleted, gọi Truy xuất nội dung video Vidu.

Ủy quyền

Authorization
string
header
bắt buộc

Bearer authentication. Use your CometAPI API key.

Tham số đường dẫn

task_id
string
bắt buộc

Task ID returned by POST /v1/videos.

Phản hồi

Current Vidu video task state.

id
string
bắt buộc

Task ID. Use this value as task_id in retrieve and content requests.

Ví dụ:

"task_example"

object
string
bắt buộc

Object type. Vidu 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. The value matches 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.