Skip to main content
POST
cURL
使用這個 beta 端點來建立 Omni 影片任務。API 會立即回傳任務 ID,因此請儲存回傳的 id,並持續輪詢任務直到其到達最終狀態。 Beta POST /v1/videos 使用 multipart/form-data;請將純量控制項作為表單欄位傳入。

選擇輸入模式

本頁請使用 model=omni-fast

設定時長、比例與解析度

Omni 被標示為 beta,因為生成穩定性可能會因輸入內容與所選路由而有所差異。請先讓第一次請求保持精簡,再檢查完成的影片,之後再決定是否依賴特定的輸出時長或影格尺寸。 由於此端點為 beta,請將 aspect_ratioresolution 視為生成偏好設定,並在依賴最終像素前先驗證下載的 MP4。

任務流程

1

建立任務

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

輪詢任務

呼叫擷取 Omni 影片,直到 statuscompletedfailed
3

下載結果

當任務為 completed 時,呼叫擷取 Omni 影片內容以下載 MP4 檔案。

授權

Authorization
string
header
必填

Bearer authentication. Use your CometAPI API key.

主體

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

Omni model ID for this endpoint. Use omni-fast for text-to-video.

可用選項:
omni-fast
範例:

"omni-fast"

prompt
string
必填

Text prompt that describes the video to generate.

範例:

"Ocean waves rolling onto a sandy beach at golden hour"

seconds
string
預設值:4

Requested clip duration in seconds. Start with 4 while this endpoint is beta.

範例:

"4"

aspect_ratio
enum<string>
預設值:16:9

Output aspect ratio preference. 16:9 and 9:16 are the most predictable; 1:1 can be accepted but may render as landscape.

可用選項:
16:9,
9:16,
1:1
範例:

"16:9"

resolution
string

Output resolution preference. Start with 720p. 1080p can be accepted but current production output may normalize to 720p.

範例:

"720p"

回應

200 - application/json

Task accepted. 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.

範例:

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