> ## 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 图生视频 kling-v2-5-turbo

> 通过 `/kling/v1/videos/image2video` 提交 Kling 图生视频任务。请求体经模型映射和公共任务 ID 注入后转发至 Kling 官方接口。



## OpenAPI

````yaml api-reference/zh-Hans/zmodelVideo/kling/kling-v2-5-turbo-image2video.json POST /kling/v1/videos/image2video
openapi: 3.0.1
info:
  title: Kling 图生视频任务 - 提交任务 (kling-v2-5-turbo)
  version: 1.0.0
  description: 通过 `/kling/v1/videos/image2video` 提交 Kling 图生视频任务。使用模型 kling-v2-5-turbo。
servers:
  - url: https://api.powertokens.ai
    description: ''
security: []
tags:
  - name: Kling
    description: Kling 原生异步任务端点
paths:
  /kling/v1/videos/image2video:
    post:
      tags:
        - Kling
      summary: Kling 图生视频任务 (kling-v2-5-turbo)
      description: >-
        通过 `/kling/v1/videos/image2video` 提交 Kling 图生视频任务。请求体经模型映射和公共任务 ID
        注入后转发至 Kling 官方接口。
      operationId: createKlingV25TurboImage2Video
      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-v2-5-turbo
                  image: >-
                    https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-2.png
                  image_tail: >-
                    https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-1.png
                  prompt: 镜头拉远，女生微笑
                  negative_prompt: ''
                  duration: '5'
                  mode: pro
                  sound: 'off'
                  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
        - image
      properties:
        model_name:
          type: string
          description: 模型名称
          enum:
            - kling-v2-5-turbo
        image:
          type: string
          description: >-
            参考图像

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

            - 注意：请确保您传递的所有图像数据参数均采用Base64编码格式。若您使用 Base64 方式，请不要在 Base64
            编码字符串前添加任何前缀（如 data:image/png;base64,），直接传递 Base64 编码后的字符串即可。

            - 正确的 Base64 编码参数：

             `iVBORw0KGgoAAAANSUhEUgAAAAUA...`

            - 错误的 Base64 编码参数（包含 data: 前缀）：


            `data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUA...`


            - 图片格式支持 .jpg / .jpeg / .png

            - 图片文件大小不能超过 10MB，图片宽高尺寸不小于 300px，图片宽高比介于 1:2.5 ~ 2.5:1 之间

            - image 参数与 image_tail 参数至少二选一，二者不能同时为空
        image_tail:
          type: string
          description: >-
            参考图像 - 尾帧控制

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

            - 注意：若您使用 Base64 方式，请不要在 Base64 编码字符串前添加任何前缀（如
            data:image/png;base64,），直接传递 Base64 编码后的字符串即可。

            - 图片格式支持 .jpg / .jpeg / .png

            - 图片文件大小不能超过 10MB，图片宽高尺寸不小于 300px

            - image 参数与 image_tail 参数至少二选一，二者不能同时为空
        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: >-
            正向文本提示词


            ```markdown

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

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

            ```


            - 不能超过 2500 个字符

            - 当 multi_shot 为 false 或 shot_type 为 intelligence 时不得为空。

            - 用 <<<voice_1>>> 来指定音色，序号同 voice_list 参数所引用音色的排列顺序

            - 一次视频生成任务至多引用 2 个音色；指定音色时，sound 参数值必须为 on

            - 语法结构越简单越好，如：男人<<<voice_1>>>说："你好"

            - 当 voice_list 参数不为空且 prompt 参数中引用音色 ID 时，视频生成任务按"有指定音色"计量计费
          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" }]

            ```


            当 multi_shot 为 true 且 shot_type 为 customize 时必填
          minItems: 1
          maxItems: 6
          x-valid-when:
            multi_shot:
              - true
        negative_prompt:
          type: string
          description: |-
            负向文本提示词
            - 不能超过 2500 个字符
            - 建议通过正向提示词中的负向句子补充负向提示信息
          maxLength: 2500
        element_list:
          type: array
          items:
            type: object
            required:
              - element_id
            properties:
              element_id:
                type: integer
                format: int64
                description: 主体库中的主体 ID。
          description: |-
            主体参考列表，基于主体库中的主体 ID 配置。
            - 最多支持 3 个参考主体

            主体分为视频角色主体和多图主体，适用范围不同。

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

            ```json
            "element_list":[{ "element_id": long },{ "element_id": long }]
            ```
          maxItems: 3
        voice_list:
          type: array
          items:
            type: object
            required:
              - voice_id
            properties:
              voice_id:
                type: string
                description: 音色 ID。
                enum:
                  - '829836818102231083'
                  - '829837074797821984'
                  - '829837252279803904'
                  - '829837297074962436'
                x-options:
                  - label: Owen
                    value: '829836818102231083'
                  - label: Catherine
                    value: '829837074797821984'
                  - label: Laura
                    value: '829837252279803904'
                  - label: William
                    value: '829837297074962436'
          description: |-
            生成视频时引用的音色列表。
            - 一次视频生成任务至多引用 2 个音色
            - 当 voice_list 参数不为空且 prompt 参数中引用音色 ID 时，视频生成任务按"有指定音色"计量计费
            - element_list 与 voice_list 互斥，不能共存

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

            ```json
            "voice_list":[{ "voice_id": "string" },{ "voice_id": "string" }]
            ```
          maxItems: 2
        sound:
          type: string
          enum:
            - 'on'
            - 'off'
          default: 'off'
          description: 生成视频时是否同时生成声音
        cfg_scale:
          type: number
          minimum: 0
          maximum: 1
          default: 0.5
          description: |-
            生成视频的自由度；值越大，模型自由度越小，与用户输入的提示词相关性越强
            kling-v2.x 模型不支持此参数
        mode:
          type: string
          enum:
            - std
            - pro
          default: std
          x-options:
            - label: 720P
              value: std
            - label: 1080P
              value: pro
          x-linkage:
            rules:
              - when:
                  field: image_tail
                  operator: has_value
                set_options:
                  - pro
          description: |-
            生成视频的模式

            - std：标准模式（标准），基础模式，性价比高，输出视频分辨率为720P。
            - pro：专家模式（高品质），高表现模式，生成视频质量更佳，输出视频分辨率为1080P。
        duration:
          type: string
          description: 视频时长，单位秒。
          enum:
            - '5'
            - '10'
          default: '5'
        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_info:
              type: object
              description: 任务创建时的参数信息
              properties:
                external_task_id:
                  type: string
                  description: 客户自定义任务ID
            task_status:
              type: string
              description: 任务状态
              enum:
                - submitted
                - processing
                - succeed
                - failed
              x-enum-labels:
                - 已提交
                - 处理中
                - 成功
                - 失败
              example: submitted
            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>`。'

````