Langsung ke konten utama
POST
Gunakan endpoint ini untuk membuat tugas video Vidu. Model Vidu Q3 membuat tugas text-to-video dan image-to-video. viduq4-preview membuat tugas image-to-video dan reference-to-video. API segera mengembalikan ID tugas, jadi simpan id yang dikembalikan dan polling tugas hingga mencapai status terminal. POST /v1/videos menggunakan multipart/form-data. Kirim kontrol skalar sebagai field formulir dan gambar referensi sebagai field input_reference.

Pilih mode input

viduq4-preview memilih mode dari permintaan. Satu gambar referensi tanpa audio referensi membuat tugas image-to-video. Dua atau lebih gambar referensi, atau satu gambar referensi dengan reference_audios, membuat tugas reference-to-video. Untuk memastikan bahwa viduq3 atau viduq3-turbo tersedia untuk API key Anda, gunakan Daftar model yang tersedia.

Gunakan gambar referensi

Untuk Q3 image-to-video, unggah satu gambar referensi melalui field multipart input_reference. Ukuran file dapat mencapai 20 MB. Gambar tersebut memandu komposisi dan tampilan video yang dihasilkan. Gunakan Prompt untuk menjelaskan gerakan, perilaku kamera, dan detail yang harus dipertahankan video. Untuk viduq4-preview image-to-video, kirim satu gambar sebagai file yang diunggah atau sebagai URL HTTPS yang dapat diakses publik dalam input_reference. Video dimulai dari gambar ini dan mempertahankan rasio aspeknya. Untuk viduq4-preview reference-to-video, kirim 2–12 URL gambar HTTPS yang dapat diakses publik. Ulangi input_reference satu kali untuk setiap gambar, dan kirim setiap URL dalam field terpisah. Gunakan gambar PNG, JPEG, atau WEBP. Dalam Prompt, rujuk gambar referensi berdasarkan urutannya dalam permintaan: @1 adalah gambar input_reference pertama, @2 adalah gambar kedua, dan seterusnya. Contoh: The pink car from @1 drives across the snowy hill from @2.

Tambahkan audio referensi

Untuk viduq4-preview reference-to-video, reference_audios menambahkan referensi suara. Kirim hingga 3 URL HTTPS yang dapat diakses publik untuk klip MP3, masing-masing berdurasi 3–12 detik, dan ulangi reference_audios satu kali untuk setiap klip. Kirim setidaknya satu gambar input_reference dalam permintaan yang sama.

Atur durasi dan ukuran

Untuk model Q3, atur size ke salah satu nilai WxH di bawah ini. Untuk viduq4-preview, atur size ke salah satu nilai WxH di bawah ini. Untuk reference-to-video, size menentukan bentuk frame. Untuk image-to-video, output mempertahankan rasio aspek gambar input. viduq4-preview video menyertakan trek audio yang dihasilkan.

Alur tugas

1

Buat tugas

Kirim permintaan formulir multipart dan simpan id yang dikembalikan.
2

Polling tugas

Panggil Mengambil video Vidu hingga status bernilai completed, failed, atau error.
3

Unduh hasil

Ketika tugas berstatus completed, panggil Mengambil konten video Vidu untuk mengunduh file MP4.

Otorisasi

Authorization
string
header
wajib

Bearer authentication. Use your CometAPI API key.

Body

multipart/form-data
model
string
wajib

Vidu model ID for this route: viduq3 or viduq3-turbo for text-to-video and image-to-video, or viduq4-preview for image-to-video and reference-to-video. Choose an available model from the Models page.

Contoh:

"viduq3-turbo"

prompt
string
wajib

Text prompt that describes the video to generate. For image-to-video, describe the motion and camera behavior that should animate the reference image. For viduq4-preview reference-to-video, refer to reference images as @1, @2, and so on, in the order of the input_reference fields. Up to 5000 characters for viduq4-preview.

Contoh:

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

seconds
string

Requested clip duration in seconds, sent as an integer string. Use 1 through 16 for viduq3 and viduq3-turbo, or 3 through 16 for viduq4-preview. Default is 5.

Contoh:

"1"

size
string

Output size as WxH. Supported WxH size values for viduq3 and viduq3-turbo: 960x528, 1280x720, 1920x1080. Supported WxH size values for viduq4-preview: 1280x720, 720x1280, 960x960, 1104x816, 816x1104. Default is 1280x720. For viduq4-preview reference-to-video, size sets the frame shape. For viduq4-preview image-to-video, the output keeps the aspect ratio of the input image.

input_reference

Reference images. For Q3 image-to-video, upload one image file up to 20 MB. For viduq4-preview image-to-video, send one image file or one publicly accessible HTTPS image URL. For viduq4-preview reference-to-video, send 2-12 publicly accessible HTTPS image URLs by repeating input_reference once per image. Use PNG, JPEG, or WEBP images. Omit this field for text-to-video.

reference_audios

Voice references for viduq4-preview reference-to-video. Send up to 3 publicly accessible HTTPS URLs of MP3 clips, each 3-12 seconds long, by repeating reference_audios once per clip. Send at least one input_reference image in the same request.

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, such as viduq3-turbo or viduq4-preview.

Contoh:

"viduq3-turbo"

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 27 Oktober 2026