跳轉到主要內容
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"
}
使用此頁面透過共用的 CometAPI /v1/videos 路由啟動 Veo 任務。設定 model 時,請從模型頁面選擇目前可用的 Veo 別名。

選擇請求模式

  • 文字轉影片:不要傳送 input_reference 檔案
  • 圖片轉影片:傳送一個 input_reference
  • 首幀與末幀引導:依序傳送兩個 input_reference 檔案

任務流程

1

提交 Veo 任務

傳送 Veo 別名、prompt,以及可選的圖片輸入,然後保存回傳的 id
2

輪詢共用影片端點

使用 Veo3 Retrieve 持續追蹤非同步任務,直到其進入最終狀態。
3

保存結果

如果你的應用程式需要可持久保存的副本,請將完成的資產移動到你自己的儲存空間。

別名解析

Google 透過 Gemini 的長時間執行影片操作來說明 Veo,並使用像是 veo-3.1-generate-preview 這類 model 名稱。CometAPI 保留共用的 /v1/videos 路由,並在請求時從模型頁面解析目前可用的 Veo 別名。在 2026-03-12 的實際驗證期間,使用 veo3-fast 的請求已被接受並回傳非同步任務 id,而回應中的 model 解析為供應商 model id,而不是直接回傳提交的別名。

授權

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

主體

multipart/form-data
prompt
string
必填

Text prompt for the video job.

範例:

"A paper kite floats above a field."

model
string
預設值: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.

範例:

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

範例:

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

回應

200 - application/json

Task accepted.

created_at
integer
必填
id
string
必填
model
string
必填

Provider model identifier resolved by CometAPI for this task.

object
string
必填
progress
integer
必填
seconds
string
必填
size
string
必填
status
string
必填