v1

latestOpenAPI 3.1.02026-07-267724480.0 KB

Text to Video

post/kling/v1/videos/text2video

Headers

Content-Typestring

Must be application/json.

Request body

promptstring required

Text prompt describing the video to generate. Maximum 500 characters.

negative_promptstring

Elements to exclude from the video. Maximum 200 characters.

aspect_ratio'16:9' | '9:16' | '1:1'

Aspect ratio request. Typical rendered sizes are 1280x720 for 16:9, 720x1280 for 9:16, and 960x960 for 1:1. This endpoint does not expose an exact size field.

callback_urlstring

Webhook URL to receive task status updates when the task completes.

model_name'kling-v1' | 'kling-v1-6' | 'kling-v2-master' | 'kling-v2-1-master' | 'kling-v2-5-turbo' | 'kling-v2-6' | 'kling-v3'

Model ID for this text-to-video request. Use an ordinary Kling video model ID; use Omni model IDs only with the Omni Video endpoint.

cfg_scalenumber

Prompt adherence strength. Higher values follow the prompt more closely. Range: 0–1.

mode'std' | 'pro'

Generation mode. std for standard (faster), pro for professional (higher quality). The default is std.

durationstring

Output video length in seconds. Use 5 or 10; omit to use 5.

external_task_idstring

Custom task id for your own tracking. Does not replace the system-generated task id but can be used to query tasks. Must be unique per user.

sound'on' | 'off'

Optional generated-audio switch for models that support video sound. Use on or off, or omit the field for the model default.

Response

Successful Response

codeinteger

Error code; specifically define the error code

messagestring

error message

request_idstring

Request ID, system-generated, for tracking requests, troubleshooting issues