Skip to main content
POST
使用此端点可调用由 CometAPI 提供的兼容 O1 的 Kling Omni 工作流,包括文生视频和首帧图片参考生成。
有关完整的提供商参数参考,请参阅 Kling Omni 视频文档

选择输入模式

  • 文生视频:发送 promptmodeaspect_ratioduration
  • 首帧图片参考:添加包含 image_urltype: first_frameimage_list 项,然后在 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 的文生视频请求可渲染为全高清 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.