File size: 3,041 Bytes
5014554
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
---
language:
  - en
license: other
pipeline_tag: text-to-video
tags:
  - kling
  - text-to-video
  - image-to-video
inference: false
---

# Kling API

**Model Page:** [Kling API](https://apiframe.ai/models/kling-3.0)

Community model card for calling Kling through a REST API.

This repo documents the `kling-3.0` model as exposed by Apiframe: Kuaishou's Kling Video 3.0, text-to-video and image-to-video, 3–15s, optional native audio, start/end frame control. Related ids on the same endpoint: `kling-3.0-omni`, `kling-3.0-motion-control`.

This repository does not host weights. Kling is a closed model. Inference runs remotely.

<video src="https://apiframe.ai/models-examples/kling-3-0-ember-neon-cafe.mp4" width="280" muted controls></video>

## Model description

| | |
|---|---|
| Architecture | Kling 3.0 |
| Task | text-to-video; image-to-video |
| Output | 1 video (`videoUrl`) |
| Duration | 3, 5, 8, 10, or 15 seconds |
| Aspect ratios | `1:1`, `9:16`, `16:9` |
| Modes | `standard` (720p), `pro` (1080p), `4k` |
| Typical latency | ~135s |

## How to use

```bash
pip install requests
```

```python
import os
import time
import requests

API = "https://api.apiframe.ai/v2"
headers = {
    "X-API-Key": os.environ["APIFRAME_API_KEY"],
    "Content-Type": "application/json",
}

job = requests.post(
    f"{API}/videos/generate",
    headers=headers,
    json={
        "model": "kling-3.0",
        "prompt": "a cinematic sunrise over a futuristic cityscape",
        "klingParams": {
            "duration": 5,
            "mode": "pro",
            "aspect_ratio": "16:9",
            "generate_audio": True,
        },
    },
).json()

while True:
    result = requests.get(f"{API}/jobs/{job['jobId']}", headers=headers).json()
    if result["status"] in ("COMPLETED", "FAILED"):
        break
    time.sleep(2)

print(result.get("result"))
```

`result["videoUrl"]` is the CDN URL. Pass `webhookUrl` on the generate call if you do not want to poll.

### Image-to-video

```python
import os
import requests

headers = {
    "X-API-Key": os.environ["APIFRAME_API_KEY"],
    "Content-Type": "application/json",
}

requests.post(
    "https://api.apiframe.ai/v2/videos/generate",
    headers=headers,
    json={
        "model": "kling-3.0",
        "prompt": "slow push in, steam rising from the cup",
        "klingParams": {
            "start_image": "https://example.com/frame.jpg",
            "duration": 5,
            "mode": "pro",
            "aspect_ratio": "16:9",
        },
    },
)
```

Swap `model` for `kling-3.0-omni` (reference images/video) or `kling-3.0-motion-control` (transfer motion from a clip onto a character).

## Limitations

- Closed model. No weights, fine-tuning, or local inference.
- Requires an Apiframe API key (`X-API-Key`).
- Commercial use follows Kling's terms.
- Generated media is retained on the CDN for 90 days.

## License

Outputs are subject to Kling's terms. This card is documentation only. Apiframe is not affiliated with, endorsed by, or sponsored by Kuaishou Technology.