> ## Documentation Index
> Fetch the complete documentation index at: https://docs.gengen.farm/llms.txt
> Use this file to discover all available pages before exploring further.

# Kling 4.0

> Generate 3–30 second videos from text, keyframes, or multimodal references.

[Try it](https://docs.gengen.farm/api-reference/kling/4.0/create-task.md) · [OpenAPI specification](https://docs.gengen.farm/openapi/kling-40-video.yaml)

Kling 4.0 supports text-to-video, up to ten keyframe images, and Omni generation with image and video references.

Choose 720p or 1080p. Describe dialogue, music and sound effects in the prompt. Duration can be explicit or inferred from the prompt when omitted.

Omni supports up to five input videos, with at most one video to edit and at most thirty seconds of total video input.

## Model ID

```text theme={"dark"}
kling-4.0
```

Pass this exact public ID in the top-level `model` field.

## Supported modes

* `text_to_video`
* `image_to_video`
* `omni_video`

## Inputs

* `Text`
* `Image`
* `Video`

## Outputs

* `Video`

## Capabilities

* `Text-to-video`
* `Image-to-video`
* `Omni video`

### Additional capabilities

* `Multiple keyframes`
* `Reference videos`
* `Video editing`
* `Native audio`

## Technical details

| Property | Value |
| - | - |
| Model family | `Kling` |
| Modality | `video` |
| Processing | `Asynchronous task` |
| Endpoint | `/api/gengen/v1/contents/generations/tasks` |
| Durations | `3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30` |
| Resolutions | `720p, 1080p` |
| Aspect ratios | `21:9, 16:9, 9:16, 1:1, adaptive` |
| Audio generation | `Supported` |
| Watermark control | `Supported` |

> [!NOTE]
>
> Availability and final customer prices can change. Check the [Dashboard model catalog](https://gengen.farm/dashboard?section=models) before production use.

See the [Kling 4.0 API guide](https://docs.gengen.farm/api-reference/kling/4.0/overview.md), [create task](https://docs.gengen.farm/api-reference/kling/4.0/create-task.md), and [retrieve task](https://docs.gengen.farm/api-reference/kling/4.0/retrieve-task.md) references. Preview all workflows in [API Explorer](https://gengen.farm/api-explorer/demos/kling-40-video-generation).

See the [API reference overview](https://docs.gengen.farm/api-reference/introduction.md) for authentication, request conventions, and response schemas.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.