1. 可灵 Kling
梧柏API使用文档
WHBAI · Kling
  • WHBAI · Google Gemini 原生 (v1alpha)
  • WHBAI · Google Gemini 原生
  • WHBAI · Ideogram
  • WHBAI · Ideogram V3
  • WHBAI · Midjourney
  • WHBAI · Jimeng
  • WHBAI · Kling
  • WHBAI · Luma
  • WHBAI · Luma V1
  • WHBAI · Omni 视频
  • WHBAI · Pixverse
  • WHBAI · Runway
  • WHBAI · Sora2
  • WHBAI · 统一视频 VEO
  • WHBAI · Vidu
  • WHBAI · 豆包 Volc
  • WHBAI · Suno
  • WHBAI · Playground
  • WHBAI · 账号与令牌
  • WHBAI · 阿里 Pix
  • WHBAI · 阿里百炼
  • WHBAI · 私域人像
  • WHBAI · Fal.ai
  • WHBAI · Replicate
  • WHBAI · 腾讯云 VOD
  • WHBAI · MiniMax
  • WHBAI · 支持模型列表
  • WHBAI · Grok Imagine
  • WHBAI · Seedance 2.0
  • WHBAI · TypeSafe
  • WHBAI · OpenAI 兼容
  • 可灵 Kling
    • 文生音效
      POST
    • 文生视频
      POST
    • 图生视频
      POST
    • 文生图
      POST
    • 查询文生视频任务
      GET
    • Omni-Video
      POST
  • kling
    • 对口型
      POST
    • 虚拟试穿
      POST
    • 视频延长
      POST
    • 视频特效
      POST
    • 多图参考生视频
      POST
    • 查询任务(免费)
      GET
    • 查询任务(单个)
      GET
    • Omni-Image
      POST
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 初始化待编辑视频
      POST
    • 增加视频选区
      POST
    • 删减视频选区
      POST
    • 预览已选区视频
      POST
    • 多模态视频
      POST
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 多图参考生图
      POST
    • 查询任务(单个)
      GET
    • 文生视频
      POST
    • 图生视频
      POST
    • 查询视频
      GET
    • 查询任务(单个)
      GET
    • 扩图
      POST
    • 查询任务(单个)
      GET
    • 图像识别
      POST
    • 数字人
      POST
    • 查询任务(单个)
      GET
    • 查询任务(单个)
      GET
    • 视频生音效
      POST
    • 查询任务(单个)
      GET
    • 语音合成
      POST
    • 查询任务(单个)
      GET
    • 人脸识别
      POST
    • 对口型
      POST
    • 查询任务(单个)
      GET
    • 自定义音色
      POST
    • 查询自定义音色(单个)
      GET
    • 查询官方音色
      GET
    • 删除自定义音色
      POST
    • 动作控制
      POST
    • 查询任务(单个)
      GET
    • 主体(旧)
      POST
    • 主体(新版本)
      POST
    • 查询自定义主体(单个新版本)
      GET
    • 查询官方主体(列表新版本)
      GET
    • 删除自定义主体(新版本)
      POST
  • 数据模型
    • KlingTaskSubmitResponse
    • KlingTaskQueryResponse
    • KlingText2VideoRequest
    • KlingImage2VideoRequest
    • PostKlingV1ImagesGenerationsRequest
    • KlingOmniVideoRequest
    • NewApiError
  1. 可灵 Kling

Omni-Video

POST
/kling/v1/videos/omni-video
可灵 Omni 统一视频生成入口,支持文生视频、垫图、首尾帧、视频编辑、主体引用与多镜头分镜。

网站中的模型与调用示例#

Omni-Video#

请求参数#

