Skip to content

Omni-Video

OpenAPI Specification

yaml
openapi: 3.0.1
info:
  title: ''
  description: ''
  version: 1.0.0
paths:
  /kling/v1/videos/omni-video:
    post:
      summary: Omni-Video
      deprecated: false
      description: ''
      tags:
        - 可灵 Kling 平台/Omni-Video
      parameters:
        - name: Content-Type
          in: header
          description: ''
          required: false
          example: application/json
          schema:
            type: string
        - name: Authorization
          in: header
          description: ''
          required: false
          example: Bearer {{YOUR_API_KEY}}
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model_name:
                  type: string
                  description: 模型名称 枚举值:kling-video-o1  kling-v3-omni
                prompt:
                  type: string
                  description: |-
                    文本提示词,可包含正向描述和负向描述
                    可将提示词模板化来满足不同的视频生成需求
                    不能超过2500个字符
                    当multi_shot参数为false,当前参数不得为空
                image_list:
                  type: array
                  items:
                    type: object
                    properties:
                      image_url:
                        type: string
                      type:
                        type: string
                    x-apifox-orders:
                      - image_url
                      - type
                  description: |-
                    参考图列表
                    包括主体、场景、风格等参考图片,也可作为首帧或尾帧生成视频;当作为首帧或尾帧生成视频时:
                    通过type参数来定义图片是否为首尾帧:first_frame为首帧,end_frame为尾帧
                    暂时不支持仅尾帧,即有尾帧图时必须有首帧图
                    首帧或首尾帧生视频时,不能使用视频编辑功能
                video_list:
                  type: array
                  items:
                    type: object
                    properties:
                      video_url:
                        type: string
                      refer_type:
                        type: string
                      keep_original_sound:
                        type: string
                    x-apifox-orders:
                      - video_url
                      - refer_type
                      - keep_original_sound
                  description: >-
                    参考视频,通过URL方式获取

                    可作为特征参考视频,也可作为待编辑视频,默认为待编辑视频;可选择性保留视频原声

                    通过refer_type参数区分参考视频类型:feature为特征参考视频,base为待编辑视频

                    参考视频为待编辑视频时,不能定义视频首尾帧

                    通过keep_original_sound参数选择是否保留视频原声,yes为保留,no为不保留;当前参数对特征参考视频(feature)也生效
                mode:
                  type: string
                  description: |-
                    生成视频的模式
                    枚举值:std,pro
                    其中std:标准模式(标准),基础模式,性价比高
                    其中pro:专家模式(高品质),高表现模式,生成视频质量更佳
                aspect_ratio:
                  type: string
                  description: |-
                    生成视频的画面纵横比(宽:高)
                    枚举值:16:9, 9:16, 1:1
                    未使用首帧参考或视频编辑功能时,当前参数必填
                duration:
                  type: string
                  description: >-
                    生成视频时长,单位s

                    枚举值:3,4,5,6,7,8,9,10,其中:

                    使用文生视频、首帧图生视频时,仅支持5和10s

                    使用视频编辑功能(“refer_type”:“base”)时,输出结果与传入视频时长相同,此时当前参数无效;此时,按输入视频时长四舍五入取整计量计费

                    kling-v3-omni  支持

                    ● 枚举值:3,4,5,6,7,8,9,10,11,12,13,14,15,其中:

                    使用视频编辑功能("refer_type":"base")时,输出结果与传入视频时长相同,此时当前参数无效;此时,按输入视频时长四舍五入取整计量计费
                callback_url:
                  type: string
                external_task_id:
                  type: string
                element_list:
                  type: array
                  items:
                    type: object
                    properties:
                      element_id:
                        type: string
                        description: 主体id
                    x-apifox-orders:
                      - element_id
                  description: 主体
                multi_shot:
                  type: boolean
                  description: |-
                    是否生成多镜头视频
                    当前参数为true时,prompt参数无效
                    当前参数为false时,shot_type参数及multi_prompt参数无效
                shot_type:
                  type: string
                  description: |-
                    分镜方式
                    枚举值:customize
                    当multi_shot参数为true时,当前参数必填
                multi_prompt:
                  type: array
                  items:
                    type: object
                    properties:
                      index:
                        type: number
                        description: 镜序号
                      prompt:
                        type: string
                        description: 提示词
                      duration:
                        type: string
                        description: 时长
                    x-apifox-orders:
                      - index
                      - prompt
                      - duration
                  description: "各分镜信息,如提示词、时长等\n● 通过index、prompt、duration参数定义分镜序号及相应提示词和时长,其中:\n\t○ 最多支持6个分镜,最小支持1个分镜\n\t○ 每个分镜相关内容的最大长度不超过512\n\t○ 每个分镜的时长不大于当前任务的总时长,不小于1\n\t○ 所有分镜的时长之和等于当前任务的总时长"
                watermark_info:
                  type: object
                  properties:
                    enabled:
                      type: boolean
                  x-apifox-orders:
                    - enabled
                  description: "是否同时生成含水印的结果\n● 通过enabled参数定义,用key:value承载,如下::\n\"watermark_info\": {\n \t\"enabled\": boolean // true 为生成,false 为不生成\n}"
                sound:
                  type: string
                  description: |-
                    生成视频时是否同时生成声音
                    枚举值:on,off
              required:
                - model_name
                - mode
                - duration
                - multi_shot
              x-apifox-orders:
                - model_name
                - multi_shot
                - shot_type
                - prompt
                - multi_prompt
                - sound
                - image_list
                - video_list
                - element_list
                - mode
                - aspect_ratio
                - duration
                - watermark_info
                - callback_url
                - external_task_id
            example: "{\r\n    \"model_name\": \"kling-video-o1\",\r\n    \"prompt\": \"生成一个海边有一个人跳舞的视频\",\r\n    \"negative_prompt\": \"\",\r\n    // \"cfg_scale\": 0.5,\r\n    \"mode\": \"std\",\r\n    // \"sound\": \"off\",\r\n    // \"image_list\": [\r\n    //     {\r\n    //         \"image_url\": \"https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg\",\r\n    //         \"type\": \"first_frame\"\r\n    //     }\r\n    // ],\r\n    // \"video_list\": [\r\n    //     {\r\n    //         \"video_url\": \"\",\r\n    //         \"refer_type\": \"base\",\r\n    //         \"keep_original_sound\": \"yes\"\r\n    //     }\r\n    // ],\r\n    \"element_list\": [\r\n        {\r\n            \"element_id\": 835266081714884677\r\n        }\r\n    ],\r\n    \"aspect_ratio\": \"16:9\",\r\n    \"duration\": \"5\",\r\n    \"callback_url\": \"\",\r\n    \"external_task_id\": \"\"\r\n}"
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties: {}
          headers: {}
          x-apifox-name: 成功
      security:
        - bearer: []
      x-apifox-folder: 可灵 Kling 平台/Omni-Video
      x-apifox-status: released
      x-run-in-apifox: https://app.apifox.com/web/project/5443236/apis/api-393296337-run
components:
  schemas: {}
  securitySchemes:
    bearer:
      type: http
      scheme: bearer
servers:
  - url: https://www.anyapi.vip
    description: 正式环境
security:
  - bearer: []

AnyAPI — 专业的 AI 接口聚合服务