> ## Documentation Index
> Fetch the complete documentation index at: https://docs.powertokens.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Kling 视频Omni kling-video-o1

> Omni 模型可以通过 Prompt 结合元素、图片、视频等内容实现多种能力。



## OpenAPI

````yaml api-reference/zh-Hans/zmodelVideo/kling/kling-video-o1-video-omni.json POST /kling/v1/videos/omni-video
openapi: 3.0.1
info:
  title: Kling 视频Omni任务 - 提交任务
  version: 1.0.0
  description: Omni 模型可以通过 Prompt 结合元素、图片、视频等内容实现多种能力。
servers:
  - url: https://api.powertokens.ai
    description: ''
security: []
tags:
  - name: Kling
    description: Kling 原生异步任务端点
paths:
  /kling/v1/videos/omni-video:
    post:
      tags:
        - Kling
      summary: Kling 视频Omni任务
      description: Omni 模型可以通过 Prompt 结合元素、图片、视频等内容实现多种能力。
      operationId: createKlingVideoO1OmniVideoGeneration
      parameters:
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
            default: application/json
          description: 数据交换格式
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KlingRequest'
            examples:
              request:
                summary: 请求示例
                value:
                  model_name: kling-video-o1
                  prompt: 让<<<image_1>>>中的人物向镜头挥手
                  image_list:
                    - image_url: >-
                        https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-1.png
                  duration: '5'
                  mode: pro
                  aspect_ratio: '16:9'
                  callback_url: ''
                  external_task_id: ''
      responses:
        '200':
          description: 任务已受理。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
              examples:
                response:
                  summary: 响应示例
                  value:
                    code: 0
                    message: string
                    request_id: string
                    data:
                      task_id: string
                      task_info:
                        external_task_id: string
                      task_status: submitted
                      created_at: 1722769557708
                      updated_at: 1722769557708
      security:
        - bearerAuth: []
