Create task POST /kling/v1/videos/text2videoBearer authentication in the form Bearer YOUR_API_KEY.
Content-Type string
default: "application/json"
required
Data exchange format. Use application/json.
Request body Positive prompt, up to 2,500 characters.
Content to avoid, up to 2,500 characters.
Up to two voices. Each item contains a voice_id returned by Voice management. Reference them as <<<voice_1>>> and <<<voice_2>>> in list order, and set sound to on.
on or off. Must be on when voice_list is used.
std for 720p or pro for 1080p.
Fixed duration: 5 or 10 seconds.
Preset or custom camera movement.
Use enabled to request an additional watermarked result.
Camera control camera_control.type supports simple, down_back, forward_up, right_turn_forward, and left_turn_forward. In simple mode, set one nonzero property in config: horizontal, vertical, pan, tilt, roll, or zoom. Each property ranges from -10 to 10.Create response Object type, always video.
Public model ID used for the task.
Initial status, always queued.
Initial progress, always 0.
Creation time as a Unix timestamp in seconds.
Query task by ID GET /kling/v1/videos/text2video/{task_id}Bearer authentication in the form Bearer YOUR_API_KEY.
Content-Type string
default: "application/json"
required
Data exchange format. Use application/json.
Path parameters The text-to-video task ID returned by the create endpoint.
Task result 0 indicates that the query succeeded.
Error information; empty for a successful query.
submitted, processing, succeed, or failed.
Failure details when the task fails.
Generated videos, returned after success.
data.task_result.videos[].url Temporary generated-video URL.
data.task_result.videos[].duration Actual duration in seconds.
Creation Unix timestamp in milliseconds.
Last update Unix timestamp in milliseconds.
Generated result URLs are removed after 30 days. Save the files promptly.
Create task POST /kling/v1/videos/image2videoBearer authentication in the form Bearer YOUR_API_KEY.
Content-Type string
default: "application/json"
required
Data exchange format. Use application/json.
Request body Start-frame URL or raw Base64. At least one of image and image_tail is required.
End frame. It cannot be combined with dynamic_masks, static_mask, or camera_control.
Positive prompt, up to 2,500 characters.
Negative prompt, up to 2,500 characters.
Up to two items containing voice_id; set sound to on when used.
std for 720p or pro for 1080p.
Static motion mask as a URL or raw Base64.
Up to six dynamic motion-brush masks.
A dynamic-area mask matching the input image dimensions.
dynamic_masks[].trajectories Trajectory coordinates. A 5-second video accepts 2–77 points.
dynamic_masks[].trajectories[].x X coordinate, using the image bottom-left corner as the origin.
dynamic_masks[].trajectories[].y Y coordinate, using the image bottom-left corner as the origin.
Preset or custom camera movement.
Use enabled to request an additional watermarked result.
Image requirements Use a public URL or raw Base64 without a data URI prefix. JPG, JPEG, and PNG are supported. Files must be no larger than 10 MB, both sides at least 300 px, and the aspect ratio between 1:2.5 and 2.5:1. End-frame control, motion brush, and camera control cannot be used together. Create response Object type, always video.
Public model ID used for the task.
Initial status, always queued.
Initial progress, always 0.
Creation time as a Unix timestamp in seconds.
Query task by ID GET /kling/v1/videos/image2video/{task_id}Bearer authentication in the form Bearer YOUR_API_KEY.
Content-Type string
default: "application/json"
required
Data exchange format. Use application/json.
Path parameters The image-to-video task ID returned by the create endpoint.
Task result 0 indicates that the query succeeded.
Error information; empty for a successful query.
submitted, processing, succeed, or failed.
Failure details when the task fails.
Generated videos, returned after success.
data.task_result.videos[].url Temporary generated-video URL.
data.task_result.videos[].duration Actual duration in seconds.
Creation Unix timestamp in milliseconds.
Last update Unix timestamp in milliseconds.
Generated result URLs are removed after 30 days. Save the files promptly.
Create task POST /kling/v1/videos/motion-controlBearer authentication in the form Bearer YOUR_API_KEY.
Content-Type string
default: "application/json"
required
Data exchange format. Use application/json.
Request body Additional visual or camera instructions, up to 2,500 characters.
Character image URL or raw Base64.
Public URL for the motion reference video.
Up to one Legacy element. When used, character_orientation must be video.
element_list[].element_id Element ID returned by the Legacy Element Management API.
Keep reference-video audio: yes or no.
Character orientation source: image or video.
Use enabled to request an additional watermarked result.
Images support JPG/JPEG/PNG up to 10 MB, 300–65,536 px per side, and aspect ratio 1:2.5 to 2.5:1. Videos support MP4/MOV up to 100 MB, 340–3,850 px per side, and at least 3 seconds. Maximum duration is 10 seconds for character_orientation: "image" and 30 seconds for character_orientation: "video". Create response 0 indicates that the request was accepted.
Query task by ID GET /kling/v1/videos/motion-control/{task_id}Bearer authentication in the form Bearer YOUR_API_KEY.
Content-Type string
default: "application/json"
required
Data exchange format. Use application/json.
Path parameters The motion-control task ID returned by the create endpoint.
Task result 0 indicates that the query succeeded.
Error information; empty for a successful query.
submitted, processing, succeed, or failed.
Failure details when the task fails.
Generated videos, returned after success.
data.task_result.videos[].url Temporary generated-video URL.
data.task_result.videos[].duration Actual duration in seconds.
Creation Unix timestamp in milliseconds.
Last update Unix timestamp in milliseconds.
Generated result URLs are removed after 30 days. Save the files promptly.
Create custom voice POST /kling/v1/general/custom-voicesBearer authentication in the form Bearer YOUR_API_KEY.
Content-Type string
default: "application/json"
required
Data exchange format. Use application/json.
Request body Custom voice name, up to 20 characters.
Public MP3, WAV, MP4, or MOV URL. At least one of voice_url and video_id is required.
An eligible previously generated video ID. At least one of voice_url and video_id is required.
The source must contain one clear speaker and be 5–30 seconds long. Create response Object type, always video.
Public model ID used for the task.
Initial status, always queued.
Initial progress, always 0.
Creation time as a Unix timestamp in seconds.
Query custom voice GET /kling/v1/general/custom-voices/{id}Bearer authentication in the form Bearer YOUR_API_KEY.
Task ID returned by the create custom voice endpoint.
Custom voice result submitted, processing, succeed, or failed.
data.task_result.voices[].voice_id Voice ID for video requests.
data.task_result.voices[].voice_name Voice name.
data.task_result.voices[].trial_url Voice preview URL.
data.task_result.voices[].owned_by Custom voices return self; current preset voices return vod.
List preset voices GET /kling/v1/general/presets-voices?pageNum=1&pageSize=30Bearer authentication in the form Bearer YOUR_API_KEY.
Page number from 1 to 1,000.
Page size from 1 to 1,000.
Preset voice result submitted, processing, succeed, or failed.
data[].task_result.voices Voice results.
data[].task_result.voices[].voice_id Voice ID for video requests.
data[].task_result.voices[].voice_name Voice name.
data[].task_result.voices[].trial_url Voice preview URL.
data[].task_result.voices[].owned_by Custom voices return self; current preset voices return vod.