> ## 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 Multi Image-to-Image

> Submit a Kling native multi image-to-image task via `/kling/v1/images/multi-image2image`.



## OpenAPI

````yaml api-reference/en/zmodelImage/kling/kling-v2-multi-image2image.json POST /kling/v1/images/multi-image2image
openapi: 3.0.1
info:
  title: Kling Multi Image-to-Image Task - Submit Task
  version: 1.0.0
  description: >-
    Submit a Kling native multi image-to-image task via
    `/kling/v1/images/multi-image2image`.
servers:
  - url: https://api.powertokens.ai
    description: Current new-api gateway instance
security: []
tags:
  - name: Kling
    description: Kling native async task endpoints
paths:
  /kling/v1/images/multi-image2image:
    post:
      tags:
        - Kling
      summary: Kling Multi Image-to-Image Task
      description: >-
        Submit a Kling native multi image-to-image task via
        `/kling/v1/images/multi-image2image`.
      operationId: createKlingMultiReference2Image
      parameters:
        - name: Content-Type
          in: header
          required: true
          schema:
            type: string
            default: application/json
          description: Data exchange format
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KlingRequest'
            examples:
              request:
                summary: Request example
                value:
                  model_name: kling-v2
                  prompt: Wearing a flowing red dress, in a grassland, Ghibli style.
                  negative_prompt: ''
                  subject_image_list:
                    - subject_image: >-
                        https://v1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-1.png
                    - subject_image: >-
                        https://v1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/multi-2.png
                  scene_image: >-
                    https://v1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/background.jpeg
                  style_image: >-
                    https://v1-kling.klingai.com/kcdn/cdn-kcdn112452/kling-qa-test/16x9_jipuli.png
                  'n': 2
                  aspect_ratio: '9:16'
      responses:
        '200':
          description: Task accepted.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
              examples:
                response:
                  summary: Response example
                  value:
                    code: 0
                    message: string
                    request_id: string
                    data:
                      task_id: string
                      task_info:
                        external_task_id: string
                      task_status: string
                      created_at: 1722769557708
                      updated_at: 1722769557708
      security:
        - bearerAuth: []
components:
  schemas:
    KlingRequest:
      type: object
      required:
        - model_name
        - subject_image_list
      properties:
        model_name:
          type: string
          description: Model name
          enum:
            - kling-v2
        prompt:
          type: string
          description: |-
            Positive text prompt
            - Must not exceed 2500 characters.
          maxLength: 2500
        negative_prompt:
          type: string
          description: |-
            Negative text prompt
            - Must not exceed 2500 characters.
          maxLength: 2500
        subject_image_list:
          type: array
          items:
            type: object
            required:
              - subject_image
            properties:
              subject_image:
                type: string
                description: Subject image URL or Base64 string.
          description: >-
            Subject reference image list


            - Supports up to 4 images, minimum 1 image. Use key:value format:

            `"subject_image_list":[  { "subject_image":"image_url" },  {
            "subject_image":"image_url" },  { "subject_image":"image_url" },  {
            "subject_image":"image_url" }]`

            - No cropping logic on the API side — please upload pre-selected
            subject images directly

            - Supports image Base64 encoding or image URL (must be accessible)

            - Note: When using Base64, do not add any prefix (such as
            data:image/png;base64,) before the Base64 string — pass the Base64
            encoded string directly.

            - Correct Base64 parameter:


            `iVBORw0KGgoAAAANSUhEUgAAAAUA...`


            - Incorrect Base64 parameter (contains data: prefix):


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


            - Supported image formats: .jpg / .jpeg / .png

            - Image file size must not exceed 10MB, image dimensions must be at
            least 300px, aspect ratio between 1:2.5 ~ 2.5:1
          minItems: 1
          maxItems: 4
        scene_image:
          type: string
          description: >-
            Scene reference image


            - Supports image Base64 encoding or image URL (must be accessible)

            - Note: When using Base64, do not add any prefix (such as
            data:image/png;base64,) before the Base64 string — pass the Base64
            encoded string directly.

            - Correct Base64 parameter:


            `iVBORw0KGgoAAAANSUhEUgAAAAUA...`


            - Incorrect Base64 parameter (contains data: prefix):


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


            - Supported image formats: .jpg / .jpeg / .png

            - Image file size must not exceed 10MB, image dimensions must be at
            least 300px, aspect ratio between 1:2.5 ~ 2.5:1
        style_image:
          type: string
          description: >-
            Style reference image


            - Supports image Base64 encoding or image URL (must be accessible)

            - Note: When using Base64, do not add any prefix (such as
            data:image/png;base64,) before the Base64 string — pass the Base64
            encoded string directly.

            - Correct Base64 parameter:


            `iVBORw0KGgoAAAANSUhEUgAAAAUA...`


            - Incorrect Base64 parameter (contains data: prefix):


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


            - Supported image formats: .jpg / .jpeg / .png

            - Image file size must not exceed 10MB, image dimensions must be at
            least 300px, aspect ratio between 1:2.5 ~ 2.5:1
        'n':
          type: integer
          minimum: 1
          maximum: 9
          default: 1
          description: Number of images to generate
        aspect_ratio:
          type: string
          description: Aspect ratio of generated images (width:height)
          enum:
            - '1:1'
            - '16:9'
            - '4:3'
            - '3:2'
            - '2:3'
            - '3:4'
            - '9:16'
            - '21:9'
          default: '16:9'
        watermark_info:
          type: object
          description: |-
            Whether to also generate a watermarked result.
            - Defined via the enabled parameter:

            ```json
             "watermark_info": { "enabled": boolean } ```

            - true to generate, false to not generate
            - Custom watermarks are not currently supported
          properties:
            enabled:
              type: boolean
              description: true to generate watermarked result, false to not generate.
        callback_url:
          type: string
          description: >-
            Callback notification URL for this task. If configured, the server
            will proactively notify when the task status changes.
        external_task_id:
          type: string
          description: >-
            Custom task ID.

            - Does not override the system-generated task ID, but supports
            querying by this ID.

            - Must be unique per user.
    SubmitResponse:
      type: object
      properties:
        code:
          type: integer
          description: Error code; see error codes for details.
          example: 0
        message:
          type: string
          description: Error message.
          example: string
        request_id:
          type: string
          description: >-
            Request ID, system-generated, used for request tracking and
            troubleshooting.
          example: string
        data:
          type: object
          properties:
            task_id:
              type: string
              description: Task ID, system-generated.
              example: string
            task_info:
              type: object
              description: Task creation parameter information.
              properties:
                external_task_id:
                  type: string
                  description: Client-provided custom task ID.
                  example: string
            task_status:
              type: string
              description: Task status.
              enum:
                - submitted
                - processing
                - succeed
                - failed
              example: submitted
            created_at:
              type: integer
              format: int64
              description: Task creation time, Unix timestamp in milliseconds.
              example: 1722769557708
            updated_at:
              type: integer
              format: int64
              description: Task update time, Unix timestamp in milliseconds.
              example: 1722769557708
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: 'Pass `Authorization: Bearer <token>` in the request header.'

````