Get API key

by Kuaishou

Up to 30-second 1080p clips with keyframes; may queue when busy

kling/4.0/text-to-videoFrom 162 creditsfor a 5-second clip · $1.62
  • Up to 1080p
  • 3–30s clips
  • Start and end frames
  • Up to 10 reference images
  • 4 aspect ratios
  • Create Video
  • Image to Video
  • Reference to Video

About Kling 4.0

Up to 30-second 1080p clips with keyframes; may queue when busy.

Call it with the model name kling/4.0/text-to-video on POST /jobs/createTask, from 162 credits for a 5-second clip ($1.62).

Introduction

Kling 4.0 Text to video turns a written brief into a clip of 3 to 30 seconds at 720p or 1080p, in 16:9, 9:16, 1:1 or 21:9 ultrawide. Every clip comes back with a stereo soundtrack generated in the same pass: dialogue you write in quotes, effects and ambience.

Choose a Kling 4.0 mode by starting material

What you have at the startMode
a written scene or scriptKling 4.0 Text to video (you are here)
an opening frame, and optionally a closing frame and in-between framesKling 4.0 Image to video
photos, clips or voice samples to cast fromKling 4.0 Reference to video

Key features

Up to 30 seconds in one take

Lengths run from 3 to 30 whole seconds, twice the ceiling of Kling 3.0. A long take lets a scene breathe - a slow crane, a full walk across a set - without stitching shorter clips together.

Sound is always on

Each clip carries a two-channel soundtrack. In our tests the dome motor's rumble, wind and a whispered line all came back from the prompt's Sound: line, timed to the picture.

21:9 ultrawide

Besides 16:9, 9:16 and 1:1, Kling 4.0 renders a true 21:9 frame. Our 1080p ultrawide test came back at 2200x940.

Request parameters

ParameterRequiredDescription
promptYesDescribe the scene, the action, the camera and the sound. Put spoken lines in quotes.
resolutionNoOutput size. Bigger sizes look sharper and cost more. 720p · 1080p · Default: 720p
aspect_ratioNoThe shape of the frame: wide, square or tall. 16:9 · 9:16 · 1:1 · 21:9 · Default: 16:9
duration_secondsNoHow long the clip runs. You pay per second. ≥ 3 · ≤ 30 · Default: 5

Pricing

Prices are in credits, the same credits you use on the website (1 credit = $0.01). The hold is taken when the task is accepted and settled to the actual charge when it finishes; failed tasks are refunded.

OptionCredits per second≈ USD
resolution 720p32.4$0.32
resolution 1080p48.6$0.49

For an exact number before you run, send the same body to POST /jobs/quote.

Use cases

Establishing shots with sound

A landscape, a building, a road at dusk - write the place, the light, one camera move and the ambience, and the clip is usable as an opener with its sound already in place.

Short scenes with a spoken line

Put the line in quotes after the action. One clear line per clip is easier for the model to time than overlapping dialogue.

Vertical clips for social

Choose 9:16 and frame the subject in the centre third; the model composes for the vertical frame instead of cropping a wide shot.

Prompt guide & pro tips

Write it in the order it happens

Subject and wardrobe, action, camera move, look, then a separate Sound: line. Our observatory example follows exactly that order.

Draft short, then go long

Generation is slow - a 3-second test took two to four minutes, and requests run one after another rather than in parallel. Find the framing with 3 to 5 seconds at 720p, then render the long or 1080p version.

Describe the sound you want

Because audio is always generated, leaving sound out of the prompt does not give you silence - it gives you whatever the model picks. Name the ambience you want, or say "quiet room tone".

API quick start

Call the Kling 4.0 API in three steps

  1. Create an API key. Sign in to PopNow and create a key in the API console. Keys start with sk-popnow- and use the same credits as the website.
  2. Send the request. POST /jobs/createTask with model kling/4.0/text-to-video and an input object that follows the parameter table. The response returns a task ID straight away.
  3. Get the result. Poll GET /jobs/recordInfo with the task ID, or pass a callBackUrl and we post the result to it. Download the output links when the task succeeds.
# 1. Create the task. Keep the Idempotency-Key if you retry after a network error.
export IDEMPOTENCY_KEY="$(uuidgen)"
curl -X POST https://api.popnow.ai/api/v1/jobs/createTask \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $IDEMPOTENCY_KEY" \
  -d '{
  "model": "kling/4.0/text-to-video",
  "input": {
    "prompt": "A slow aerial shot drifting over a misty pine forest at sunrise",
    "aspect_ratio": "16:9",
    "resolution": "720p",
    "duration_seconds": 5
  }
}'

# 2. Copy data.taskId from the response, then poll until state is succeeded, failed, canceled or expired.
TASK_ID="TASK_ID_FROM_RESPONSE"
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=$TASK_ID" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Replace the prompt and any links with your own. The API tab has the response, polling and callback reference.

Kling 4.0 API questions

How much does the Kling 4.0 API cost?

Kling 4.0 starts at 162 credits ($1.62) for a 5-second clip with Create Video, its cheapest task. Prices by option: 720p 32.4 credits per second, 1080p 48.6 credits per second. Credits are the same as on the website (1 credit = $0.01), and failed tasks are refunded.

What is the model name for Kling 4.0 in the API?

Put kling/4.0/text-to-video for Create Video; kling/4.0/image-to-video for Image to Video; kling/4.0/reference-to-video for Reference to Video in the model field of POST /jobs/createTask.

What is new in Kling 4.0 compared with Kling 3.0?

Longer clips (up to 30 seconds instead of 15), a 21:9 ultrawide option, in-between keyframes on image to video, and reference to video that takes videos and voice clips as well as images. Sound is always on. Kling 3.0 still offers 4K and Motion Control, which Kling 4.0 does not have here.

How do I refer to my uploads in the prompt?

On reference to video, write @Image1, @Image2 for images, @Video1 for videos and @Audio1 for audio clips, each numbered in the order you uploaded them. In-between keyframes on image to video are not named in the prompt; their order in the list is the order they appear.

How long does a clip take?

In our tests a 3-second clip took about 1.5 to 4 minutes and a 5-second clip a few minutes more. Requests on the same endpoint are processed one at a time.

What are the limits of the Kling 4.0 API?

Clip length: 3–30 s; Resolutions: 720p · 1080p; Aspect ratios: 16:9 · 9:16 · 1:1 · 21:9. Requests outside these limits are rejected before anything is charged.

Can I try Kling 4.0 without writing code?

Yes. The Playground runs Kling 4.0 on your PopNow credits, needs no API key, and shows the matching code for every run.

All Kling models

More about Kling 4.0