Skip to main content
GET
cURL
Gunakan endpoint ini setelah Anda membuat task video Wan. Endpoint ini mengembalikan status task dan menyertakan video_url setelah task selesai.

Periksa field berikut

  • status memberi tahu apakah task berstatus queued, in_progress, completed, failed, atau error.
  • progress adalah persentase penyelesaian secara kasar.
  • video_url muncul pada respons yang sudah selesai.
  • error muncul saat task gagal.

Alur polling

1

Buat task terlebih dahulu

Mulai dengan Create a Wan video dan simpan id yang dikembalikan.
2

Poll berdasarkan task ID

Kirim task ID ke endpoint ini sampai status mencapai completed, failed, atau error.
3

Unduh file MP4

Ketika status adalah completed, panggil Retrieve Wan video content.

Otorisasi

Authorization
string
header
wajib

Bearer authentication. Use your CometAPI API key.

Parameter Path

task_id
string
wajib

Task ID returned by POST /v1/videos.

Respons

Current Wan video task state.

id
string
wajib

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

Contoh:

"task_example"

object
string
wajib

Object type. Wan video tasks return video.

Contoh:

"video"

model
string
wajib

Model ID used for the task.

Contoh:

"wan2.6"

status
enum<string>
wajib

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

Opsi yang tersedia:
queued,
in_progress,
completed,
failed,
error
Contoh:

"queued"

progress
integer
wajib

Task progress as a coarse percentage.

Rentang yang diperlukan: 0 <= x <= 100
Contoh:

0

created_at
integer
wajib

Task creation time as a Unix timestamp in seconds.

Contoh:

1779938152

task_id
string

Compatibility alias for id. The value matches id when present.

Contoh:

"task_example"

completed_at
integer

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

Contoh:

1779938219

video_url
string

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

Contoh:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.