> For clean Markdown of any page, append .md to the page URL.
> For a complete documentation index, see https://docs.empiriolabs.ai/llms.txt.
> For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.empiriolabs.ai/_mcp/server.

# Kling 4.0

> Makes 3 to 30 second clips at 720p or 1080p with native audio from text, first, middle and last frames, reference images and videos, or a video to edit.

![Kling 4.0](https://media.empiriolabs.ai/model-logos/kling-4-0.png)

[Kling AI](/providers/kling) · Video Generation

`POST /v1/videos/generations`

Makes 3 to 30 second clips at 720p or 1080p with native audio from text, first, middle and last frames, reference images and videos, or a video to edit.

## At a glance

| Field               | Value                                                           |
| ------------------- | --------------------------------------------------------------- |
| Model id            | `kling-4-0`                                                     |
| Model release date  | 2026-10-15                                                      |
| Input modalities    | Text, Image, Video                                              |
| Output modalities   | Video                                                           |
| Context window      | -                                                               |
| Weight precision    | -                                                               |
| Features            | video_generation, text_to_video, image_to_video, audio, editing |
| Native inference    | No                                                              |
| New                 | Yes                                                             |
| Supported endpoints | `POST /v1/videos/generations`                                   |
| Alternate model ids | `kling-4.0`, `kling/kling-4-0`                                  |

## Pricing

| Charge            | Spec                                                       | Rate    |
| ----------------- | ---------------------------------------------------------- | ------- |
| Standard 720p     | per second                                                 | \$0.157 |
| Standard 1080p    | per second                                                 | \$0.235 |
| Video input 720p  | per second of input plus output, at least twice the output | \$0.094 |
| Video input 1080p | per second of input plus output, at least twice the output | \$0.141 |

## Example request

```bash
curl https://api.empiriolabs.ai/v1/videos/generations \
  -H 'Authorization: Bearer $EMPIRIOLABS_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{"model": "kling-4-0", "prompt": "sunrise over the ocean", "duration": 6}'
```

## Parameters

| Parameter          | Type   | Required | Default   | Description                                                                                                                                                                            |
| ------------------ | ------ | -------- | --------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `prompt`           | string | yes      | -         | Scene description, up to 26,000 English or 11,000 non-English characters. Refer to images as @image_1, @image_2 and videos as @video_1 in the order they are supplied.                 |
| `resolution`       | enum   | no       | `"1080p"` | Output resolution. 1080p is billed at a higher per-second rate than 720p. · Allowed: `720p`, `1080p`                                                                                   |
| `aspect_ratio`     | enum   | no       | `"16:9"`  | Output aspect ratio for text-to-video and reference images. A first, middle or last frame, or a video to edit, sets the aspect ratio instead. · Allowed: `16:9`, `9:16`, `1:1`, `21:9` |
| `duration`         | number | no       | `5`       | Clip length in seconds, whole numbers only. A video edit keeps the length of the video it edits. · Range: 3 – 30                                                                       |
| `image`            | string | no       | -         | First frame image URL. The video starts on this image.                                                                                                                                 |
| `image_end`        | string | no       | -         | Last frame image URL. The video ends on this image.                                                                                                                                    |
| `middle_images`    | string | no       | -         | Keyframe image URLs between the first and last frame, in order, as a list or comma-separated.                                                                                          |
| `reference_images` | string | no       | -         | Reference image URLs for characters, objects, scenes or style, as a list or comma-separated. Up to 10 images in total across all image inputs.                                         |
| `video`            | string | no       | -         | Video URL to edit, 3 to 30 seconds. The result keeps its length and aspect ratio, and bills at the video input rate.                                                                   |
| `reference_videos` | string | no       | -         | Reference video URLs for motion, camera work or style, 3 to 30 seconds each, as a list or comma-separated. Up to 5 videos in total. Bills at the video input rate.                     |

## Notes

Generates 3 to 30 second clips at 24 fps in 720p or 1080p, each with a native stereo audio track.

**Inputs**

* Text to video: prompt only.
* Keyframes: a first frame (`image`), middle frames (`middle_images`) and a last frame (`image_end`). The video follows the first frame's aspect ratio.
* Reference images (`reference_images`): characters, objects, scenes or style to use.
* Reference videos (`reference_videos`): motion, camera work or style to follow, 3 to 30 seconds each.
* Video edit (`video`): a video to edit, 3 to 30 seconds. The result keeps its length and aspect ratio.
* Up to 10 images and 5 videos per request. In the prompt, refer to images as @image_1, @image_2 (first frame, middle frames, last frame, then references) and to videos as @video_1, @video_2 (the video to edit first).

**In the Playground**

One attached image is the first frame, two are the first and last frames, and three or more are references. The first attached video is the one edited; any others are references.

**Media limits**

* Images: JPG or PNG, at least 300 px, aspect ratio between 2:5 and 5:2, up to 30 MB.
* Videos: MP4 or MOV, 3 to 30 seconds, 700 to 4553 px per side, up to 300 MB.

**Billing**

* Without a video input: billed per second of the generated clip at the resolution you request.
* With a video input (a video to edit or a reference video): billed at the video input rate on twice the length of the generated clip, or on the input plus the output when the input is longer.

---

*Machine-readable schema:* `GET https://api.empiriolabs.ai/v1/models/kling-4-0`.