Langsung ke konten utama
POST
Membuat video Wan dari teks, media referensi, atau frame pertama dan terakhir. Simpan id yang dikembalikan untuk melakukan polling tugas dan mengunduh video yang telah selesai. POST /v1/videos menggunakan multipart/form-data. Kirim nilai bilangan bulat eksplisit seconds dan size dalam bentuk WxH. wan3.0-prime menggunakan field permintaan publik, batas media, dan alur tugas yang sama seperti wan3.0. Atur model ke nilai tepat wan3.0-prime saat menargetkan Prime. Prime mendukung text-to-video, image-to-video, input frame pertama dan terakhir, serta referensi gabungan gambar, video, dan audio. Media referensi dan input frame harus dikirim dalam permintaan terpisah.

Pilih mode input

Setiap mode memerlukan model dan prompt. Input media yang tersedia bergantung pada model: Untuk menemukan ID model Wan yang tersedia untuk API key Anda, gunakan Daftarkan model yang tersedia.

Membuat video Wan 3.0 Prime

Permintaan minimal ini membuat tugas text-to-video berdurasi lima detik dengan Prime:

Menggunakan gambar referensi

Untuk wan2.7, wan3.0, dan wan3.0-prime, kirim gambar referensi melalui input_reference sebagai URL HTTPS yang dapat diakses secara publik atau file yang diunggah. Untuk beberapa gambar, ulangi field sesuai urutan gambar, dengan satu URL atau file per field. Gunakan semua URL atau semua file dalam input_reference. Kirim setiap URL secara terpisah, alih-alih menggabungkan URL menjadi nilai yang dipisahkan koma. Gunakan gambar PNG atau JPEG hingga 20 MB masing-masing. Satu URL atau file input_reference menggunakan alur kerja image-to-video. Gambar memandu komposisi dan tampilan; gunakan prompt untuk mendeskripsikan gerakan dan perilaku kamera. Untuk wan3.0 dan wan3.0-prime, kirim maksimal 10 gambar referensi melalui input_reference, baik menggunakan URL maupun file yang diunggah.

Gunakan video dan audio referensi

Kirim video melalui reference_videos dan klip audio melalui reference_audios, dengan mengulangi setiap field satu kali untuk setiap input. Setiap input dapat berupa URL HTTPS yang dapat diakses publik atau file yang diunggah. Gunakan file MP4 dengan video berencoding H.264 untuk referensi video. Gunakan file MP3 terpisah untuk referensi audio. Field yang berbeda dapat menggunakan jenis input yang berbeda, seperti URL gambar dengan video yang diunggah. Dalam reference_videos atau reference_audios, gunakan semua URL atau semua file. Anda dapat mengunggah hingga lima file video, masing-masing berukuran maksimal 50 MiB (50 × 1024 × 1024 byte). Anda dapat mengunggah hingga lima file audio, masing-masing berukuran maksimal 15 MiB (15 × 1024 × 1024 byte).

Referensi video Wan 2.6

Kirim satu hingga tiga reference_videos, masing-masing berdurasi 2–30 detik, berukuran hingga 30 MB, dan minimal 16 fps. Batas ini berlaku untuk URL dan video yang diunggah. Dalam Prompt, rujuk subjek sebagai @Video1, @Video2, dan @Video3 sesuai urutan input. Untuk mode ini, hilangkan input_reference, reference_audios, first_frame, dan last_frame. Atur seconds ke 5 atau 10. Contoh-contoh ini membuat video berdurasi lima detik dari dua referensi video. Ganti URL media atau nama file dengan input Anda:

Referensi gambar dan video Wan 2.7

Gabungkan referensi gambar dan video untuk memandu tampilan dan gerakan subjek. Atur seconds ke bilangan bulat dari 2 hingga 10. Hilangkan reference_audios. Gunakan dua URL gambar atau dua gambar yang diunggah dengan referensi video:

Referensi gambar, video, dan audio Wan 3.0

Untuk wan3.0 dan wan3.0-prime, gabungkan referensi gambar dan video dengan referensi audio untuk memandu tampilan, gerakan, dan ritme. Kirim maksimal lima referensi video dengan total durasi maksimal 15 detik. Setiap video harus minimal 16 fps. Kirim maksimal lima referensi audio dengan total durasi maksimal 15 detik. Hitung durasi video dan audio secara terpisah. Atur seconds output ke bilangan bulat dari 2 hingga 30. Gunakan dua URL gambar atau dua gambar yang diunggah dengan satu video dan dua klip audio:

Gunakan frame pertama dan terakhir

Untuk wan2.7, wan3.0, dan wan3.0-prime, kirim first_frame untuk gambar pembuka dan, secara opsional, last_frame untuk gambar penutup. Setiap bidang menerima satu URL PNG atau JPEG HTTPS yang dapat diakses publik atau satu file PNG atau JPEG yang diunggah. Untuk input frame Wan 2.7, gambar pembuka menentukan rasio aspek, sedangkan size memilih tingkat resolusi output. Kirim input frame dalam permintaan terpisah dari input_reference, reference_videos, dan reference_audios. Contoh Wan 2.7 ini membuat transisi antara frame pembuka dan penutup:
Contoh Wan 3.0 dan Wan 3.0 Prime ini membuat transisi antara frame pembuka dan penutup:

Atur durasi dan ukuran

Kirim seconds sebagai bilangan bulat dalam rentang yang ditentukan untuk model dan mode input Anda. Atur size ke salah satu nilai WxH di bawah ini untuk model target. Nilai ukuran Wan 3.0 juga berlaku untuk wan3.0-prime.

Nilai ukuran Wan 3.0

Nilai ukuran Wan 2.7

