Skip to main content
POST
Kling Omni Video Task

Authorizations

Authorization
string
header
required

Pass Authorization: Bearer <token> in the request header.

Headers

Content-Type
string
default:application/json
required

Data exchange format

Body

application/json
model_name
enum<string>
required

Model name

Available options:
kling-video-o1
prompt
string
required

Text prompt, can include positive and negative descriptions.

  • Prompts can be templated to meet different video generation needs
  • Must not exceed 2,500 characters

Must not be empty when multi_shot is false, or when multi_shot is true and shot_type is intelligence.

Maximum string length: 2500
multi_shot
boolean
default:false

Whether to generate a multi-shot video. When this parameter is true, the prompt parameter is invalid. When this parameter is false, the shot_type and multi_prompt parameters are invalid.

shot_type
enum<string>

Shot type. Required when multi_shot is true.

Available options:
customize,
intelligence
multi_prompt
object[]

Multi-shot information including prompt, duration, etc. Define shot index and corresponding prompt and duration via index, prompt, duration parameters.

  • Max 6 shots, min 1 shot.
  • Max length per shot content: 512 characters.
  • Each shot duration must not exceed total task duration and must be >= 1.
  • Sum of all shot durations must equal total task duration.

When multi_shot is true and shot_type is customize, this parameter must not be empty. Format:

Required array length: 1 - 6 elements
image_list
object[]

Reference image list, including subject, scene, style reference images

  • Includes subject, scene, style reference images; can also be used as first/last frame for video generation:
    • Use the type parameter to define whether an image is a first/last frame: first_frame for start frame, end_frame for end frame:
      • If an image is not a first or last frame, do not configure the type parameter
      • End-frame-only is not currently supported; must have a first-frame image when using end-frame
    • When using first frame or first/last frame video generation, video editing features cannot be used

Use key:value format:

Image requirements:

  • Supports image Base64 encoding or image URL (must be accessible)
  • Format: .jpg / .jpeg / .png
  • File size: ≤10MB
  • Dimensions: width and height both at least 300px, aspect ratio 1:2.5 ~ 2.5:1
  • Number of reference images depends on number and type of reference elements:
    • No reference video + only multi-image elements: total of images + multi-image elements must not exceed 7

Quantity limits:

  • Number of reference images depends on number and type of reference elements:
    • No reference video + only multi-image elements: total of images + multi-image elements must not exceed 7
    • No reference video + with video elements: total of images + multi-image elements must not exceed 4
    • With reference video + only multi-image elements: total of images + multi-image elements must not exceed 4
  • When using kling-video-o1 model, first/last frame is not supported when array has more than 2 images
  • image_url parameter value must not be empty
element_list
object[]

Element reference list, configured based on element IDs in the element library.

  • Use key:value format:
  • Elements are divided into video custom elements (video character elements) and image custom elements (multi-image elements), with different applicable scopes
  • Number of reference elements depends on element type, whether there is a reference video, number of reference images, etc.:
    • When using first frame or first/last frame video generation, kling-v3-omni supports up to 3 elements
    • When using first/last frame video generation, kling-video-o1 does not support elements
    • No reference video + only multi-image elements: total of reference images + multi-image elements must not exceed 7
    • No reference video + only video character elements: video character elements must not exceed 3
    • No reference video + both video character and multi-image elements: video character elements <= 3, reference images + multi-image elements <= 4
    • With reference video + only multi-image elements: reference images + multi-image elements <= 4
    • With reference video: video character elements not supported
video_list
object[]

Reference video, obtained via URL.

Video types:

  • Can be used as a feature reference video or as a video to be edited; defaults to video to be edited
  • Use refer_type parameter to distinguish: feature for feature reference video, base for video to be edited
  • When the reference video is a video to be edited, video first/last frames cannot be defined
  • Use keep_original_sound to choose whether to keep original audio: yes to keep, no to discard (also applies to feature type)

When there is a reference video, the sound parameter can only be 'off'.

Use key:value format:

Video requirements:

  • Format: only MP4/MOV supported
  • Duration: at least 3 seconds; upper limit depends on model version, see capability map
  • Resolution: 720px-2160px (width and height)
  • Frame rate: 24-60fps (output will be 24fps)
  • At most 1 video, size ≤200MB
  • video_url parameter value must not be empty
Maximum array length: 1
sound
enum<string>
default:off

Whether to also generate audio when creating the video.

Available options:
on,
off
mode
enum<string>
default:pro

Video generation mode

  • std: Standard mode, cost-effective, output video resolution 720P.
  • pro: Expert mode (high quality), better video quality, output video resolution 1080P.
Available options:
std,
pro
aspect_ratio
enum<string>

Aspect ratio of generated video frames (width:height)

  • Required when not using first-frame reference or video editing features.
Available options:
1:1,
16:9,
9:16
duration
enum<string>
default:5

Generated video duration in seconds.

  • When using video editing ("refer_type":"base"), the output matches the input video duration; this parameter is ignored and billing is based on the input video duration rounded to the nearest integer.
Available options:
3,
4,
5,
6,
7,
8,
9,
10
watermark_info
object

Whether to also generate a watermarked result.

callback_url
string

Callback notification URL for this task. If configured, the server will proactively notify when the task status changes.

external_task_id
string

Custom task ID.

  • Does not override the system-generated task ID, but supports querying by this ID.
  • Must be unique per user.

Response

200 - application/json

Task accepted.

code
integer

Error code; see error codes for details.

message
string

Error message.

request_id
string

Request ID, system-generated, used for request tracking and troubleshooting.

data
object