Skip to main content
POST
cURL
使用此端點來啟動 Veo 3.1 影片任務。API 會立即回傳任務 ID,因此請儲存回傳的 id,並輪詢任務直到其達到終止狀態。 POST /v1/videos 使用 multipart/form-data;將純量控制項作為表單欄位傳入,並將媒體輸入作為 input_reference 檔案欄位傳入。

選擇模型

選擇輸入模式

設定時長與尺寸

對於 OpenAI 相容路由,使用 seconds 表示時長,並使用 size 表示輸出尺寸。請將值作為表單欄位傳送。 size 設定為下列其中一個 WxH 值。

任務流程

1

建立任務

傳送 multipart 表單請求,並儲存回傳的 id
2

輪詢任務

使用 Veo3 Retrieve,直到 statuscompletedfailederror
3

下載結果

當任務為 completed 時,從已完成任務的回應中下載 MP4 檔案。

授權

Authorization
string
header
必填

Bearer authentication. Use your CometAPI API key.

主體

multipart/form-data
model
enum<string>
必填

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

可用選項:
veo3.1-fast,
veo3.1
範例:

"veo3.1-fast"

prompt
string
必填

Text prompt for the video job.

範例:

"A paper kite floats above a field."

seconds
enum<string>
預設值:4

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

可用選項:
4,
6,
8
範例:

"4"

size
string

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

範例:

"1280x720"

input_reference
file

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

回應

Task created. Store the returned id and poll GET /v1/videos/{task_id}.

id
string
必填

Task ID. Use this value with retrieve and content endpoints.

範例:

"task_example"

object
string
必填

Object type. Video tasks return video.

範例:

"video"

model
string
必填

Model ID used for the task.

範例:

"veo3.1-fast"

status
enum<string>
必填

Task lifecycle status. Poll until the value is completed, failed, or error.

可用選項:
queued,
in_progress,
completed,
failed,
error
範例:

"queued"

progress
integer
必填

Task progress as a coarse percentage.

必填範圍: 0 <= x <= 100
範例:

0

created_at
integer
必填

Task creation time as a Unix timestamp in seconds.

範例:

1779938152

task_id
string

Compatibility alias for id when present.

範例:

"task_example"

completed_at
integer

Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.

範例:

1779938219

video_url
string

Temporary video delivery URL. This field appears on completed tasks.

範例:

"<temporary-video-url>"

error
object

Failure details. This field appears when the task fails.