建立 Omni 影片
透過 CometAPI 使用 POST /v1/videos 建立 beta 版 Omni 影片任務,接著輪詢任務並下載完成的 MP4 檔案。
id,並持續輪詢任務直到其到達最終狀態。
Beta
POST /v1/videos 使用 multipart/form-data;請將純量控制項作為表單欄位傳入。
選擇輸入模式
model=omni-fast。
設定時長、比例與解析度
Omni 被標示為 beta,因為生成穩定性可能會因輸入內容與所選路由而有所差異。請先讓第一次請求保持精簡,再檢查完成的影片,之後再決定是否依賴特定的輸出時長或影格尺寸。aspect_ratio 與 resolution 視為生成偏好設定,並在依賴最終像素前先驗證下載的 MP4。
任務流程
建立任務
id。輪詢任務
status 為 completed 或 failed。下載結果
completed 時,呼叫擷取 Omni 影片內容以下載 MP4 檔案。授權
Bearer authentication. Use your CometAPI API key.
主體
Omni model ID for this endpoint. Use omni-fast for text-to-video.
omni-fast "omni-fast"
Text prompt that describes the video to generate.
"Ocean waves rolling onto a sandy beach at golden hour"
Requested clip duration in seconds. Start with 4 while this endpoint is beta.
"4"
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"
Output resolution preference. Start with 720p. 1080p can be accepted but current production output may normalize to 720p.
"720p"
回應
Task accepted. Store the returned id and poll GET /v1/videos/{task_id}.
Task ID. Use this value with retrieve and content endpoints.
"task_example"
Object type. Video tasks return video.
"video"
Model ID used for the task.
"omni-fast"
Task lifecycle status. Poll until the value is completed, failed, or error.
queued, in_progress, completed, failed, error "queued"
Task progress as a coarse percentage.
0 <= x <= 1000
Task creation time as a Unix timestamp in seconds.
1779938152
Compatibility alias for id when present.
"task_example"
Task completion time as a Unix timestamp in seconds. This field appears on completed tasks.
1779938219
Temporary video delivery URL. This field appears on completed tasks.
"<temporary-video-url>"
Failure details. This field appears when the task fails.