{
  "contentType": "application/json",
  "properties": {
    "aspect_ratio": {
      "description": "画幅比例。未使用首帧且非视频编辑时建议必填。",
      "enum": [
        "16:9",
        "9:16",
        "1:1"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "",
          "name": "横屏",
          "value": "16:9"
        },
        {
          "description": "",
          "name": "竖屏",
          "value": "9:16"
        },
        {
          "description": "",
          "name": "方屏",
          "value": "1:1"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Aspect ratio. It is recommended that this field be required when the first frame is not used and is not used for video editing."
        }
      }
    },
    "callback_url": {
      "description": "任务完成回调地址,须公网可达",
      "format": "uri",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Task completion callback address must be reachable by the public network"
        }
      }
    },
    "duration": {
      "description": "视频时长(秒)。o1: 5/10;v3-omni: 3~15;refer_type=base 时由视频探测覆盖,可不传。",
      "oneOf": [
        {
          "pattern": "^[0-9]+$",
          "type": "string"
        },
        {
          "minimum": 1,
          "type": "integer"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Video duration (seconds). o1: 5/10; v3-omni: 3~15; when refer_type=base, it is covered by video detection and does not need to be transmitted."
        }
      }
    },
    "element_list": {
      "description": "主体引用列表。",
      "items": {
        "additionalProperties": false,
        "properties": {
          "element_id": {
            "description": "主体 ID,来自创建主体接口",
            "oneOf": [
              {
                "minLength": 1,
                "type": "string"
              },
              {
                "type": "integer"
              }
            ],
            "x-i18n": {
              "en-US": {
                "description": "Principal ID, from create principal interface"
              }
            }
          }
        },
        "required": [
          "element_id"
        ],
        "type": "object"
      },
      "type": "array",
      "x-i18n": {
        "en-US": {
          "description": "List of subject references."
        }
      }
    },
    "external_task_id": {
      "description": "调用方外部任务 ID,用于业务关联",
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Caller external task ID, used for business correlation"
        }
      }
    },
    "image_list": {
      "description": "参考图列表。用于主体/场景/风格参考或首尾帧。",
      "items": {
        "additionalProperties": false,
        "properties": {
          "image_url": {
            "description": "图片 URL 或 Base64",
            "minLength": 1,
            "type": "string",
            "x-i18n": {
              "en-US": {
                "description": "Image URL or Base64"
              }
            }
          },
          "type": {
            "description": "首尾帧类型。有 end_frame 必须有 first_frame。",
            "enum": [
              "first_frame",
              "end_frame"
            ],
            "type": "string",
            "x-apifox-enum": [
              {
                "description": "视频起始帧",
                "name": "首帧",
                "value": "first_frame"
              },
              {
                "description": "须与 first_frame 成对",
                "name": "尾帧",
                "value": "end_frame"
              }
            ],
            "x-i18n": {
              "en-US": {
                "description": "First and last frame type. There must be first_frame if there is end_frame."
              }
            }
          }
        },
        "type": "object"
      },
      "type": "array",
      "x-i18n": {
        "en-US": {
          "description": "Reference figure list. Used for subject/scene/style reference or first and last frames."
        }
      }
    },
    "mode": {
      "default": "pro",
      "description": "生成模式。缺省网关补 pro;4k 仅 kling-v3-omni。",
      "enum": [
        "std",
        "pro",
        "4k"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "",
          "name": "标准",
          "value": "std"
        },
        {
          "description": "网关缺省值",
          "name": "高品质",
          "value": "pro"
        },
        {
          "description": "仅 kling-v3-omni",
          "name": "4K",
          "value": "4k"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Generate schema. The default gateway is pro; 4k only kling-v3-omni."
        }
      }
    },
    "model_name": {
      "description": "Omni 模型名称,必填。o1 不支持 sound/4k/multi_shot;v3-omni 全功能。",
      "enum": [
        "kling-video-o1",
        "kling-v3-omni"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "标准 Omni,duration 仅 5/10 秒",
          "name": "Video O1",
          "value": "kling-video-o1"
        },
        {
          "description": "支持 sound、4k、multi_shot,duration 3~15 秒",
          "name": "V3 Omni",
          "value": "kling-v3-omni"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Omni model name, required. o1 does not support sound/4k/multi_shot; v3-omni is fully functional."
        }
      }
    },
    "multi_prompt": {
      "description": "自定义分镜列表。shot_type=customize 时必填,最多 6 镜。",
      "items": {
        "additionalProperties": false,
        "properties": {
          "duration": {
            "description": "该分镜时长(秒),≥1",
            "oneOf": [
              {
                "pattern": "^[0-9]+(\\.[0-9]+)?$",
                "type": "string"
              },
              {
                "minimum": 1,
                "type": "number"
              },
              {
                "minimum": 1,
                "type": "integer"
              }
            ],
            "x-i18n": {
              "en-US": {
                "description": "The duration of the storyboard (seconds), ≥1"
              }
            }
          },
          "index": {
            "description": "分镜序号,从 1 起",
            "minimum": 1,
            "type": "integer",
            "x-i18n": {
              "en-US": {
                "description": "Storyboard number, starting from 1"
              }
            }
          },
          "prompt": {
            "description": "该分镜提示词,≤512 字符",
            "maxLength": 512,
            "minLength": 1,
            "type": "string",
            "x-i18n": {
              "en-US": {
                "description": "The storyboard prompt word, ≤512 characters"
              }
            }
          }
        },
        "required": [
          "index",
          "prompt",
          "duration"
        ],
        "type": "object"
      },
      "maxItems": 6,
      "type": "array",
      "x-i18n": {
        "en-US": {
          "description": "Customized storyboard list. Required when shot_type=customize, up to 6 shots."
        }
      }
    },
    "multi_shot": {
      "default": false,
      "description": "是否多镜头,默认 false。仅 kling-v3-omni 可为 true。",
      "type": "boolean",
      "x-i18n": {
        "en-US": {
          "description": "Whether to use multiple lenses, default false. Only kling-v3-omni can be true."
        }
      }
    },
    "prompt": {
      "description": "文本提示词,≤2500 字符。multi_shot=false 时必填;multi_shot=true 时无效。",
      "maxLength": 2500,
      "type": "string",
      "x-i18n": {
        "en-US": {
          "description": "Text prompt word, ≤2500 characters. Required when multi_shot=false; invalid when multi_shot=true."
        }
      }
    },
    "shot_type": {
      "description": "分镜方式。multi_shot=true 时必填;customize 须配合 multi_prompt。",
      "enum": [
        "customize"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "须传 multi_prompt,各镜 duration 之和等于顶层 duration",
          "name": "自定义分镜",
          "value": "customize"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Storyboarding method. Required when multi_shot=true; customize must match multi_prompt."
        }
      }
    },
    "sound": {
      "description": "有声开关。on 仅 kling-v3-omni;o1 传 on 会 400。",
      "enum": [
        "on",
        "off"
      ],
      "type": "string",
      "x-apifox-enum": [
        {
          "description": "仅 v3-omni",
          "name": "开启有声",
          "value": "on"
        },
        {
          "description": "默认无声",
          "name": "关闭有声",
          "value": "off"
        }
      ],
      "x-i18n": {
        "en-US": {
          "description": "Audible switch. on only kling-v3-omni; passing on from o1 will result in 400."
        }
      }
    },
    "video_list": {
      "description": "参考视频列表,最多 1 条。",
      "items": {
        "additionalProperties": false,
        "properties": {
          "keep_original_sound": {
            "description": "是否保留视频原声",
            "enum": [
              "yes",
              "no"
            ],
            "type": "string",
            "x-apifox-enum": [
              {
                "description": "",
                "name": "保留",
                "value": "yes"
              },
              {
                "description": "",
                "name": "不保留",
                "value": "no"
              }
            ],
            "x-i18n": {
              "en-US": {
                "description": "Whether to keep the original sound of the video"
              }
            }
          },
          "refer_type": {
            "description": "feature=特征参考;base=视频编辑(duration 由视频探测决定)。",
            "enum": [
              "feature",
              "base"
            ],
            "type": "string",
            "x-apifox-enum": [
              {
                "description": "不可与 sound=on 同用(v3-omni)",
                "name": "特征参考",
                "value": "feature"
              },
              {
                "description": "duration 无效,由视频时长覆盖",
                "name": "待编辑",
                "value": "base"
              }
            ],
            "x-i18n": {
              "en-US": {
                "description": "feature=feature reference; base=video editing (duration is determined by video detection)."
              }
            }
          },
          "video_url": {
            "description": "参考视频 URL,须公网可访问",
            "minLength": 1,
            "type": "string",
            "x-i18n": {
              "en-US": {
                "description": "Reference video URL, accessible from the public network"
              }
            }
          }
        },
        "required": [
          "video_url",
          "refer_type"
        ],
        "type": "object"
      },
      "maxItems": 1,
      "type": "array",
      "x-i18n": {
        "en-US": {
          "description": "Reference video list, maximum 1."
        }
      }
    },
    "watermark_info": {
      "additionalProperties": false,
      "description": "水印配置,网关透传",
      "properties": {
        "enabled": {
          "description": "true 生成含水印结果",
          "type": "boolean",
          "x-i18n": {
            "en-US": {
              "description": "true generates watermarked results"
            }
          }
        }
      },
      "type": "object",
      "x-i18n": {
        "en-US": {
          "description": "Watermark configuration, gateway transparent transmission"
        }
      }
    }
  },
  "required": [
    "model_name"
  ]
}

