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

# Bir Kling Omni videosu oluşturma

> Kling O1 video görevleri oluşturmak ve Omni sorgu rotasıyla durumu takip etmek için CometAPI POST /kling/v1/videos/omni-video kullanın.

Bu endpoint'i, metinden videoya ve ilk kare görsel referanslı üretim dahil olmak üzere, CometAPI tarafından sunulan O1 uyumlu Kling Omni iş akışı için kullanın.

<Note>
  Sağlayıcı parametrelerinin tam referansı için [Kling Omni Video belgelerine](https://kling.ai/document-api/api/video/o1/video-omni) bakın.
</Note>

## Girdi modunu seçin

* Metinden videoya: `prompt`, `mode`, `aspect_ratio` ve `duration` gönderin
* İlk kare görsel referansı: `image_url` ve `type: first_frame` içeren `image_list` öğeleri ekleyin, ardından görsele `prompt` içinde `<<<image_1>>>` olarak referans verin
* Filigranlı çıktı: sorgu yanıtında filigranlı bir video URL'sine ihtiyacınız olduğunda `watermark_info.enabled: true` ekleyin
* Model ID: rota varsayılanını kullanmak için `model_name` alanını atlayın veya `kling-video-o1` ya da `kling-v3-omni` gibi test edilmiş bir Omni Video model ID gönderin

## Süre ve en-boy oranı

| Ayar                                        | Desteklenen değerler  | Varsayılan       | Sınır davranışı                                                                                                                 |
| ------------------------------------------- | --------------------- | ---------------- | ------------------------------------------------------------------------------------------------------------------------------- |
| Metin veya ilk kare videosu için `duration` | `"5"`, `"10"`         | `"5"`            | Değeri string olarak gönderin ve iki sabit üretim uzunluğundan birini kullanın.                                                 |
| `aspect_ratio`                              | `16:9`, `9:16`, `1:1` | `16:9`           | Kareyi kontrol eden bir ilk kare görseli yoksa gereklidir.                                                                      |
| `mode`                                      | `std`, `pro`          | rota varsayılanı | Standart üretim için `std` gönderin; `pro` değerini yalnızca seçtiğiniz model daha yüksek kaliteli modu destekliyorsa kullanın. |

Kling Omni tam bir `size` alanı sunmaz. `aspect_ratio` değerini bir kare biçimi isteği olarak değerlendirin; `16:9` metinden videoya isteği full-HD `1920x1080` olarak oluşturulabilir.

## Görev akışı

<Steps>
  <Step title="Omni görevini oluşturun">
    İsteği gönderin ve döndürülen `task_id` değerini saklayın.
  </Step>

  <Step title="Omni görevini sorgulayın">
    Görev tamamlanana kadar [Bir Kling Omni videosu alın](./omni-query) ile devam edin.
  </Step>

  <Step title="Tamamlanan videoyu kalıcı olarak saklayın">
    Kalıcı erişime ihtiyacınız varsa döndürülen MP4 URL'sini kendi depolamanıza taşıyın.
  </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: >-
                    Optional model ID for this Kling Omni video request. Omit
                    this field to use the route default.
                prompt:
                  type: string
                  description: >-
                    Text prompt describing the desired video. Maximum length is
                    2,500 characters. When you send `image_list`, reference the
                    image with `<<<image_1>>>`.
                image_list:
                  type: array
                  description: >-
                    Optional first-frame image reference for image-referenced
                    Omni generation.
                  items:
                    type: object
                    required:
                      - image_url
                      - type
                    properties:
                      image_url:
                        type: string
                        description: Image URL or Base64 image string.
                      type:
                        type: string
                        description: >-
                          Reference role for this image. Use `first_frame` for
                          the first video frame.
                        enum:
                          - first_frame
                    additionalProperties: false
                sound:
                  type: string
                  description: Whether to generate audio with the video. Use `on` or `off`.
                  enum:
                    - 'on'
                    - 'off'
                  default: 'off'
                mode:
                  type: string
                  description: >-
                    Generation mode. Use `std` for standard generation or `pro`
                    when the selected model supports the higher-quality mode.
                  enum:
                    - std
                    - 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 for text-to-video and first-frame
                    image-reference workflows. Use `5` or `10` as a string.
                  default: '5'
                  enum:
                    - '5'
                    - '10'
                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: std
                aspect_ratio: '16:9'
                duration: '5'
                sound: 'off'
            examples:
              Text to video:
                summary: Kling Omni text-to-video request
                value:
                  model_name: kling-v3-omni
                  prompt: A paper boat drifts across a calm pond at sunrise.
                  mode: std
                  aspect_ratio: '16:9'
                  duration: '5'
                  sound: 'off'
              Image reference:
                summary: Kling Omni first-frame request
                value:
                  model_name: kling-video-o1
                  prompt: Animate <<<image_1>>> with a slow camera move.
                  image_list:
                    - image_url: https://your-image-host/first-frame.png
                      type: first_frame
                  mode: std
                  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: Text to video
          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": "std",
                  "aspect_ratio": "16:9",
                  "duration": "5",
                  "sound": "off"
                }'
        - lang: Python
          label: Text to video
          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": "std",
                  "aspect_ratio": "16:9",
                  "duration": "5",
                  "sound": "off"
                },
            )

            result = response.json()
            print(result.get("code"), result.get("data", {}).get("task_id"))
        - lang: JavaScript
          label: Text to video
          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": "std",
                "aspect_ratio": "16:9",
                "duration": "5",
                "sound": "off"
              }),
            });


            const result = await response.json();

            console.log(result.code, result.data?.task_id);
        - lang: Shell
          label: Image reference
          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-video-o1",
                  "prompt": "Animate <<<image_1>>> with a slow camera move.",
                  "image_list": [
                    {
                      "image_url": "https://your-image-host/first-frame.png",
                      "type": "first_frame"
                    }
                  ],
                  "mode": "std",
                  "aspect_ratio": "16:9",
                  "duration": "5",
                  "sound": "off"
                }'
        - lang: Python
          label: Image reference
          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-video-o1",
                  "prompt": "Animate <<<image_1>>> with a slow camera move.",
                  "image_list": [
                    {
                      "image_url": "https://your-image-host/first-frame.png",
                      "type": "first_frame"
                    }
                  ],
                  "mode": "std",
                  "aspect_ratio": "16:9",
                  "duration": "5",
                  "sound": "off"
                },
            )

            result = response.json()
            print(result.get("code"), result.get("data", {}).get("task_id"))
        - lang: JavaScript
          label: Image reference
          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-video-o1",
                "prompt": "Animate <<<image_1>>> with a slow camera move.",
                "image_list": [
                  {
                    "image_url": "https://your-image-host/first-frame.png",
                    "type": "first_frame"
                  }
                ],
                "mode": "std",
                "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.

````