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

# Create video

> Create a Kling video task.

**Path:** `POST https://api.omniall.ai/v1/videos`

Text-to-video vs image-to-video: if `image` / `images` / `input_reference` / `metadata.last_frame_*` / reference video is present → image-to-video; else text-to-video.

Auth: `Authorization: Bearer sk-...`



## OpenAPI

````yaml openapi/kling-video.yaml POST /v1/videos
openapi: 3.1.0
info:
  title: Omniall AI — Kling video
  version: 1.0.0
  description: >-
    Kling async video via OpenAI-style Video API.


    **Create:** `POST https://api.omniall.ai/v1/videos`


    **Poll:** `GET /v1/videos/{task_id}` · **Download:** `GET
    /v1/videos/{task_id}/content`


    Model aliases (case-insensitive). See [Model
    Square](https://omniall.ai/pricing).


    **Duration priority:** top-level `seconds` > top-level `duration` >
    `metadata.seconds` / `metadata.duration` / `metadata.video_duration` >
    default **5**.


    **Resolution priority:** `metadata.output_config.resolution` >
    `metadata.resolution` > top-level `size` > default **720P**.


    Auth: `Authorization: Bearer sk-...`
servers:
  - url: https://api.omniall.ai
security: []
paths:
  /v1/videos:
    post:
      tags:
        - Kling
      summary: Create video
      description: >-
        Create a Kling video task.


        **Path:** `POST https://api.omniall.ai/v1/videos`


        Text-to-video vs image-to-video: if `image` / `images` /
        `input_reference` / `metadata.last_frame_*` / reference video is present
        → image-to-video; else text-to-video.


        Auth: `Authorization: Bearer sk-...`
      operationId: klingCreateVideo
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
          description: Bearer API key, e.g. `Bearer sk-...`.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/KlingCreateRequest'
            examples:
              t2v_720p:
                summary: Text-to-video (720P)
                value:
                  model: kling-2.6
                  prompt: Cyberpunk city night, slow camera push-in, cinematic
                  seconds: '5'
                  metadata:
                    output_config:
                      resolution: 720P
                      aspect_ratio: '16:9'
              t2v_1080p_mute:
                summary: Text-to-video 1080P (mute)
                value:
                  model: kling-3.0
                  prompt: Eagle circling above snowy mountain peaks
                  seconds: '10'
                  metadata:
                    output_config:
                      duration: 10
                      resolution: 1080P
                      aspect_ratio: '16:9'
                      audio_generation: Disabled
              t2v_with_audio:
                summary: Text-to-video with audio
                value:
                  model: kling-2.5
                  prompt: Street band playing jazz, crowd watching
                  seconds: '10'
                  metadata:
                    output_config:
                      duration: 10
                      resolution: 1080P
                      aspect_ratio: '16:9'
                      audio_generation: Enabled
              i2v_single:
                summary: Single image-to-video
                value:
                  model: Kling-2.5
                  prompt: Make the character walk forward and smile, natural light
                  image: https://example.com/character.png
                  seconds: '5'
                  metadata:
                    output_config:
                      duration: 5
                      resolution: 720P
                      aspect_ratio: '9:16'
                      audio_generation: Disabled
              i2v_multi:
                summary: Multi-image reference
                value:
                  model: Kling-3.0-Omni
                  prompt: >-
                    Image 1 is character Chen Zhou; image 2 is a dark void
                    system space; camera moves from far to near
                  images:
                    - https://example.com/role.png
                    - https://example.com/scene.png
                  seconds: '15'
                  metadata:
                    output_config:
                      duration: 15
                      resolution: 1080P
                      aspect_ratio: '9:16'
              portrait_size:
                summary: Portrait via size
                value:
                  model: kling-3.0-omni
                  prompt: Character slowly turns in front of a blue panel
                  seconds: '15'
                  size: 720x1280
                  metadata:
                    output_config:
                      duration: 15
                      resolution: 720P
                      aspect_ratio: '9:16'
                      audio_generation: Enabled
              first_last_frame:
                summary: First / last frame
                value:
                  model: Kling-3.0
                  prompt: Smooth transition from the first frame to the last frame
                  image: https://example.com/first.png
                  seconds: '8'
                  metadata:
                    last_frame_url: https://example.com/last.png
                    output_config:
                      duration: 8
                      resolution: 1080P
                      aspect_ratio: '16:9'
                      audio_generation: Enabled
              motion_std:
                summary: Motion control (std)
                value:
                  model: Kling-2.6
                  prompt: Character follows the motion in the reference video
                  seconds: '5'
                  metadata:
                    scene_type: motion_control
                    motion_level: std
                    video_url: https://example.com/motion-ref.mp4
                    output_config:
                      duration: 5
                      resolution: 720P
                      aspect_ratio: '16:9'
              motion_pro:
                summary: Motion control (pro)
                value:
                  model: Kling-2.6
                  prompt: Dancer recreates advanced moves from the reference video
                  seconds: '10'
                  metadata:
                    scene_type: motion_control
                    motion_level: pro
                    video_url: https://example.com/dance-ref.mp4
                    output_config:
                      duration: 10
                      resolution: 1080P
                      aspect_ratio: '16:9'
              avatar:
                summary: Digital human (avatar)
                value:
                  model: kling-avatar-1080p
                  prompt: Digital human presenting today's news, natural expression
                  image: https://example.com/avatar-face.png
                  seconds: '5'
                  metadata:
                    scene_type: avatar_i2v
                    output_config:
                      duration: 5
                      resolution: 720P
                      aspect_ratio: '9:16'
              lip_sync:
                summary: Lip sync
                value:
                  model: kling-identify-face
                  prompt: Character lip-sync with the audio
                  image: https://example.com/face.png
                  seconds: '4'
                  metadata:
                    scene_type: lip_sync
                    output_config:
                      duration: 4
              ref_video_file_infos:
                summary: Reference video (file_infos)
                value:
                  model: Kling-3.0-Omni
                  prompt: Generate a shot in the same style as the reference video
                  seconds: '5'
                  metadata:
                    file_infos:
                      - type: Url
                        category: Video
                        url: https://example.com/ref-video.mp4
                        reference_type: feature
                    output_config:
                      duration: 5
                      resolution: 720P
                      aspect_ratio: '16:9'
                      audio_generation: Disabled
              motion_file_infos:
                summary: Motion control + file_infos
                value:
                  model: Kling-3.0-Omni
                  prompt: Make the character move following the reference video
                  seconds: '5'
                  metadata:
                    scene_type: motion_control
                    motion_level: pro
                    file_infos:
                      - type: Url
                        category: Video
                        url: https://example.com/motion-ref.mp4
                    output_config:
                      duration: 5
                      resolution: 720P
                      aspect_ratio: '16:9'
              multi_shot_ext_info:
                summary: Multi-shot (ext_info)
                value:
                  model: Kling-3.0
                  seconds: '5'
                  metadata:
                    file_infos:
                      - type: Url
                        category: Image
                        url: https://example.com/ref-image.png
                    output_config:
                      duration: 5
                      resolution: 720P
                      aspect_ratio: '16:9'
                      input_compliance_check: Disabled
                    ext_info: >-
                      {"AdditionalParameters":"{\"multi_prompt\":[{\"index\":1,\"prompt\":\"Woman
                      dancing\",\"duration\":\"2\"},{\"index\":2,\"prompt\":\"Woman
                      jumps
                      up\",\"duration\":\"3\"}],\"shot_type\":\"customize\",\"multi_shot\":true}"}
              content_array:
                summary: content array style
                value:
                  model: kling-3.0-omni
                  seconds: '10'
                  content:
                    - type: text
                      text: Character slowly turns in front of a system panel
                  images:
                    - https://example.com/ref.png
                  metadata:
                    output_config:
                      duration: 10
                      resolution: 720P
                      aspect_ratio: '9:16'
                      audio_generation: Enabled
      responses:
        '200':
          description: Task accepted
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/KlingTask'
              example:
                id: task_xxxxxxxx
                task_id: task_xxxxxxxx
                object: video
                model: kling-2.5-720p
                status: queued
                progress: 0
                created_at: 1780891541
components:
  schemas:
    KlingCreateRequest:
      type: object
      required:
        - model
      description: Kling create-video body.
      properties:
        model:
          type: string
          description: >-
            Model alias (case-insensitive). Generation: `kling-1.0` …
            `kling-3.0-omni`, `kling-o1`. Specialty: `kling-identify-face`,
            `kling-avatar-720p`, `kling-avatar-1080p`.
          example: kling-2.5
        prompt:
          type: string
          description: Text prompt (required for most scenarios).
        seconds:
          type: string
          description: >-
            Duration in seconds as string, e.g. `"5"`, `"10"`. Highest priority
            for duration.
          example: '5'
        duration:
          oneOf:
            - type: number
            - type: string
          description: Duration in seconds; ignored if top-level `seconds` is set.
        size:
          type: string
          description: >-
            Size shortcut, e.g. `720x1280`, `720P`, `1080P`. Can imply
            resolution + aspect ratio.
          example: 720x1280
        image:
          type: string
          description: Single reference image URL.
        images:
          type: array
          items:
            type: string
          description: >-
            Multi reference image URLs (max 3). Prefer `images` for Omni
            referenced billing.
          maxItems: 3
        input_reference:
          type: string
          description: Reference image URL (similar to `image`).
        mode:
          type: string
          description: e.g. `pro` for motion-control Pro tier.
          example: pro
        content:
          type: array
          description: >-
            OpenAI-style multimodal content. Text is taken from `type=text`
            parts.
          items:
            type: object
            properties:
              type:
                type: string
                description: text / image_url / video_url …
              text:
                type: string
              image_url:
                type: object
                properties:
                  url:
                    type: string
        metadata:
          $ref: '#/components/schemas/KlingMetadata'
    KlingTask:
      type: object
      properties:
        id:
          type: string
        task_id:
          type: string
        object:
          type: string
          example: video
        model:
          type: string
          description: Concrete billing tier name.
        status:
          type: string
          description: >-
            queued / pending / processing / in_progress / completed / failed /
            cancelled
        progress:
          type: integer
        created_at:
          type: integer
        completed_at:
          type: integer
        seconds:
          type: string
        size:
          type: string
        video_url:
          type: string
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
    KlingMetadata:
      type: object
      description: Kling extended options.
      properties:
        scene_type:
          type: string
          enum:
            - motion_control
            - avatar_i2v
            - lip_sync
          description: >-
            Scene type. Omit for normal T2V/I2V. `motion_control` requires a
            public reference video.
        motion_level:
          type: string
          enum:
            - std
            - pro
          description: 'Motion-control tier (default `std`). Also `mode: "pro"`.'
        video_url:
          type: string
          description: >-
            Reference video URL (required for motion_control; also usable for
            Omni).
        last_frame_url:
          type: string
          description: Last-frame image URL (first/last frame).
        last_frame_file_id:
          type: string
          description: Last-frame file id.
        file_infos:
          type: array
          maxItems: 3
          description: Structured file inputs (max 3).
          items:
            $ref: '#/components/schemas/KlingFileInfo'
        ext_info:
          type: string
          description: >-
            Advanced extension JSON **string** (not object), e.g. multi-shot for
            kling-3.0 / omni.
        output_config:
          $ref: '#/components/schemas/KlingOutputConfig'
        resolution:
          type: string
          description: Resolution shortcut (= `output_config.resolution`).
        audio_generation:
          type: string
          enum:
            - Enabled
            - Disabled
          description: Audio shortcut (= `output_config.audio_generation`).
        audio:
          type: boolean
          description: '`true` enables audio.'
        seconds:
          type: string
        duration:
          oneOf:
            - type: number
            - type: string
        video_duration:
          oneOf:
            - type: number
            - type: string
        mode:
          type: string
    KlingFileInfo:
      type: object
      properties:
        type:
          type: string
          enum:
            - File
            - Url
          description: Url requires `url`; File requires `file_id`.
        category:
          type: string
          enum:
            - Image
            - Video
        url:
          type: string
        file_id:
          type: string
        usage:
          type: string
          description: e.g. FirstFrame / Reference.
        reference_type:
          type: string
          enum:
            - feature
            - base
          description: Video reference type.
    KlingOutputConfig:
      type: object
      properties:
        duration:
          type: number
          description: Output duration in seconds; keep aligned with top-level `seconds`.
          example: 5
        resolution:
          type: string
          enum:
            - 720P
            - 1080P
          description: Default 720P.
        aspect_ratio:
          type: string
          enum:
            - '16:9'
            - '9:16'
            - '1:1'
          description: T2V default 16:9.
        audio_generation:
          type: string
          enum:
            - Enabled
            - Disabled
          description: Default Disabled (mute).
        storage_mode:
          type: string
          enum:
            - Permanent
            - Temporary
        media_name:
          type: string
          maxLength: 64
        class_id:
          type: integer
        expire_time:
          type: string
          description: ISO 8601.
        person_generation:
          type: string
          enum:
            - AllowAdult
            - Disallowed
        input_compliance_check:
          type: string
          enum:
            - Enabled
            - Disabled
        output_compliance_check:
          type: string
          enum:
            - Enabled
            - Disabled
        enhance_switch:
          type: string
          enum:
            - Enabled
            - Disabled

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.