Skip to content

Text to Video

POST https://www.kkiai.com/kling/v1/videos/text2video

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-6, kling-v2-master, kling-v2-1-master, kling-v2-5-turbo, kling-v3
promptstringOptionalPositive text prompt. Cannot exceed 2500 characters.
multi_shotbooleanRequiredWhether 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: ○ Maximum 6 shots supported, minimum 1 shot. ○ Maximum length of content for each shot does not exceed 512 characters. ○ Duration of each shot must not exceed the total task duration and must not be less than 1 second. ○ The sum of durations of all shots equals the total task duration.
  └ indexintegerRequired
  └ promptstringRequired
  └ durationstringRequired
negative_promptstringOptionalNegative text prompt. Cannot exceed 2500 characters.
cfg_scalenumberOptionalDegree of freedom for video generation. The larger the value, the smaller the model's degree of freedom, and the stronger the correlation with the user's input prompt.
modestringRequiredVideo generation mode. Enum values: std, pro. std: Standard mode (standard), basic mode, high cost-effectiveness. pro: Expert mode (high quality), high performance mode, generates better video quality.
soundstringOptionalWhether to generate sound simultaneously when generating video. Enum values: on, off. This parameter is only supported by V2.6 and later model versions.
camera_controlobjectOptionalProtocol for controlling camera movement (if not specified, the model will intelligently match based on the input text/image).
  └ typestringRequired
  └ configobjectRequired
aspect_ratiostringOptionalAspect ratio of the generated video (width:height).
durationstringRequiredDuration of generated video in seconds.
watermark_infoobjectOptionalWhether to generate results with watermark simultaneously. ● Define through the enabled parameter, carried by 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",
    "prompt": "Generate a video of a person dancing by the seaside.",
    "negative_prompt": "",
    "cfg_scale": 0.5,
    "mode": "std",
    "sound": "off",
    "camera_control": {
        "type": "simple",
        "config": {
            "horizontal": 1.0,
            "vertical": 0,
            "pan": 0,
            "tilt": 0,
            "roll": 0,
            "zoom": 0
        }
    },
    "aspect_ratio": "16:9",
    "duration": "5",
    "callback_url": "",
    "external_task_id": ""
}

cURL Example

bash
curl --location --request POST 'https://www.kkiai.com/kling/v1/videos/text2video' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data-raw '{
    "model_name": "kling-v1",
    "prompt": "Generate a video of a person dancing by the seaside.",
    "negative_prompt": "",
    "cfg_scale": 0.5,
    "mode": "std",
    "sound": "off",
    "camera_control": {
        "type": "simple",
        "config": {
            "horizontal": 1.0,
            "vertical": 0,
            "pan": 0,
            "tilt": 0,
            "roll": 0,
            "zoom": 0
        }
    },
    "aspect_ratio": "16:9",
    "duration": "5",
    "callback_url": "",
    "external_task_id": ""
}'

Response

🟢 200 Success

Response Example

json
{
    "code": 0,
    "message": "SUCCEED",
    "request_id": "603e2a28-fb89-4146-ae33-412d74012a6d",
    "data": {
        "task_id": "831922345719271433",
        "task_status": "submitted",
        "task_info": {},
        "created_at": 1766374262370,
        "updated_at": 1766374262370
    }
}