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

# Create a Kling Omni video

> Use CometAPI POST /kling/v1/videos/omni-video to create Kling O1 video tasks and track status with the Omni query route.

Use this endpoint for the O1-compatible Kling Omni workflow exposed by CometAPI, including plain text-to-video, image-referenced generation, and video transformation flows.

<Note>
  For the complete provider parameter reference, see the [Kling Omni Video documentation](https://kling.ai/document-api/api/video/o1/video-omni).
</Note>

## Choose the input mode

* Text-to-video: send `prompt`, `mode`, `aspect_ratio`, and `duration`
* Image-referenced generation: add `image_list` items with `image_url` and `type` such as `first_frame`
* Element-guided generation: add `element_list` items with `element_id`
* Video transformation: add `video_list` items with `video_url`, `refer_type`, and optional `keep_original_sound` set to `yes` or `no`
* Multi-shot generation: set `multi_shot: true`, choose `shot_type`, and send either `prompt` or `multi_prompt`
* Keep `model_name` as `kling-video-o1` or `kling-v3-omni`, or omit it to use the route default

## Duration and aspect ratio

| Setting                                  | Supported values                            | Default      | Boundary behavior                                                            |
| ---------------------------------------- | ------------------------------------------- | ------------ | ---------------------------------------------------------------------------- |
| `duration` for text or first-frame video | `"5"`, `"10"`                               | `"5"`        | Send the value as a string and use one of the two fixed generation lengths.  |
| `duration` with reference video input    | input video length from `3` to `10` seconds | input length | The generated duration follows the base video and ignores the request value. |
| `aspect_ratio`                           | `16:9`, `9:16`, `1:1`                       | `16:9`       | Required when no first-frame image or base video controls the frame.         |
| `mode`                                   | `std`, `pro`                                | `pro`        | `pro` is the default for Omni Video.                                         |

Kling Omni does not expose an exact `size` field. Treat `aspect_ratio` as a frame-shape request; a `16:9` text-to-video request can render as full-HD `1920x1080`.

## Task flow

<Steps>
  <Step title="Create the Omni task">
    Submit the request and store the returned `task_id`.
  </Step>

  <Step title="Poll the Omni task">
    Continue with [Get a Kling Omni video](./omni-query) until the task finishes.
  </Step>

  <Step title="Persist the finished video">
    Move the returned MP4 URL into your own storage if you need durable access.
  </Step>
</Steps>


## OpenAPI

````yaml api/openapi/video/kling/post-omni-video.openapi.json POST /kling/v1/videos/omni-video
openapi: 3.1.0
info:
  title: Omni Video API (Beta)
  version: 1.0.0
servers:
  - url: https://api.cometapi.com
security:
  - bearerAuth: []
paths:
  /kling/v1/videos/omni-video:
    post:
      summary: Omni Video (Beta)
      operationId: omni_video
      parameters:
        - name: Content-Type
          in: header
          required: false
          description: Content type of the request body.
          schema:
            type: string
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - prompt
              properties:
                model_name:
                  type: string
                  description: Omni Video model. Omit to use `kling-video-o1`.
                  default: kling-video-o1
                  enum:
                    - kling-video-o1
                    - kling-v3-omni
                multi_shot:
                  type: boolean
                  description: >-
                    Whether to generate a multi-shot video. When `true`, use
                    `shot_type` and either `prompt` or `multi_prompt` according
                    to the selected storyboard method.
                  default: false
                shot_type:
                  type: string
                  description: >-
                    Storyboard method for multi-shot generation. Required when
                    `multi_shot` is `true`.
                  enum:
                    - customize
                    - intelligence
                prompt:
                  type: string
                  description: >-
                    Text prompt describing the desired video. Max 2500
                    characters. Reference images or elements inline using
                    `<<<image_1>>>`, `<<<element_1>>>`, `<<<video_1>>>` syntax.
                multi_prompt:
                  type: array
                  description: >-
                    Storyboard prompts for `multi_shot: true` with `shot_type:
                    customize`. Supports 1 to 6 storyboard items; item durations
                    should add up to the requested total duration.
                  minItems: 1
                  maxItems: 6
                  items:
                    type: object
                    required:
                      - index
                      - prompt
                      - duration
                    properties:
                      index:
                        type: integer
                        description: Storyboard sequence number.
                      prompt:
                        type: string
                        description: >-
                          Prompt for this storyboard item. Maximum 512
                          characters.
                      duration:
                        type: string
                        description: Duration in seconds for this storyboard item.
                    additionalProperties: false
                image_list:
                  type: array
                  description: >-
                    Optional image references for image-referenced Omni
                    generation.
                  items:
                    type: object
                    properties:
                      image_url:
                        type: string
                        description: Image URL or base64 image string.
                      type:
                        type: string
                        description: >-
                          Frame role for the image. Use `first_frame` for a
                          starting frame or `end_frame` for an ending frame.
                        enum:
                          - first_frame
                          - end_frame
                element_list:
                  type: array
                  description: >-
                    Optional element references for element-guided Omni
                    generation.
                  items:
                    type: object
                    properties:
                      element_id:
                        type: string
                        description: >-
                          Element id referenced from the prompt, such as
                          `<<<element_1>>>`.
                video_list:
                  type: array
                  description: >-
                    Optional video references for video transformation
                    workflows.
                  items:
                    type: object
                    properties:
                      video_url:
                        type: string
                        description: Video URL for the reference clip.
                      refer_type:
                        type: string
                        description: Reference role, such as `base`.
                      keep_original_sound:
                        type: string
                        description: >-
                          Whether to keep the original audio from the reference
                          video. Use `yes` or `no`.
                        enum:
                          - 'yes'
                          - 'no'
                sound:
                  type: string
                  description: >-
                    Whether to generate audio with the video. Use `on` or `off`;
                    when `video_list` is present, use `off`.
                  enum:
                    - 'on'
                    - 'off'
                  default: 'off'
                mode:
                  type: string
                  description: >-
                    Generation mode. `std` (standard, faster and more
                    cost-effective) or `pro` (professional, higher quality
                    output). The default is `pro`.
                  enum:
                    - std
                    - pro
                  default: pro
                aspect_ratio:
                  type: string
                  description: >-
                    Aspect ratio request for beta Kling Omni generation. The
                    endpoint does not expose an exact size field; a 16:9
                    text-to-video request can render as 1920x1080.
                  enum:
                    - '16:9'
                    - '9:16'
                    - '1:1'
                duration:
                  type: string
                  description: >-
                    Requested output length. Use `5` or `10` as a string for
                    text, image, and first-frame workflows; base-video workflows
                    follow the source video length.
                  default: '5'
                  enum:
                    - '3'
                    - '4'
                    - '5'
                    - '6'
                    - '7'
                    - '8'
                    - '9'
                    - '10'
                    - '11'
                    - '12'
                    - '13'
                    - '14'
                    - '15'
                watermark_info:
                  type: object
                  description: >-
                    Watermark options. When `enabled` is `true`, the task can
                    return watermarked result URLs in addition to original
                    result URLs.
                  properties:
                    enabled:
                      type: boolean
                      description: Whether to request watermarked result URLs.
                  additionalProperties: false
                callback_url:
                  type: string
                  description: >-
                    Webhook URL for task status notifications. The server sends
                    a callback when the task status changes.
                  format: uri
                external_task_id:
                  type: string
                  description: >-
                    Optional user-defined task ID for your own tracking. Does
                    not replace the system-generated task ID. Must be unique per
                    account.
              default:
                model_name: kling-v3-omni
                prompt: A paper boat drifts across a calm pond at sunrise
                mode: pro
                aspect_ratio: '16:9'
                duration: '5'
                sound: 'off'
            examples:
              Default:
                summary: Kling V3 Omni video request
                value:
                  model_name: kling-v3-omni
                  prompt: A paper boat drifts across a calm pond at sunrise
                  mode: pro
                  aspect_ratio: '16:9'
                  duration: '5'
                  sound: 'off'
      responses:
        '200':
          description: Success
          content:
            application/json:
              schema:
                type: object
                required:
                  - code
                  - message
                  - data
                properties:
                  code:
                    type: integer
                    description: Response code. `0` means the task request was accepted.
                  message:
                    type: string
                    description: Response message.
                  request_id:
                    type: string
                    description: Request identifier returned by CometAPI when present.
                  data:
                    type: object
                    required:
                      - task_id
                      - task_status
                      - task_info
                      - created_at
                      - updated_at
                    properties:
                      task_id:
                        type: string
                        description: Task ID generated by the system.
                      task_status:
                        type: string
                        description: Task status.
                        enum:
                          - submitted
                          - processing
                          - succeed
                          - failed
                      task_info:
                        type: object
                        description: >-
                          Task metadata, including `external_task_id` when
                          supplied.
                        properties:
                          external_task_id:
                            type:
                              - string
                              - 'null'
                        additionalProperties: true
                      task_status_msg:
                        type:
                          - string
                          - 'null'
                        description: Status details when present.
                      created_at:
                        type: integer
                        description: >-
                          Task creation time as a Unix timestamp in
                          milliseconds.
                      updated_at:
                        type: integer
                        description: Task update time as a Unix timestamp in milliseconds.
                    additionalProperties: true
                additionalProperties: true
                example:
                  code: 0
                  message: SUCCEED
                  data:
                    task_id: <task_id>
                    task_status: submitted
                    task_info:
                      external_task_id: null
                    task_status_msg: null
                    created_at: 1773366840306
                    updated_at: 1773366840306
      x-codeSamples:
        - lang: Shell
          label: Default
          source: |
            curl https://api.cometapi.com/kling/v1/videos/omni-video \
              -H "Authorization: Bearer $COMETAPI_KEY" \
              -H "Content-Type: application/json" \
              -d '{
                  "model_name": "kling-v3-omni",
                  "prompt": "A paper boat drifts across a calm pond at sunrise",
                  "mode": "pro",
                  "aspect_ratio": "16:9",
                  "duration": "5",
                  "sound": "off"
                }'
        - lang: Python
          label: Default
          source: |
            import os
            import requests

            response = requests.post(
                "https://api.cometapi.com/kling/v1/videos/omni-video",
                headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
                json={
                  "model_name": "kling-v3-omni",
                  "prompt": "A paper boat drifts across a calm pond at sunrise",
                  "mode": "pro",
                  "aspect_ratio": "16:9",
                  "duration": "5",
                  "sound": "off"
                },
            )

            result = response.json()
            print(result.get("code"), result.get("data", {}).get("task_id"))
        - lang: JavaScript
          label: Default
          source: >
            const response = await
            fetch("https://api.cometapi.com/kling/v1/videos/omni-video", {
              method: "POST",
              headers: {
                Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
                "Content-Type": "application/json",
              },
              body: JSON.stringify({
                "model_name": "kling-v3-omni",
                "prompt": "A paper boat drifts across a calm pond at sunrise",
                "mode": "pro",
                "aspect_ratio": "16:9",
                "duration": "5",
                "sound": "off"
              }),
            });


            const result = await response.json();

            console.log(result.code, result.data?.task_id);
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: Bearer token authentication. Use your CometAPI key.

````