Skip to main content
POST
使用此端點來操作由 CometAPI 提供的相容於 O1 的 Kling Omni 工作流程,包括文字轉影片與引用首幀圖片的生成。
如需完整的供應商參數參考,請參閱 Kling Omni Video 文件

選擇輸入模式

  • 文字轉影片:傳送 promptmodeaspect_ratioduration
  • 首幀圖片引用:加入 image_list 項目,包含 image_urltype: first_frame,然後在 prompt 中以 <<<image_1>>> 引用該圖片
  • 浮水印輸出:當你需要在查詢回應中取得帶有浮水印的影片 URL 時,加入 watermark_info.enabled: true
  • Model ID:省略 model_name 以使用路由預設值,或傳送經測試可用的 Omni Video model ID,例如 kling-video-o1kling-v3-omni

時長與長寬比

Kling Omni 不提供精確的 size 欄位。請將 aspect_ratio 視為畫面形狀需求;16:9 的文字轉影片請求可渲染為 full-HD 1920x1080

任務流程

1

建立 Omni 任務

提交請求並儲存回傳的 task_id
2

輪詢 Omni 任務

持續使用 取得 Kling Omni 影片,直到任務完成。
3

保存完成的影片

如果你需要持久存取,請將回傳的 MP4 URL 移至你自己的儲存空間。

授權

Authorization
string
header
必填

Bearer token authentication. Use your CometAPI key.

標頭

Content-Type
string

Content type of the request body.

主體

application/json
prompt
string
必填

Text prompt describing the desired video. Maximum length is 2,500 characters. When you send image_list, reference the image with <<<image_1>>>.

model_name
string

Optional model ID for this Kling Omni video request. Omit this field to use the route default.

image_list
object[]

Optional first-frame image reference for image-referenced Omni generation.

sound
enum<string>
預設值:off

Whether to generate audio with the video. Use on or off.

可用選項:
on,
off
mode
enum<string>

Generation mode. Use std for standard generation or pro when the selected model supports the higher-quality mode.

可用選項:
std,
pro
aspect_ratio
enum<string>

Aspect ratio request for beta Kling Omni generation. The endpoint does not expose an exact size field; a 16:9 text-to-video request can render as 1920x1080.

可用選項:
16:9,
9:16,
1:1
duration
enum<string>
預設值:5

Requested output length for text-to-video and first-frame image-reference workflows. Use 5 or 10 as a string.

可用選項:
5,
10
watermark_info
object

Watermark options. When enabled is true, the task can return watermarked result URLs in addition to original result URLs.

callback_url
string<uri>

Webhook URL for task status notifications. The server sends a callback when the task status changes.

external_task_id
string

Optional user-defined task ID for your own tracking. Does not replace the system-generated task ID. Must be unique per account.

回應

200 - application/json

Success

code
integer
必填

Response code. 0 means the task request was accepted.

message
string
必填

Response message.

data
object
必填
request_id
string

Request identifier returned by CometAPI when present.