by Kuaishou

Up to 30-second 1080p clips with keyframes, edits and extensions; may queue when busy

kling/4.0/text-to-video
Kling 4.0 AI Video Generator online
  • Up to 1080p
  • 3–30s clips
  • Sound included
  • Start and end frames
  • Up to 10 reference images
  • 4 aspect ratios
  • Create Video
  • Image to Video
  • Reference to Video
  • Extend Video
  • Edit Video

About Kling 4.0

The Kling 4.0 API on PopNow exposes five task-specific contracts under kling/4.0. Use text-to-video for a prompt, image-to-video for ordered frames, reference-to-video for mixed assets, video-edit for changing footage and video-extend for a continuation workflow. Each accepts its own input schema: migrating a Kling 3.0 client requires checking fields rather than changing only the model name. Results are asynchronous jobs; keep the returned job identifier and follow its status or your webhook instead of resubmitting while a render is queued.

Call it with the model name kling/4.0/text-to-video on POST /jobs/createTask, from $0.75.

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
a clip you want to changeKling 4.0 Video edit
a clip you want to continueKling 4.0 Video extend

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 what you want to make.
resolutionNoChoose an available output size. 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_secondsNoLength of the generated clip. ≥ 3 · ≤ 30 · Default: 5

Pricing

Prices are in USD and charged to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

OptionUSD per second
resolution 720p$0.15
resolution 1080p$0.224

Send the same request body to POST /jobs/quote to see the estimated and maximum USD charge before running. A quote does not run the task or charge your balance.

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-. API calls are billed in USD from your PopNow balance.
  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.

What to build with the Kling 4.0 API

  • A storyboard tool can export an opening frame, intermediate checkpoints and an optional ending into the image-to-video task. Preserve the order chosen by the editor.
  • A reference-driven scene builder can attach product images, location pictures, camera-motion videos and audio references to one prompt. Show upload order because the prompt tokens depend on it.
  • A revision interface can retain the source soundtrack while changing a setting or visual style through video-edit. A separate continuation action can call video-extend when the user needs more footage rather than different footage.

Kling 4.0 parameter notes

  • For new generation, duration_seconds is an integer from 3 to 30 and resolution is 720p or 1080p. Text-to-video supports 16:9, 9:16, 1:1 and 21:9; image, reference and editing tasks also accept auto.
  • image-to-video requires image_url. keyframe_image_urls supports up to nine intermediate images, reduced to eight when last_image_url is supplied. Do not confuse an ordered keyframe sequence with unordered reference images.
  • reference-to-video accepts up to ten reference_image_urls, five reference_video_urls with a combined maximum of 30 seconds, and three reference_audio_urls. Each audio reference should be 5 to 30 seconds. Use @Image1, @Video1 and @Audio1 in upload order.
  • video-edit requires prompt and video_url. Its duration_seconds defaults to -1, meaning match the source. Explicit durations are 3 to 30 seconds. keep_original_audio defaults to true for editing, while reference-to-video defaults it to false.
  • video-extend requires a source clip no longer than 60 seconds. Its duration_seconds describes only the added segment. The workflow generates from the source’s last frame and joins the result; source motion is not a native full-video conditioning input.
  • Do not send Kling 3.0-only controls such as generate_audio, shot_type or character_orientation. Validate the selected task schema before submitting, and omit empty optional upload arrays.

How Kling 4.0 API pricing adds up

Request a quote for the exact task and uploaded assets before submitting. Text and image generation charge for output duration at the selected resolution. Reference-video and editing calculations can account for source duration as well as output duration, so multiplying a headline rate by the requested length is not a complete estimate. Extension charges for the newly generated segment; it does not charge the existing clip as fresh output. The API charges your PopNow balance in USD, based on the API quote.

  • resolution 720p, 5-second clip: $0.75 each, $75.00 for 100 clips
  • resolution 1080p, 5-second clip: $1.12 each, $112.00 for 100 clips

Async jobs, webhooks and rate limits

Every Kling 4.0 request is asynchronous: createTask returns a taskId straight away, and the result arrives when the job finishes. Poll GET /jobs/recordInfo every few seconds, or pass a public https callBackUrl and verify the X-Webhook-Signature header (HMAC-SHA256 over taskId, timestamp and the body hash) before trusting the payload. Each account gets 1,000 write requests per 10 seconds; a 429 carries Retry-After. Send an Idempotency-Key with createTask so a retried request for kling/4.0/text-to-video never runs or bills twice.

Common Kling 4.0 API errors

errorCodeWhat it usually means and how to fix it
invalid_requestCheck the task schema for duration bounds, accepted fields and the total frame count. Fields copied from a 3.0 request may be invalid for 4.0.
invalid_assetMake sure every upload is retrievable and within the selected task’s media-duration and file-type limits. For multiple video references, check their combined duration.
rate_limitedRespect the retry guidance and avoid duplicate generation requests. A job that was already accepted should be polled using its identifier.
content_rejectedReview the refused prompt or asset and submit an acceptable revision rather than repeatedly sending the same input.

Examples

FPV through the slot canyonExamples
Red coat, neon rainExamples
Hairpin drift, orbit camExamples
The dismountExamples

Kling 4.0 API questions

How much does the Kling 4.0 API cost?

Kling 4.0 starts at $0.45 for a 5-second clip with Reference to Video, its lowest-priced task. Prices for Create Video by option: 720p $0.15 per second, 1080p $0.224 per second. API usage is charged in USD to your PopNow balance. When a task is accepted, we reserve the maximum quoted amount from your PopNow balance. On completion, we charge for actual usage, never more than the hold, and release the remainder. If the task fails, the hold is released.

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; kling/4.0/video-extend for Extend Video; kling/4.0/video-edit for Edit Video in the model field of POST /jobs/createTask.

Can I switch a Kling 3.0 request to Kling 4.0 by renaming the model?

Only after validating the task and input. The 4.0 contracts have different duration bounds, reference fields and audio behavior. Dedicated character-animation is not one of the five 4.0 tasks.

Does the PopNow Kling 4.0 API support 4K or two-minute output?

The current schemas expose 720p and 1080p, with 3 to 30 seconds per generated segment. An extension result can join an original clip to a new segment, which is distinct from one native long generation.

Why does adding a reference video change the quote?

Video-conditioned requests can use source-video duration in the billing calculation. Quote the actual assets and settings rather than reusing a text-to-video estimate.

Should I retry when a job waits in the queue?

An accepted request already has a job identifier. Keep following that job. A new submission can create a separate render and charge instead of accelerating the first one.

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?

Run Kling 4.0 in the Playground without an API key, using the same PopNow balance as the website, shown in USD. Each run appears in your developer history with its matching code.

All Kling models

Choose Kling 4.0 for longer clips, intermediate keyframes and mixed references. Kling 3.0 remains useful for its 4K option, dedicated Motion Control and optional audio; those are not interchangeable settings.

More about Kling 4.0