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

# Kling 2.6

> Kling 2.6 text-to-video and image-to-video, with optional native audio and designated voices.

**Pricing** — per second of generated video, in tokens (USD at $0.02/token). Same as the official rate:

| configuration | 720p | 1080p |
|---|---|---|
| No native audio | 2.1 tokens/s ($0.042) | 3.5 tokens/s ($0.07) |
| Native audio | not available | 7 tokens/s ($0.14) |
| Native audio + voice | not available | 8.4 tokens/s ($0.168) |

⚠️ **A designated voice is a separate price tier**, not a free extra — it is 20% above plain native audio.

⚠️ **Three upstream constraints interact, and this endpoint rejects impossible combinations up front (before any tokens are deducted):**

1. `voice_ids` requires `generate_audio: true` — a designated voice cannot be silent.
2. `generate_audio: true` requires `resolution: 1080p` — Kling publishes no 720p audio tier.
3. A first **and** last frame requires `resolution: 720p`.

Rules 2 and 3 are mutually exclusive: **on Kling 2.6 you cannot combine a first+last frame pair with native audio or voices.** Drop `image_end_url`, or drop `generate_audio`.

Returns an `img_uuid`; poll GET /api/v1/jobs/detail (or use `custom_callback_url`) to get the generated video.



## OpenAPI

````yaml api-reference/video-generations/openapi-kling-2-6.json POST /api/v1/videos/generations
openapi: 3.1.0
info:
  title: GoEnhance API - Kling 2.6
  description: Video generation with Kling 2.6.
  version: 1.0.0
servers:
  - url: https://api.goenhance.ai
security: []
paths:
  /api/v1/videos/generations:
    post:
      tags:
        - VideoGenerations
      summary: Kling 2.6
      description: >-
        Kling 2.6 text-to-video and image-to-video, with optional native audio
        and designated voices.


        **Pricing** — per second of generated video, in tokens (USD at
        $0.02/token). Same as the official rate:


        | configuration | 720p | 1080p |

        |---|---|---|

        | No native audio | 2.1 tokens/s ($0.042) | 3.5 tokens/s ($0.07) |

        | Native audio | not available | 7 tokens/s ($0.14) |

        | Native audio + voice | not available | 8.4 tokens/s ($0.168) |


        ⚠️ **A designated voice is a separate price tier**, not a free extra —
        it is 20% above plain native audio.


        ⚠️ **Three upstream constraints interact, and this endpoint rejects
        impossible combinations up front (before any tokens are deducted):**


        1. `voice_ids` requires `generate_audio: true` — a designated voice
        cannot be silent.

        2. `generate_audio: true` requires `resolution: 1080p` — Kling publishes
        no 720p audio tier.

        3. A first **and** last frame requires `resolution: 720p`.


        Rules 2 and 3 are mutually exclusive: **on Kling 2.6 you cannot combine
        a first+last frame pair with native audio or voices.** Drop
        `image_end_url`, or drop `generate_audio`.


        Returns an `img_uuid`; poll GET /api/v1/jobs/detail (or use
        `custom_callback_url`) to get the generated video.
      parameters:
        - name: Authorization
          in: header
          description: ''
          required: false
          example: '{{Authorization}}'
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                model:
                  type: string
                  enum:
                    - kling-2-6
                  description: Model name. Must be `kling-2-6`.
                prompt:
                  type: string
                  maxLength: 2500
                  description: >-
                    Text prompt. Max 2500 characters. Use `@1` / `@2` to make a
                    designated voice speak.
                image_url:
                  type: string
                  format: uri
                  description: Optional. First-frame image URL. Omit for text-to-video.
                image_end_url:
                  type: string
                  format: uri
                  description: >-
                    Optional. Last-frame image URL. Requires `image_url`, and
                    forces `resolution: 720p`.
                voice_ids:
                  type: array
                  items:
                    type: string
                  maxItems: 2
                  description: >-
                    Optional. Up to 2 voice ids from Kling's Voice Management
                    API (or a system preset). Order is the `@1` / `@2`
                    numbering. Requires `image_url` (text-to-video has no
                    materials) and `generate_audio: true`. `voice_id` is
                    accepted for a single value.
                duration:
                  type: integer
                  enum:
                    - 5
                    - 10
                  default: 5
                  description: Video duration in seconds. Only 5 or 10.
                resolution:
                  type: string
                  enum:
                    - 720p
                    - 1080p
                  default: 720p
                  description: >-
                    Output resolution. No 4K tier. `quality` is accepted as a
                    compatible alias.
                ratio:
                  type: string
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                  default: '16:9'
                  description: >-
                    Output aspect ratio. Text-to-video only — with a first frame
                    the image decides. `aspect_ratio` is accepted as a
                    compatible alias.
                generate_audio:
                  type: boolean
                  default: false
                  description: >-
                    Generate a native audio track matching the visuals. Requires
                    `resolution: 1080p`, and costs more per second.
                custom_callback_url:
                  type: string
                  format: uri
                  description: >-
                    Optional. A publicly accessible HTTPS URL. When the task
                    status changes (processing / success / failed), GoEnhance
                    sends a POST request to this URL. The request body is
                    identical to the response of GET /api/v1/jobs/detail. If
                    your server does not respond with HTTP 200, the notification
                    is retried up to 3 times, with a 3-second timeout per
                    attempt.
                  example: https://your-server.com/goenhance/callback
              required:
                - model
                - prompt
            example:
              model: kling-2-6
              prompt: A girl on a train looking out of the window, @1 whispers softly
              image_url: https://example.com/first-frame.png
              resolution: 1080p
              generate_audio: true
              voice_ids:
                - '891495440020668439'
              duration: 5
      responses:
        '200':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                  data:
                    type: object
                    properties:
                      img_uuid:
                        type: string
                    required:
                      - img_uuid
                required:
                  - code
                  - msg
                  - data
              examples:
                '1':
                  summary: Success
                  value:
                    code: 0
                    msg: Success
                    data:
                      img_uuid: c12b656c-747a-44fd-9c80-add79b0c52d5
                '2':
                  summary: Insufficient tokens
                  value:
                    code: 100
                    msg: tokens is not enough
          headers: {}
        '401':
          description: ''
          content:
            application/json:
              schema:
                type: object
                properties:
                  code:
                    type: integer
                  msg:
                    type: string
                required:
                  - code
                  - msg
          headers: {}
      deprecated: false

````