Nilai ukuran Wan 2.6

Alur tugas

1

Buat tugas

Kirim permintaan formulir multipart dan simpan id yang dikembalikan.
2

Polling tugas

Panggil Ambil video Wan hingga status bernilai completed, failed, atau error.
3

Unduh hasil

Saat tugas berstatus completed, panggil Ambil konten video Wan untuk mengunduh file MP4.

Otorisasi

Authorization
string
header
wajib

Bearer authentication. Use your CometAPI API key.

Body

multipart/form-data
model
string
wajib

Wan model ID: wan2.6, wan2.7, wan3.0, or wan3.0-prime. Wan 3.0 and Wan 3.0 Prime use the same public request fields, task flow, and media limits; use the exact model ID wan3.0-prime when targeting Prime. Use wan2.6 for text or reference-video input. Use wan2.7 for text, image/video references, or frame inputs. Wan 3.0 and Wan 3.0 Prime also support reference audio.

Contoh:

"wan3.0-prime"

prompt
string
wajib

Text prompt that describes the video to generate. Describe the appearance and motion to preserve from references, or the transition between first_frame and last_frame. For wan2.6 video references, use @Video1, @Video2, and @Video3 in input order.

Contoh:

"A small robot walks through a bright greenhouse with smooth camera movement."

seconds
integer

Requested output duration in whole seconds. Send an explicit integer. For wan2.6 reference-to-video, use 5 or 10; text-to-video also accepts 15. For wan2.7 reference-to-video, use 2 through 10; text and frame inputs accept 2 through 15. For wan3.0 and wan3.0-prime, use 2 through 30. Default is 5.

Rentang yang diperlukan: 2 <= x <= 30
Contoh:

5

size
string

Supported WxH size values. For wan3.0 and wan3.0-prime, 480p: 832x480, 480x832, 624x624, 704x528, 528x704; 720p: 1280x720, 720x1280, 960x960, 1088x832, 832x1088; 1080p: 1920x1080, 1080x1920, 1440x1440, 1632x1248, 1248x1632. For wan2.6: 1280x720, 720x1280, 1088x832, 832x1088, 1920x1080, 1080x1920, 1440x1440, 1632x1248, 1248x1632. For wan2.7: 1280x720, 720x1280, 1920x1080, 1080x1920, 1440x1440. Default is 1920x1080. For Wan 2.7 frame inputs, the opening image determines the aspect ratio; size selects the output resolution tier.

Contoh:

"1920x1080"

input_reference

PNG or JPEG reference images for wan2.7, wan3.0, and wan3.0-prime. Repeat input_reference with one publicly accessible HTTPS image URL or uploaded image file per field. Use all URLs or all files within this field. Do not combine URLs into a comma-separated value. A single URL or file uses the image-to-video workflow. Each image can be up to 20 MB. For wan3.0 and wan3.0-prime, send at most 10 reference images, whether you use URLs or uploaded files. Image and video references can share a request; reference audio requires wan3.0 or wan3.0-prime. Submit frame inputs separately. Omit for text-to-video and wan2.6 reference-to-video. Submit images in the order you want to reference them in the prompt.

Pattern: ^https://
reference_videos
(string<uri> | file)[]

Reference videos for wan2.6, wan2.7, wan3.0, and wan3.0-prime. Repeat reference_videos with publicly accessible HTTPS URLs or uploaded MP4 files with H.264 video. Use one input type within this field: all URLs or all files. For wan2.6, send 1 to 3 clips, each 2 to 30 seconds and up to 30 MB, with at least 16 fps; omit image, audio, and frame fields. For wan2.7, combine video references with image references. For wan3.0 and wan3.0-prime, send at most 5 clips totaling at most 15 seconds, with at least 16 fps. Video uploads are limited to 5 files, each at most 50 MiB (50 x 1024 x 1024 bytes); the lower wan2.6 limits still apply. Submit frame inputs separately.

Minimum array length: 1
Pattern: ^https://
reference_audios
(string<uri> | file)[]

Reference audio for wan3.0 and wan3.0-prime, combined with image or video references. Repeat reference_audios with publicly accessible HTTPS MP3 URLs or uploaded MP3 files. Use one input type within this field: all URLs or all files. Send at most 5 audio references totaling at most 15 seconds, counted separately from reference video duration. Audio uploads are limited to 5 files, each at most 15 MiB (15 x 1024 x 1024 bytes). Submit frame inputs separately. Omit for wan2.6 and wan2.7.

Minimum array length: 1
Pattern: ^https://
first_frame

Opening frame for wan2.7, wan3.0, and wan3.0-prime, as one publicly accessible HTTPS PNG or JPEG URL or one uploaded PNG or JPEG file. Use first_frame alone or add last_frame to guide the ending. Submit frame inputs in a separate request from input_reference, reference_videos, and reference_audios. Omit for wan2.6. For Wan 2.7 frame inputs, the opening image determines the aspect ratio; size selects the output resolution tier.

Pattern: ^https://
last_frame

Ending frame for wan2.7, wan3.0, and wan3.0-prime, as one publicly accessible HTTPS PNG or JPEG URL or one uploaded PNG or JPEG file. Use with first_frame to guide the ending. Submit frame inputs in a separate request from input_reference, reference_videos, and reference_audios. Omit for wan2.6. For Wan 2.7 frame inputs, the opening image determines the aspect ratio; size selects the output resolution tier.

Pattern: ^https://

Respons

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

id
string
wajib

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

Contoh:

"task_example"

object
string
wajib

Object type. Video tasks return video.

Contoh:

"video"

model
string
wajib

Model ID used for the task.

Contoh:

"wan3.0"

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 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.

Terakhir diubah pada 10 Oktober 2026