Views
No views yet
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.| 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 |
pip install requests1import os
2import time
3import requests
4
5API = "https://api.apiframe.ai/v2"
6headers = {
7 "X-API-Key": os.environ["APIFRAME_API_KEY"],
8 "Content-Type": "application/json",
9}
10
11job = requests.post(
12 f"{API}/videos/generate",
13 headers=headers,
14 json={
15 "model": "kling-3.0",
16 "prompt": "a cinematic sunrise over a futuristic cityscape",
17 "klingParams": {
18 "duration": 5,
19 "mode": "pro",
20 "aspect_ratio": "16:9",
21 "generate_audio": True,
22 },
23 },
24).json()
25
26while True:
27 result = requests.get(f"{API}/jobs/{job['jobId']}", headers=headers).json()
28 if result["status"] in ("COMPLETED", "FAILED"):
29 break
30 time.sleep(2)
31
32print(result.get("result"))result["videoUrl"] is the CDN URL. Pass webhookUrl on the generate call if you do not want to poll.1import os
2import requests
3
4headers = {
5 "X-API-Key": os.environ["APIFRAME_API_KEY"],
6 "Content-Type": "application/json",
7}
8
9requests.post(
10 "https://api.apiframe.ai/v2/videos/generate",
11 headers=headers,
12 json={
13 "model": "kling-3.0",
14 "prompt": "slow push in, steam rising from the cup",
15 "klingParams": {
16 "start_image": "https://example.com/frame.jpg",
17 "duration": 5,
18 "mode": "pro",
19 "aspect_ratio": "16:9",
20 },
21 },
22)model for kling-3.0-omni (reference images/video) or kling-3.0-motion-control (transfer motion from a clip onto a character).X-API-Key).