Chuyển đến nội dung chính
POST
/
v1
/
videos
Create a Veo video job
curl --request POST \
  --url https://api.cometapi.com/v1/videos \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: multipart/form-data' \
  --form 'prompt=A paper kite floats above a field.' \
  --form input_reference='@example-file'
{
  "created_at": 1773297229,
  "id": "task_pa9CKKtYlTdxO7IIHOKKhXfjxEu4EQoR",
  "model": "veo_3_1-4K",
  "object": "video",
  "progress": 0,
  "seconds": "",
  "size": "16x9",
  "status": "queued"
}
Sử dụng trang này để bắt đầu một tác vụ Veo thông qua route dùng chung /v1/videos của CometAPI. Hãy chọn một alias Veo hiện tại từ trang Models khi thiết lập model.

Chọn mẫu request

  • Text-to-video: không gửi tệp input_reference
  • Image-to-video: gửi một input_reference
  • Hướng dẫn first-frame và last-frame: gửi hai tệp input_reference theo đúng thứ tự

Luồng task

1

Gửi tác vụ Veo

Gửi alias Veo, prompt và các input hình ảnh tùy chọn, sau đó lưu id được trả về.
2

Poll endpoint video dùng chung

Sử dụng Veo3 Retrieve để theo dõi task bất đồng bộ cho đến khi nó đạt trạng thái kết thúc.
3

Lưu trữ kết quả

Chuyển asset đã hoàn tất vào hệ thống lưu trữ riêng của bạn nếu ứng dụng của bạn cần một bản sao bền vững.

Phân giải alias

Google tài liệu hóa Veo thông qua các video operation chạy dài hạn của Gemini và sử dụng các tên model như veo-3.1-generate-preview. CometAPI giữ nguyên route dùng chung /v1/videos và phân giải một alias Veo hiện tại từ trang Models tại thời điểm request. Trong quá trình kiểm thử thực tế vào ngày 2026-03-12, một request với veo3-fast đã được chấp nhận và trả về một task id bất đồng bộ, và model trong response được phân giải thành provider model id thay vì lặp lại alias đã gửi.

Ủy quyền

Authorization
string
header
bắt buộc

Bearer token authentication. Use your CometAPI key.

Nội dung

multipart/form-data
prompt
string
bắt buộc

Text prompt for the video job.

Ví dụ:

"A paper kite floats above a field."

model
string
mặc định:veo3-fast

CometAPI Veo alias. Use a current Veo alias from the Models page. The response may resolve this alias to a provider model id.

Ví dụ:

"veo3-fast"

size
string

Orientation hint used by the wrapper. Use a landscape-like value such as 16x9 or a portrait-like value such as 9x16.

Ví dụ:

"16x9"

input_reference
file

Optional image input. Send one file for image-to-video or two ordered files for first-frame and last-frame guidance.

Phản hồi

200 - application/json

Task accepted.

created_at
integer
bắt buộc
id
string
bắt buộc
model
string
bắt buộc

Provider model identifier resolved by CometAPI for this task.

object
string
bắt buộc
progress
integer
bắt buộc
seconds
string
bắt buộc
size
string
bắt buộc
status
string
bắt buộc