Skip to main content
POST
cURL
Gunakan endpoint ini untuk memulai task video Veo 3.1. API segera mengembalikan task ID, jadi simpan id yang dikembalikan dan lakukan polling pada task hingga mencapai status terminal. POST /v1/videos menggunakan multipart/form-data; kirim kontrol skalar sebagai form field dan input media sebagai file field input_reference.

Pilih model

Pilih mode input

Atur durasi dan ukuran

Untuk rute yang kompatibel dengan OpenAI, gunakan seconds untuk durasi dan size untuk ukuran output. Kirim nilainya sebagai form field. Atur size ke salah satu nilai WxH di bawah ini.

Alur task

1

Buat task

Kirim permintaan formulir multipart dan simpan id yang dikembalikan.
2

Polling task

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

Unduh hasil

Saat task berstatus completed, unduh file MP4 dari respons task yang telah 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<string>
default:4

Requested clip duration. Use 4, 6, or 8. Send the value as a form field string.

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

Optional first-frame image file for image-to-video.

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.