请求示例 · 新手推荐:Omni 文生视频 · 最小可用提交通路(o1)#

{
  "aspect_ratio": "16:9",
  "duration": "5",
  "mode": "pro",
  "model_name": "kling-video-o1",
  "multi_shot": false,
  "prompt": "A cinematic aerial shot over a misty mountain lake at sunrise"
}

请求示例 · 新手推荐:Omni 垫图生视频 · image_list#

{
  "aspect_ratio": "16:9",
  "duration": "5",
  "image_list": [
    {
      "image_url": "{{image_url_1}}"
    },
    {
      "image_url": "{{image_url_2}}"
    }
  ],
  "mode": "pro",
  "model_name": "kling-video-o1",
  "multi_shot": false,
  "prompt": "The character walks through a neon alley, cyberpunk style"
}

请求示例 · 新手推荐:Omni 首尾帧 · first_frame + end_frame#

{
  "duration": "5",
  "image_list": [
    {
      "image_url": "{{first_frame_url}}",
      "type": "first_frame"
    },
    {
      "image_url": "{{end_frame_url}}",
      "type": "end_frame"
    }
  ],
  "mode": "pro",
  "model_name": "kling-video-o1",
  "multi_shot": false,
  "prompt": "Smooth transition from day to night over the same street"
}

