Skip to main content
← Kling Model name: kling-video/v2.1/master/text-to-video
Generation type: text_to_video
Endpoint: POST /api/asset_generator/

Pricing

Prices are per output. When a request asks for several outputs, the charge is this price times the number of outputs.

Quick start

Input parameters

Send these fields in input_params.
string
required
PromptMinimum characters: 1. Maximum characters: 2000.
string
default:"5"
The duration of the generated video in secondsAllowed values: "5", "10".
number
default:0.5
The CFG (Classifier Free Guidance) scale is a measure of how close you want the model to stick to your prompt when looking for a related image to show you.Minimum: 0. Maximum: 1. Multiple of: 0.1.
string
default:"16:9"
The aspect ratio of the generated video frameAllowed values: "16:9", "9:16", "1:1".
string
default:"blur, distort, and low quality"
Negative PromptMaximum characters: 2500.

Response

The request returns the task with status: "initializing". Poll GET /api/asset_generator/{id}/ until status is done or failed, or pass a webhook_url to be notified. A finished task lists its files in assets and the credits it charged in credits_used.