components:
  schemas:
    KlingRequest:
      type: object
      required:
        - model_name
        - prompt
      properties:
        model_name:
          type: string
          description: 模型名称
          enum:
            - kling-video-o1
        multi_shot:
          type: boolean
          default: false
          description: |-
            是否生成多镜头视频。
            当前参数为 true 时，prompt 参数无效。
            当前参数为 false 时，shot_type 参数及 multi_prompt 参数无效。
        shot_type:
          type: string
          enum:
            - customize
            - intelligence
          description: |-
            分镜方式。
            当 multi_shot 参数为 true 时，当前参数必填。
          x-valid-when:
            multi_shot:
              - true
        prompt:
          type: string
          description: >-
            文本提示词，可包含正向描述和负向描述。

            - 可将提示词模板化来满足不同的视频生成需求

            - 不能超过 2,500 个字符


            当 multi_shot 为 false 或
            multi_shot参数为true且shot-type参数为intelligence时，当前参数不得为空。


            ```markdown

            Omni模型可通过Prompt与主体、图片、视频等内容实现多种能力：

            -
            通过<<<>>>的格式来指定某个主体、图片或视频，如：<<<element_1>>>、<<<image_1>>>、<<<video_1>>>

            ```
          maxLength: 2500
        multi_prompt:
          type: array
          items:
            type: object
            required:
              - index
              - prompt
              - duration
            properties:
              index:
                type: integer
                description: 分镜序号。
              prompt:
                type: string
                description: 当前分镜提示词。
                maxLength: 512
              duration:
                type: string
                description: 当前分镜时长，单位秒。
          description: >-
            各分镜信息，如提示词、时长等。

            通过 index、prompt、duration 参数定义分镜序号及相应提示词和时长。

            - 最多支持 6 个分镜，最小支持 1 个分镜。

            - 每个分镜相关内容的最大长度不超过 512。

            - 每个分镜的时长不大于当前任务的总时长，不小于 1。

            - 所有分镜的时长之和等于当前任务的总时长。


            当 multi_shot 为 true 且 shot_type 为 customize 时，当前参数不得为空。格式如下：


            ```json

            "multi_prompt":[{ "index": int, "prompt": "string", "duration": "5"
            },{ "index": int, "prompt": "string","duration": "5" }]

            ```
          minItems: 1
          maxItems: 6
          x-valid-when:
            multi_shot:
              - true
        image_list:
          type: array
          items:
            type: object
            required:
              - image_url
            properties:
              image_url:
                type: string
                description: 图片 URL 或 Base64 字符串。
              type:
                type: string
                enum:
                  - first_frame
                  - end_frame
                description: 帧类型。first_frame 为首帧，end_frame 为尾帧。
          description: >-
            参考图列表，包括主体、场景、风格等参考图片

            - 包括主体、场景、风格等参考图片，也可作为首帧或尾帧生成视频；当作为首帧或尾帧生成视频时：
              * 通过 type 参数来定义图片是否为首尾帧：first_frame 为首帧，end_frame 为尾帧；其中：
                - 如图片非首帧或尾帧，请勿配置 type 参数
                - 暂时不支持仅尾帧，即有尾帧图时必须有首帧图
              * 首帧或首尾帧生视频时，不能使用视频编辑功能

            用 key:value 承载，如下：


            ```json

            "image_list":[{ "image_url": "image_url"},{ "image_url": "image_url"
            }]

            ```


            图片要求：

            - 支持传入图片Base64编码或图片URL（确保可访问）

            - 格式：.jpg / .jpeg / .png

            - 文件大小：≤10MB

            - 尺寸：宽和高都不小于300px，宽高比1:2.5 ~ 2.5:1

            - 参考图片数量与参考主体数量和参考主体类型有关，其中：
              * 无参考视频+仅有多图主体时，参考图片与多图主体数量之和不得超过7；

            数量限制：

            - 参考图片数量与参考主体数量和参考主体类型有关，其中：
              * 无参考视频+仅有多图主体时，参考图片与多图主体数量之和不得超过7；
              * 无参考视频+有视频主体时，参考图片与多图主体数量之和不得超过4；
              * 有参考视频+仅有多图主体时，参考图片与多图主体数量之和不得超过4；
            - 使用kling-video-o1模型时，数组中超过2张图片时，不支持设置首尾帧

            - image_url 参数值不得为空
        element_list:
          type: array
          items:
            type: object
            required:
              - element_id
            properties:
              element_id:
                type: integer
                format: int64
                description: 主体库中的主体 ID。
          description: |-
            主体参考列表，基于主体库中主体的ID配置。
            - 用 key:value 承载，格式如下：

            ```json
            "element_list":[{ "element_id": long },{ "element_id": long }]
            ```

            - 主体分为视频定制主体（简称：视频角色主体）和图片定制主体（简称：多图主体），适用范围不同，请注意区分
            - 参考主体数量与主体类型、有无参考视频、参考图片数量等因素有关，其中：
              * 当使用首帧或首尾帧生成视频时，kling-v3-omni模型最多支持3个主体；
              * 当使用首尾帧生成视频时，kling-video-o1模型不支持主体；
              * 无参考视频+仅有多图主体时，参考图片与多图主体数量之和不得超过7；
              * 无参考视频+仅有视频角色主体时，视频角色主体数量不得超过3；
              * 无参考视频+同时有视频角色主体和多图主体时，视频角色主体数量不得超过3，参考图片与多图主体数量之和不得超过4；
              * 有参考视频+仅有多图主体时，参考图片与多图主体数量之和不得超过4；
              * 有参考视频时，不支持使用视频角色主体；
        video_list:
          type: array
          items:
            type: object
            required:
              - video_url
            properties:
              video_url:
                type: string
                description: 视频 URL。
              refer_type:
                type: string
                enum:
                  - feature
                  - base
                description: |-
                  参考类型：feature（特征参考视频）或 base（待编辑视频）
                  - base - 指令变换（视频编辑）：
                  视频编辑，例如增加/删除/修改内容（主体/背景/局部/视频风格/物体颜色/天气等），切换景别/视角。
                  - feature - 视频参考：
                  参考视频内容生成下一个镜头/上一个镜头，或者参考视频的风格/运镜方式进行视频生成。
              keep_original_sound:
                type: string
                enum:
                  - 'yes'
                  - 'no'
                description: 是否保留视频原声。
          description: >-
            参考视频，通过URL方式获取。


            视频类型：

            - 可作为特征参考视频，也可作为待编辑视频，默认为待编辑视频

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

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

            - 通过 keep_original_sound 参数选择是否保留视频原声：yes 保留，no 不保留（对 feature 类型也生效）


            有参考视频时，sound 参数值只能为 off。


            用 key:value 承载，格式如下：


            ```json

            "video_list":[{ "video_url": "video_url", "refer_type": "base",
            "keep_original_sound": "yes" }]

            ```


            视频要求：

            - 格式：仅支持 MP4/MOV

            - 时长：不少于 3 秒，上限与模型版本有关，详见能力地图

            - 分辨率：720px-2160px（宽高尺寸）

            - 帧率：24-60fps（生成视频时会输出为 24fps）

            - 至多 1 段视频，大小≤200MB

            - video_url 参数值不得为空
          maxItems: 1
        sound:
          type: string
          enum:
            - 'on'
            - 'off'
          default: 'off'
          description: 生成视频时是否同时生成声音。
        mode:
          type: string
          enum:
            - std
            - pro
          default: pro
          x-options:
            - label: 720P
              value: std
            - label: 1080P
              value: pro
          description: |-
            生成视频的模式

            - std：标准模式（标准），基础模式，性价比高，输出视频分辨率为720P。
            - pro：专家模式（高品质），高表现模式，生成视频质量更佳，输出视频分辨率为1080P。
        aspect_ratio:
          type: string
          description: |-
            生成视频的画面纵横比（宽:高）

            - 未使用首帧参考或视频编辑功能时，当前参数必填。
          enum:
            - '1:1'
            - '16:9'
            - '9:16'
        duration:
          type: string
          description: >-
            生成视频时长，单位秒。


            -
            使用视频编辑功能（"refer_type":"base"）时，输出结果与传入视频时长相同，此时当前参数无效；此时，按输入视频时长四舍五入取整计量计费
          default: '5'
          enum:
            - '3'
            - '4'
            - '5'
            - '6'
            - '7'
            - '8'
            - '9'
            - '10'
        watermark_info:
          type: object
          description: 是否同时生成含水印的结果。
          properties:
            enabled:
              type: boolean
              description: true 表示生成含水印结果，false 表示不生成。
        callback_url:
          type: string
          description: 本次任务结果回调通知地址，如果配置，服务端会在任务状态发生变更时主动通知。
        external_task_id:
          type: string
          description: |-
            自定义任务ID。
            - 传入不会覆盖系统生成的任务ID，但支持通过该ID进行任务查询。
            - 请注意，单用户下需要保证唯一性。
    SubmitResponse:
      type: object
      properties:
        code:
          type: integer
          description: 错误码；具体定义见错误码。
        message:
          type: string
          description: 错误信息。
        request_id:
          type: string
          description: 请求ID，系统生成，用于跟踪请求、排查问题。
        data:
          type: object
          properties:
            task_id:
              type: string
              description: 任务ID，系统生成。
            task_status:
              type: string
              description: 任务状态。
              enum:
                - submitted
                - processing
                - succeed
                - failed
              example: submitted
            task_info:
              type: object
              description: 任务创建时的参数信息。
              properties:
                external_task_id:
                  type: string
                  description: 客户自定义任务ID。
            created_at:
              type: integer
              format: int64
              description: 任务创建时间，Unix时间戳、单位ms。
            updated_at:
              type: integer
              format: int64
              description: 任务更新时间，Unix时间戳、单位ms。
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: '在请求头中传入 `Authorization: Bearer <token>`。'

````