Langsung ke konten utama
POST
Buat video Veo 3.1 dari teks atau gambar. API segera mengembalikan ID tugas. Simpan id yang dikembalikan untuk melakukan polling tugas dan mengunduh video yang selesai. POST /v1/videos menggunakan multipart/form-data. Kirim kontrol sebagai field formulir dan gambar sebagai field file input_reference.

Pilih model

Pilih mode input

Untuk menganimasikan gambar, unggah satu file melalui input_reference, dengan menggunakan field tersebut sekali. Gambar menetapkan frame pembuka; prompt menjelaskan gerakan dan perilaku kamera setelahnya.

Atur durasi dan ukuran

Untuk rute yang kompatibel dengan OpenAI ini, atur durasi dengan nilai seconds bilangan bulat eksplisit dan ukuran output dengan size. Kirim kedua nilai sebagai field formulir. Atur size ke salah satu nilai WxH di bawah ini.

Alur tugas

1

Buat tugas

Kirim permintaan formulir multipart dan simpan id yang dikembalikan.
2

Polling tugas

Gunakan Veo3 Retrieve hingga status bernilai completed, failed, atau error.
3

Unduh hasil

Saat tugas berstatus completed, unduh file MP4 dari respons tugas yang selesai.

Otorisasi

Authorization
string
header
wajib

Bearer authentication. Use your CometAPI API key.

Body

multipart/form-data
model
enum<string>
wajib

Veo 3.1 model ID. Use veo3.1-fast for the default route or veo3.1 when you specifically need the standard model.

Opsi yang tersedia:
veo3.1-fast,
veo3.1
Contoh:

"veo3.1-fast"

prompt
string
wajib

Text prompt for the video job.

Contoh:

"A paper kite floats above a field."

seconds
enum<integer>
default:4

Requested clip duration in whole seconds. Send 4, 6, or 8 as a form field.

Opsi yang tersedia:
4,
6,
8
Contoh:

4

size
string

Supported WxH size values: 1280x720, 720x1280, 1920x1080, 3840x2160. Default is 1280x720.

Contoh:

"1280x720"

input_reference
file

One image file that sets the opening frame for image-to-video. Send input_reference once with one file. Use prompt to describe the motion and camera behavior that follow.

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:

"veo3.1-fast"

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 9 September 2026