Text to Video
Create Task
Please note that in order to maintain naming consistency, the original model field has been changed to model_name, so in the future, please use this field to specify the version of the model that needs to be called.
At the same time, we keep the behavior forward-compatible. If you continue to use the original model field, it will not have any impact on the interface call, there will not be any exception, which is equivalent to the default behavior when model_name is empty (i.e., call the V1 model).
Request Header
Data Exchange Format
Authentication information, refer to API authorization
Request Body
Model Name
Whether to generate multi-shot video
When true: the prompt parameter is invalid, and the first/end frame generation is not supported.
When false: the shot_type and multi_prompt parameters are invalid
Storyboard method
When multi_shot is true, this parameter is required
Positive text prompt
The Omni model can achieve various capabilities through Prompt with elements, images, videos, and other content:
- Specify elements/images/videos using <<<>>> format, e.g.: <<<element_1>>>, <<<image_1>>>, <<<video_1>>>
- For detailed capabilities, see: KLING Omni Model User Guide, Kling VIDEO 3.0 Omni Model User Guide
- Cannot exceed 2500 characters
- Use <<<voice_1>>> to specify voice, same sequence as voice_list. Up to 2 voices; when specifying voice, sound must be on. Simpler grammar is better. For example: The man <<<voice_1>>> said, "Hello.".
- When voice_list is not empty and prompt references voice ID, task is billed as "with voice generation".
- When multi_shot is false or shot_type is intelligence, this parameter must not be empty.
The support range for different model versions and video modes varies. For details, see Capability Map
Each storyboard cue can include both positive and negative descriptions
Define the shot sequence number, corresponding prompt word, and duration through the index, prompt, and duration parameters, where:
- Supports up to 6 storyboards, with a minimum of 1 storyboard.
- The maximum length of the prompt for each storyboard 512 characters.
- The duration of each storyboard should not exceed the total duration, but should not be less than 1.
- The sum of the durations of all storyboards equals the total duration of the current task.
Load with key:value format as follows:
When multi_shot is true and shot_type is customize, this parameter is required.
Negative text prompt
- Cannot exceed 2500 characters
- It is recommended to supplement negative prompt via negative sentences within positive prompts
Is sound generated simultaneously when generating videos
The support range for different model versions and video modes varies. For details, see Capability Map
The degree of freedom for generating video; the larger the value, the smaller the degree of freedom of the model
- Value range: [0, 1]
kling-v2.x models do not support this parameter
Video generation mode
- std: Standard mode, basic mode, cost-effective
- pro: Expert mode (high quality), high performance mode, better video quality
The support range for different model versions and video modes varies. For details, see Capability Map
Terms of controlling camera movement (if not specified, the model will intelligently match based on the input text/images)
The support range for different model versions and video modes varies. For details, see Capability Map
Predefined camera movements type
- simple: Simple camera movement, you can choose one of six options in "config"
- down_back: Camera descends and moves backward ➡️ Pan down and zoom out. The config parameter must be set to "None" under this type.
- forward_up: Camera moves forward and tilts up ➡️ Zoom in and pan up. The config parameter must be set to "None" under this type.
- right_turn_forward: Rotate right then move forward ➡️ Rotate right and advance. The config parameter must be set to "None" under this type.
- left_turn_forward: Rotate left then move forward ➡️ Rotate left and advance. The config parameter must be set to "None" under this type.
Contains 6 fields, used to specify the camera's movement or change in different directions
- Required when type is simple, not required for other types
- Choose 1 of the following 6 parameters, only one can be non-zero, others must be 0
Horizontal, controls the camera's movement along the horizontal axis (translation along the x-axis)
- Value range: [-10, 10]
- Negative value indicates a translation to the left, positive value indicates a translation to the right
Vertical, controls the camera's movement along the vertical axis (translation along the y-axis)
- Value range: [-10, 10]
- Negative value indicates a downward translation, positive value indicates an upward translation
Pan, controls the camera's rotation in the horizontal plane (rotation around the y-axis)
- Value range: [-10, 10]
- Negative value indicates rotation to the left around y-axis, positive value indicates rotation to the right around y-axis
Tilt, controls the camera's rotation in the vertical plane (rotation around the x-axis)
- Value range: [-10, 10]
- Negative value indicates rotation down around x-axis, positive value indicates rotation up around x-axis
Roll, controls the camera's roll (rotation around the z-axis)
- Value range: [-10, 10]
- Negative value indicates counterclockwise rotation around z-axis, positive value indicates clockwise rotation around z-axis
Zoom, controls the camera's focal length change, affecting the distance of the field of view
- Value range: [-10, 10]
- Negative value indicates longer focal length, smaller field of view; positive value indicates shorter focal length, larger field of view
The aspect ratio of the generated video frame (width:height)
Video Length, unit: s (seconds)
The support range for different model versions and video modes varies. For details, see Capability Map
Whether to generate watermarked results simultaneously
- Defined by the enabled parameter, format:
- true: generate watermarked result, false: do not generate
- Custom watermarks are not currently supported
Callback notification URL for this task result. If configured, the server will actively notify when the task status changes
- For specific message schema, see Callback Protocol
Customized Task ID
- Users can provide a customized task ID, which will not overwrite the system-generated task ID but can be used for task queries
- Must be unique within a single user account
More Scene Invocation Examples
Text To Video with Multiple Shot
Query Task (Single)
Request Header
Data Exchange Format
Authentication information, refer to API authentication
Path Parameters
Task ID for text-to-video. Fill the value directly in the request path. Choose either task_id or external_task_id for querying.
Customized Task ID for text-to-video. Fill the value directly in the request path. Choose either task_id or external_task_id for querying.
Query Task (List)
Request Header
Data Exchange Format
Authentication information, refer to API authentication
Query Parameters
Page number
- Value range: [1, 1000]
Number of items per page
- Value range: [1, 500]