Kling 4.0 text-to-video API turns a prompt into clips up to 30 seconds with synchronized audio, 720p or 1080p and four framings. Watch verified examples and try it online.

Provider: Kuaishou

Category: video generation

Endpoint: /v1/tasks

Status: Available

Cost: See live page pricing

Back to Models

Kling 4.0 Text-to-Video

by KuaishouVideo

Kling 4.0 Text-to-Video: turn a prompt into cinematic clips up to 30 seconds, at 720p/1080p with 16:9, 9:16, 1:1 and 21:9 framing. Picture and synchronized audio are generated together.

Pricing

Standard Usage

440 Credits/ s

Input

0 / 2500
5s
3s1-second steps30s
Estimated cost2,200 Credits440 Credits / s × 5s

Output

Ready for generation

Configure your parameters and click "Run" to see the output here.

--

Verified output

Two shots generated through the API

Atmospheric landscape5s720p16:9

A steam train leaves a forest station at dawn

Tests layered steam, low golden light through pine trees, a slow lateral move and engine sound in one shot.

Original prompt

An old steam train pulls slowly out of a mountain station at dawn, thick white steam billowing into low golden sunlight, pine forest on both sides, slow lateral tracking shot, cinematic depth of field, natural engine rumble and distant birdsong

Generated video5s · 720p · 16:9
Night portrait5s1080p16:9

A violinist plays above a rain-soaked city

A 1080p run that checks rain highlights, neon bokeh, a slow push-in and the instrument's sound.

Original prompt

A lone violinist plays on a rain-soaked rooftop at blue hour, neon signs blurring behind her, rain droplets catching rim light, slow push-in, shallow depth of field, cinematic

Generated video5s · 1080p · 16:9

Choose by input method, output specifications, control surface, and budget.

About Kling 4.0 Text-to-Video

Kling 4.0 Text-to-Video turns a prompt into a three- to thirty-second clip at 720p or 1080p, with synchronized audio generated in the same pass. It fits ad tests, social shorts, storyboards and single continuous takes.

The Playground and the API use the same model ID. This route is text-only; when a specific frame has to start the clip, switch to the image-to-video model instead. kling-4.0/text-to-video

Provider
Kuaishou
Task
Pure text-to-video
Input
Text prompt

Model specifications

These specifications reflect the current HiAPI Kling 4.0 Text-to-Video request contract.

Input
Text prompt
Duration
3–30s
Resolution
720p1080p
Aspect ratio
16:99:161:121:9
Audio and references
Audio generated with the picture
API protocol
POST /v1/tasksAsync

How to use Kling 4.0 Text-to-Video

Validate motion at 720p first, then raise resolution or duration once the composition holds.

Subject
Action
Camera
01

Define subject, action, and camera

Lead with subject and setting, then describe action, camera direction, and speed in time order. State no cuts for a continuous take.

Draft

5s · 720p

Final

5-30s · 1080p

02

Choose duration, quality, and frame

Validate subject motion and camera continuity with 5s · 720p, then move to 5-30s · 1080p.

Playground
POST /v1/tasks
03

Validate in Playground, then integrate

Check motion stability and subject consistency online, then create an asynchronous task with the same model ID: kling-4.0/text-to-video.

Kling 4.0 Text-to-Video API quickstart

This is the minimum request for an asynchronous text-to-video task. Use the API docs for task retrieval, callbacks, errors, and the complete parameter contract.

curl --request POST 'https://api.hiapi.ai/v1/tasks' \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
  "model": "kling-4.0/text-to-video",
  "input": {
    "prompt": "An old steam train pulls slowly out of a mountain station at dawn, thick white steam billowing into low golden sunlight, pine forest on both sides, slow lateral tracking shot, cinematic depth of field, natural engine rumble and distant birdsong",
    "duration": 5,
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }
}'
The create request returns a taskId; retrieve the result asynchronously.Open full API docs
Need to compare models and billing tiers?View live pricing for all models

Frequently asked questions

Does Kling 4.0 text-to-video need an input image?

No. kling-4.0/text-to-video takes a text prompt only. Use kling-4.0/image-to-video when a specific first frame has to come alive.

Which durations, resolutions and framings are supported?

Any whole duration from 3 to 30 seconds at 720p or 1080p, framed at 16:9, 9:16, 1:1 or 21:9 ultrawide. The examples here show five-second landscape clips at 720p and 1080p.

Does Kling 4.0 generate audio?

Yes. Picture and audio are produced in the same pass and the MP4 ships with a soundtrack. Ambient sound and sound sources written into the prompt, such as rain, an engine or an instrument, are used by the model.

How is text-to-video billed?

Per output second, with separate per-second tiers for 720p and 1080p. There is no minimum charge: a five-second clip costs five seconds at the tier rate. The live page price and task record show the exact amount.

How should I write a Kling 4.0 prompt?

Start with subject and setting, state the camera move explicitly (push-in, lateral tracking, handheld, locked-off), then add lighting and mood. Put the sound you want in the same description instead of planning to add it later.

How do I call it through the API?

Send an asynchronous task to POST /v1/tasks with model set to kling-4.0/text-to-video and prompt, duration, resolution and aspect_ratio in input. The create call returns a taskId used for retrieval.

HiAPI Blog

Kling 4.0 Text-to-Video guides and tutorials