Skip to main content

Overview

Generate a video from text and an optional input image with Kling
  • Output Type: video
  • Base Model: kling
  • Estimated Cost: quality == “high” ? 25 * duration : 10 * duration credits
  • Handler: replicate

Parameters

Required Parameters

prompt
string
required
Text prompt
Describe the video you want to generate in detail.
  • Label: Prompt
aspect_ratio
string
default:"1:1"
required
Width/height (ignored when using a starting image)
  • Label: Aspect ratio
  • Options: 16:9, 1:1, 9:16
quality
string
default:"medium"
required
The quality of the Kling video model.
High is highest quality but slow and expensive. Medium is good for most cases. Low is faster and cheaper but lower quality.
  • Label: Quality
  • Options: high, medium, low
duration
integer
default:5
required
Duration of the video in seconds
  • Label: Duration
  • Options: 5, 10

Optional Parameters

negative_prompt
string
Negative text prompt
Optionally describe anything you do not want in the video.
  • Label: Negative prompt
start_image
image
First frame of the video to use as a keyframe
If using quality=medium, this is required. Pure txt2video is only supported for quality=high or quality=low.
  • Label: Starting image
end_image
image
Last frame of the video to use as a keyframe (quality=medium only, not supported for high or low)
  • Label: Ending image
cfg_scale
float
default:0.5
Flexibility in video generation; The higher the value, the lower the model’s degree of flexibility, and the stronger the relevance to the user’s prompt.
  • Label: Guidance scale
  • Minimum: 0
  • Maximum: 1
I