Tạo video Omni
Tạo một tác vụ video Omni beta thông qua CometAPI với POST /v1/videos, sau đó thăm dò tác vụ và tải xuống tệp MP4 đã hoàn tất.
id được trả về và thăm dò tác vụ cho đến khi nó đạt trạng thái kết thúc.
Beta
POST /v1/videos sử dụng multipart/form-data; truyền các tham số điều khiển dạng scalar dưới dạng form field.
Chọn một chế độ đầu vào
model=omni-fast cho trang này.
Đặt thời lượng, tỷ lệ và độ phân giải
Omni được đánh dấu beta vì độ ổn định khi tạo có thể thay đổi tùy theo đầu vào và route được chọn. Hãy giữ yêu cầu đầu tiên ở mức nhỏ, sau đó kiểm tra video đã hoàn tất trước khi dựa vào một thời lượng render hoặc kích thước khung hình cụ thể.aspect_ratio và resolution là các tùy chọn ưu tiên khi tạo và xác minh tệp MP4 đã tải xuống trước khi phụ thuộc vào số pixel cuối cùng.
Luồng tác vụ
Tạo tác vụ
id được trả về.Thăm dò tác vụ
status là completed hoặc failed.Tải xuống kết quả
completed, hãy gọi Truy xuất nội dung video Omni để tải xuống tệp MP4.Ủy quyền
Bearer authentication. Use your CometAPI API key.
Nội dung
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"
Phản hồi
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.