Skip to content

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 NameTypeRequiredDescriptionExample
Content-TypestringOptionalapplication/json
AuthorizationstringOptionalBearer {{YOUR_API_KEY}}

Body Parameters (application/json)

Parameter NameTypeRequiredDescription
model_namestringRequiredModel 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
imagestringRequiredReference image. Supports Base64-encoded image or image URL (must be accessible)
image_tailstringOptionalReference image - tail frame control. Supports Base64-encoded image or image URL (must be accessible)
promptstringOptionalPositive 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_promptstringOptional
voice_listarray[object]OptionalSupported 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_idstringOptional
soundstringOptionalSupported only in V2.6 and later model versions. Whether to generate sound simultaneously when generating video. Enum values: on, off
cfg_scalenumberOptionalNot 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
modestringRequiredVideo 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_maskstringOptionalStatic brush stroke area (mask image painted by user with motion brush)
multi_shotbooleanOptionalWhether 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_typestringOptionalShot composition method. Enum values: customize. Required when multi_shot parameter is true
multi_promptarray[object]OptionalInformation 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
  └ indexintegerRequired
  └ promptstringRequired
  └ durationstringRequired
dynamic_masksarray[object]Optional
  └ maskstringOptional
  └ trajectoriesarray[object]Optional
camera_controlobjectOptionalProtocol for controlling camera movement (if not specified, the model will intelligently match based on input text/image)
  └ typestringRequired
  └ configobjectRequired
durationstringRequiredVideo generation duration in seconds. Enum values: 5, 10
watermark_infoobjectOptionalWhether 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 }
  └ enabledbooleanRequired
callback_urlstringOptional
external_task_idstringOptional

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
{}