请求示例 · 新手推荐:Omni V3 有声 · sound=on#

{
  "aspect_ratio": "16:9",
  "duration": 8,
  "mode": "pro",
  "model_name": "kling-v3-omni",
  "multi_shot": false,
  "prompt": "A jazz band performs on a rainy street corner",
  "sound": "on"
}

请求示例 · 进阶推荐:Omni 视频编辑 · refer_type=base#

{
  "mode": "pro",
  "model_name": "kling-v3-omni",
  "multi_shot": false,
  "prompt": "Replace the background with a futuristic city skyline",
  "video_list": [
    {
      "keep_original_sound": "no",
      "refer_type": "base",
      "video_url": "{{video_url}}"
    }
  ]
}

请求示例 · 进阶推荐:Omni 视频特征参考 · refer_type=feature#

{
  "aspect_ratio": "16:9",
  "duration": "10",
  "mode": "pro",
  "model_name": "kling-video-o1",
  "multi_shot": false,
  "prompt": "A dancer mimics the motion style of the reference video",
  "video_list": [
    {
      "keep_original_sound": "yes",
      "refer_type": "feature",
      "video_url": "{{ref_video_url}}"
    }
  ]
}

请求示例 · 进阶推荐:Omni 主体引用 · element_list#

{
  "aspect_ratio": "1:1",
  "duration": 6,
  "element_list": [
    {
      "element_id": "{{element_id}}"
    }
  ],
  "mode": "pro",
  "model_name": "kling-v3-omni",
  "multi_shot": false,
  "prompt": "The subject walks into a sunlit studio and waves at camera"
}

请求示例 · 进阶推荐:Omni V3 多镜头 customize#

{
  "aspect_ratio": "16:9",
  "mode": "pro",
  "model_name": "kling-v3-omni",
  "multi_prompt": [
    {
      "duration": 3,
      "index": 1,
      "prompt": "Wide shot of an empty train platform"
    },
    {
      "duration": 4,
      "index": 2,
      "prompt": "Train arrives, doors open, passengers exit"
    },
    {
      "duration": 3,
      "index": 3,
      "prompt": "Close-up on a ticket fluttering in the wind"
    }
  ],
  "multi_shot": true,
  "shot_type": "customize"
}

请求示例 · 进阶推荐:Omni 回调与 external_task_id#

{
  "aspect_ratio": "9:16",
  "callback_url": "{{callback_url}}",
  "duration": 5,
  "external_task_id": "{{external_task_id}}",
  "mode": "pro",
  "model_name": "kling-v3-omni",
  "multi_shot": false,
  "prompt": "Product showcase rotating on a clean white pedestal"
}

请求参数

Authorization
Bearer Token
在 Header 添加参数
Authorization
,其值为在 Bearer 之后拼接 Token
示例:
Authorization: Bearer ********************
or
Header 参数

Body 参数application/json必填

示例
{
    "model_name": "kling-video-o1",
    "prompt": "A cinematic aerial shot over a misty mountain lake at sunrise",
    "mode": "pro",
    "duration": "5",
    "aspect_ratio": "16:9",
    "multi_shot": false
}

请求示例代码

Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
cURL
curl --location '/kling/v1/videos/omni-video' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{
    "model_name": "kling-video-o1",
    "prompt": "A cinematic aerial shot over a misty mountain lake at sunrise",
    "mode": "pro",
    "duration": "5",
    "aspect_ratio": "16:9",
    "multi_shot": false
}'

返回响应

🟢200成功
application/json
Bodyapplication/json

示例
{
    "code": 0,
    "message": "success",
    "data": {
        "task_id": "task_example_001"
    }
}
🟠400请求有误
🟠401没有权限
修改于 2026-10-24 18:33:09
上一页
查询文生视频任务
下一页
对口型
Built with