> ## 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 O1

> Kling O1 omni video. Drive generation with any combination of a first frame, a first+last frame pair, reference images, multi-image elements and one reference video.

⚠️ **Kling O1 is not a drop-in for `kling-v3-omni`.** They share the same upstream path prefix but O1's capability set is a strict subset: no multi-shot, no 4K, no generated audio, duration caps at 10s, and prompts cap at 2500 characters.

**Referring to materials in the prompt** — every material gets an index you can mention with `@`: elements are numbered `@element_1…`, images are numbered `@image_1…` in the order first frame → last frame → `ref_imgs`, and the reference video is always `@video_1`. **The array order is the numbering**, so reordering `ref_imgs` changes what your prompt refers to.

**Material limits** — `image_url` + `image_end_url` + `ref_imgs` + `element_ids` must not exceed **7** in total, or **4** when `ref_videos` is used. Using a first *and* last frame together disallows any additional `ref_imgs` / `element_ids`.

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

| resolution | no video input | with video input |
|---|---|---|
| 720p | 4.2 tokens/s ($0.084) | 6.3 tokens/s ($0.126) |
| 1080p | 5.6 tokens/s ($0.112) | 8.4 tokens/s ($0.168) |

There is no audio surcharge: O1 cannot *generate* audio — `generate_audio` only keeps the reference video's original sound, which is already priced into the "with video input" tier.

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

**Reference materials use the shared naming**: `ref_imgs` and `ref_videos`, the same as seedance / hailuo / wan's reference endpoints. `ref_videos` is an array capped at 1. The older `image_urls` / `video_url` spellings still work.

⚠️ Do not confuse `image_url` (first frame) with `ref_imgs` (reference images) — they are different inputs and count against the same material budget.



## OpenAPI

````yaml api-reference/video-generations/openapi-kling-o1.json POST /api/v1/videos/generations
openapi: 3.1.0
info:
  title: GoEnhance API - Kling O1
  description: Omni video generation with Kling O1.
  version: 1.0.0
servers:
  - url: https://api.goenhance.ai
security: []
paths:
  /api/v1/videos/generations:
    post:
      tags:
        - VideoGenerations
      summary: Kling O1
      description: >-
        Kling O1 omni video. Drive generation with any combination of a first
        frame, a first+last frame pair, reference images, multi-image elements
        and one reference video.


        ⚠️ **Kling O1 is not a drop-in for `kling-v3-omni`.** They share the
        same upstream path prefix but O1's capability set is a strict subset: no
        multi-shot, no 4K, no generated audio, duration caps at 10s, and prompts
        cap at 2500 characters.


        **Referring to materials in the prompt** — every material gets an index
        you can mention with `@`: elements are numbered `@element_1…`, images
        are numbered `@image_1…` in the order first frame → last frame →
        `ref_imgs`, and the reference video is always `@video_1`. **The array
        order is the numbering**, so reordering `ref_imgs` changes what your
        prompt refers to.


        **Material limits** — `image_url` + `image_end_url` + `ref_imgs` +
        `element_ids` must not exceed **7** in total, or **4** when `ref_videos`
        is used. Using a first *and* last frame together disallows any
        additional `ref_imgs` / `element_ids`.


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


        | resolution | no video input | with video input |

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

        | 720p | 4.2 tokens/s ($0.084) | 6.3 tokens/s ($0.126) |

        | 1080p | 5.6 tokens/s ($0.112) | 8.4 tokens/s ($0.168) |


        There is no audio surcharge: O1 cannot *generate* audio —
        `generate_audio` only keeps the reference video's original sound, which
        is already priced into the "with video input" tier.


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


        **Reference materials use the shared naming**: `ref_imgs` and
        `ref_videos`, the same as seedance / hailuo / wan's reference endpoints.
        `ref_videos` is an array capped at 1. The older `image_urls` /
        `video_url` spellings still work.


        ⚠️ Do not confuse `image_url` (first frame) with `ref_imgs` (reference
        images) — they are different inputs and count against the same material
        budget.
      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-o1
                  description: Model name. Must be `kling-o1`.
                prompt:
                  type: string
                  maxLength: 2500
                  description: >-
                    Text prompt. Max 2500 characters. Use `@image_1` /
                    `@element_1` / `@video_1` to refer to specific materials.
                image_url:
                  type: string
                  format: uri
                  description: Optional. First-frame image URL.
                image_end_url:
                  type: string
                  format: uri
                  description: >-
                    Optional. Last-frame image URL. Requires `image_url` —
                    last-frame-only is not supported. Using both frames
                    disallows `image_urls` and `element_ids`.
                ref_imgs:
                  type: array
                  items:
                    type: string
                    format: uri
                  maxItems: 7
                  description: >-
                    Optional reference images. Order is the `@image_N`
                    numbering. `image_urls` is accepted as a compatible alias.
                element_ids:
                  type: array
                  items:
                    type: string
                  description: >-
                    Optional multi-image element ids created through Kling's
                    element library. Video-character elements are not supported
                    by O1 yet. `element_id` is accepted for a single value.
                ref_videos:
                  type: array
                  items:
                    type: string
                    format: uri
                  maxItems: 1
                  description: >-
                    Optional reference video (.mp4 / .mov, 3–10s, 700–2160px).
                    At most one. Named as an array to match the other
                    reference-driven endpoints (`ref_imgs` / `ref_videos` /
                    `ref_audios`), even though only one is allowed. `video_url`
                    is accepted as a compatible alias, and a bare string is
                    accepted too.
                video_type:
                  type: string
                  enum:
                    - feature
                    - base
                  default: feature
                  description: >-
                    Role of `video_url`. `feature` = imitate its motion/style (a
                    first frame may be added, a last frame may not). `base` =
                    edit that video in place (no first or last frame). Requires
                    `ref_videos`.
                duration:
                  type: integer
                  minimum: 3
                  maximum: 10
                  default: 5
                  description: >-
                    Video duration in seconds. ⚠️ When a first frame is given
                    with no `image_urls` and no `video_url`, only 5 or 10 are
                    accepted.
                resolution:
                  type: string
                  enum:
                    - 720p
                    - 1080p
                  default: 720p
                  description: >-
                    Output resolution. O1 has 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. Only used when there is no first frame
                    and no reference video — otherwise the material decides.
                    `aspect_ratio` is accepted as a compatible alias.
                generate_audio:
                  type: boolean
                  default: false
                  description: >-
                    Keep the reference video's original sound. ⚠️ Requires
                    `ref_videos`: O1 cannot generate an audio track, it can only
                    retain an existing one.
                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-o1
              prompt: >-
                @image_1 walks toward the camera as the neon sign flickers
                behind her
              image_url: https://example.com/first-frame.png
              resolution: 1080p
              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

````