Theme
Image to Video
POST
https://www.kkiai.com/kling/v1/videos/image2video
Request Parameters
Authorization
Add the Authorization parameter to the Header. Its value is the Token concatenated after Bearer.
Example: Authorization: Bearer ********************
Header Parameters
| Parameter Name | Type | Required | Description | Example |
|---|---|---|---|---|
Content-Type | string | Optional | application/json | |
Authorization | string | Optional | Bearer {{YOUR_API_KEY}} |
Body Parameters (application/json)
| Parameter Name | Type | Required | Description |
|---|---|---|---|
model_name | string | Required | Model name. Enum values: kling-v1, kling-v1-5, kling-v1-6, kling-v2-master, kling-v2-1, kling-v2-1-master, kling-v2-5-turbo, kling-v2-6, kling-v3 |
image | string | Required | Reference image. Supports Base64-encoded image or image URL (must be accessible) |
image_tail | string | Optional | Reference image - tail frame control. Supports Base64-encoded image or image URL (must be accessible) |
prompt | string | Optional | Positive text prompt. Cannot exceed 2500 characters. Use <<<voice_1>>> to specify voice tone, with sequence number matching the voice_list parameter. A single video generation task can reference at most 2 voice tones. When specifying voice tone, the sound parameter must be set to on. Simpler syntax is better, e.g.: man<<<voice_1>>>says: "hello". When voice_list parameter is not empty and prompt parameter references voice ID, the video generation task is billed as "with specified voice tone" |
negative_prompt | string | Optional | |
voice_list | array[object] | Optional | Supported only in V2.6 and later model versions. List of voice tones referenced when generating video. A single video generation task can reference at most 2 voice tones. When voice_list parameter is not empty and prompt parameter references voice ID, the video generation task is billed as "with specified voice tone" |
└ voice_id | string | Optional | |
sound | string | Optional | Supported only in V2.6 and later model versions. Whether to generate sound simultaneously when generating video. Enum values: on, off |
cfg_scale | number | Optional | Not supported by kling-v2.x models. Degree of freedom for video generation; larger values result in smaller model freedom and stronger correlation with user input prompts |
mode | string | Required | Video generation mode. Enum values: std, pro. std: Standard mode (standard), basic mode, high cost-effectiveness. pro: Expert mode (high quality), high performance mode, better video quality |
static_mask | string | Optional | Static brush stroke area (mask image painted by user with motion brush) |
multi_shot | boolean | Optional | Whether to generate multi-shot video. When this parameter is true, the prompt parameter is invalid. When this parameter is false, the shot_type parameter and multi_prompt parameter are invalid |
shot_type | string | Optional | Shot composition method. Enum values: customize. Required when multi_shot parameter is true |
multi_prompt | array[object] | Optional | Information for each shot, such as prompt and duration. Define shot sequence number, corresponding prompt and duration through index, prompt, and duration parameters, where: ● Supports up to 6 shots, minimum 1 shot. ● Maximum length of each shot content does not exceed 512. ● Duration of each shot does not exceed the total duration of the current task and is not less than 1. ● Sum of all shot durations equals the total duration of the current task |
└ index | integer | Required | |
└ prompt | string | Required | |
└ duration | string | Required | |
dynamic_masks | array[object] | Optional | |
└ mask | string | Optional | |
└ trajectories | array[object] | Optional | |
camera_control | object | Optional | Protocol for controlling camera movement (if not specified, the model will intelligently match based on input text/image) |
└ type | string | Required | |
└ config | object | Required | |
duration | string | Required | Video generation duration in seconds. Enum values: 5, 10 |
watermark_info | object | Optional | Whether to generate results with watermark simultaneously. Define through enabled parameter, carried with key:value, as follows: "watermark_info": { "enabled": boolean // true to generate, false to not generate } |
└ enabled | boolean | Required | |
callback_url | string | Optional | |
external_task_id | string | Optional |
Request Example
json
{
"model_name": "kling-v1",
"image": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
"image_tail": "",
"prompt": "",
"negative_prompt": "",
// "voice_list": [
// {
// "voiceId": ""
// }
// ],
// "sound": "",
"cfg_scale": 0.5,
"mode": "std",
"static_mask": "",
"dynamic_masks": [
{
"mask": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
"trajectories": [
{
"x": 0,
"y": 0
},
{
"x": 1,
"y": 1
}
],
}
],
// "camera_control": {
// "type": "simple",
// "config": {
// "horizontal": 1.0,
// "vertical": 0,
// "pan": 0,
// "tilt": 0,
// "roll": 0,
// "zoom": 0
// }
// },
"duration": 5,
"callback_url": "",
"external_task_id": ""
}cURL Example
bash
curl --location --request POST 'https://www.kkiai.com/kling/v1/videos/image2video' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
"model_name": "kling-v1",
"image": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
"image_tail": "",
"prompt": "",
"negative_prompt": "",
// "voice_list": [
// {
// "voiceId": ""
// }
// ],
// "sound": "",
"cfg_scale": 0.5,
"mode": "std",
"static_mask": "",
"dynamic_masks": [
{
"mask": "https://h2.inkwai.com/bs2/upload-ylab-stunt/se/ai_portal_queue_mmu_image_upscale_aiweb/3214b798-e1b4-4b00-b7af-72b5b0417420_raw_image_0.jpg",
"trajectories": [
{
"x": 0,
"y": 0
},
{
"x": 1,
"y": 1
}
],
}
],
// "camera_control": {
// "type": "simple",
// "config": {
// "horizontal": 1.0,
// "vertical": 0,
// "pan": 0,
// "tilt": 0,
// "roll": 0,
// "zoom": 0
// }
// },
"duration": 5,
"callback_url": "",
"external_task_id": ""
}'Response
🟢 200 Success
Response Example
json
{}