> ## 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-v3-omni

> 通过 `/kling/v1/images/omni-image` 提交 Kling 原生全能图像任务。任务结果可能包含 `images` 或 `series_images`。



## OpenAPI

````yaml api-reference/zh-Hans/zmodelImage/kling/kling-v3-omni-image-omni.json POST /kling/v1/images/omni-image
openapi: 3.0.1
info:
  title: Kling 全能图像任务 - 提交任务
  version: 1.0.0
  description: >-
    通过 `/kling/v1/images/omni-image` 提交 Kling 原生全能图像任务。任务结果可能包含 `images` 或
    `series_images`。
servers:
  - url: https://api.powertokens.ai
    description: ''
security: []
tags:
  - name: Kling
    description: Kling 原生异步任务端点
paths:
  /kling/v1/images/omni-image:
    post:
      tags:
        - Kling
      summary: Kling 全能图像任务
      description: >-
        通过 `/kling/v1/images/omni-image` 提交 Kling 原生全能图像任务。任务结果可能包含 `images` 或
        `series_images`。
      operationId: createKlingOmniImageGeneration
      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-v3-omni
                  prompt: 将所有图片中的人物融合到<<<object_1>>>图中
                  element_list:
                    - element_id: 829836802793406600
                  image_list:
                    - image: >-
                        https://v1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-4.png
                    - image: >-
                        https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/video_effects/1.png
                    - image: >-
                        https://p2-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/video_effects/4.png
                  resolution: 2k
                  'n': 1
                  aspect_ratio: '3:2'
      responses:
        '200':
          description: 任务已接受。
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
      security:
        - bearerAuth: []
components:
  schemas:
    KlingRequest:
      type: object
      required:
        - model_name
        - prompt
      properties:
        model_name:
          type: string
          description: 模型名称
          enum:
            - kling-v3-omni
        prompt:
          type: string
          description: |-
            文本提示词，可包含正向描述和负向描述

            - 可将提示词模板化来满足不同的图像生成需求
            - 不能超过 2500 个字符
            - 通过 <<<>>> 的格式来指定某个图片，如：<<<image_1>>>
          maxLength: 2500
        image_list:
          type: array
          description: >-
            参考图列表，用 key:value 承载，如下：


            ```json

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

            ```


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

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

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

            - 参考主体数量与参考图片数量有关，参考主体数量和参考图片数量之和不得超过 **10**

            - `image_url` 参数值不得为空
          items:
            type: object
            required:
              - image
            properties:
              image:
                type: string
                description: 图片 URL 或 Base64 字符串。
          maxItems: 10
        element_list:
          type: array
          items:
            type: object
            required:
              - element_id
            properties:
              element_id:
                type: integer
                format: int64
                description: 主体库中的主体 ID。
          description: |-
            主体参考列表，基于主体库中主体的 ID 配置

            - 用 key:value 承载，如下：
            `"element_list":[{ "element_id": 829836802793406551 }]`

            - 参考主体数量与参考图片数量有关，参考主体数量和参考图片数量之和不得超过 10
          maxItems: 10
        resolution:
          type: string
          enum:
            - 1k
            - 2k
            - 4k
          description: 生成图片的清晰度
          default: 1k
        result_type:
          type: string
          description: 生成结果单图/组图切换开关
          enum:
            - single
            - series
          default: single
        aspect_ratio:
          type: string
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
            - '4:3'
            - '3:4'
            - '3:2'
            - '2:3'
            - '21:9'
            - auto
          default: auto
          description: |-
            生成图片的画面纵横比（宽:高）

            枚举值: `16:9` `9:16` `1:1` `4:3` `3:4` `3:2` `2:3` `21:9` `auto`

            - 其中：`auto`为根据传入内容智能生成图片宽高比
        'n':
          type: integer
          description: |-
            生成图片数量

            - 取值范围：[1, 9]
            - 当 result_type 值为 series 时，当前参数无效
          minimum: 1
          maximum: 9
          default: 1
        series_amount:
          oneOf:
            - type: integer
              minimum: 2
              maximum: 9
            - type: string
              enum:
                - auto
          default: auto
          enum:
            - 2
            - 3
            - 4
            - 5
            - 6
            - 7
            - 8
            - 9
            - auto
          description: |-
            生成组图的图片数量

            枚举值：2 3 4 5 6 7 8 9 auto

            - 其中：auto 为根据传入内容智能选择生成图片的数量
            - 使用 auto 时，会占用与实际生成数量对应的并发量
            - 当 result_type 值为 single 时，当前参数无效
        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，但支持通过该 ID 进行任务查询
            - 请注意，单用户下需要保证唯一性
    SubmitResponse:
      type: object
      properties:
        code:
          type: integer
          description: 错误码；具体定义见错误码
          example: 0
        message:
          type: string
          description: 错误信息
          example: string
        request_id:
          type: string
          description: 请求ID，系统生成，用于跟踪请求、排查问题
          example: string
        data:
          type: object
          properties:
            task_id:
              type: string
              description: 任务ID，系统生成
              example: string
            task_status:
              type: string
              description: >-
                任务状态


                枚举值：`submitted`（已提交）、`processing`（处理中）、`succeed`（成功）、`failed`（失败）
              enum:
                - submitted
                - processing
                - succeed
                - failed
              example: submitted
            task_info:
              type: object
              description: 任务创建时的参数信息
              properties:
                external_task_id:
                  type: string
                  description: 客户自定义任务ID
                  example: string
            created_at:
              type: integer
              format: int64
              description: 任务创建时间，Unix时间戳、单位ms
              example: 1722769557708
            updated_at:
              type: integer
              format: int64
              description: 任务更新时间，Unix时间戳、单位ms
              example: 1722769557708
      example:
        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
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: '在请求头中传入 `Authorization: Bearer <token>`。'

````