Video GenerationKling
Kling 3.0
Kling 3.0 — latest generation with flexible duration, modes, audio, and multi-prompt support.
POST /v2/videos/generate — model: "kling-3.0"
Kling 3.0 is the latest model with flexible duration (3–15s), standard/pro modes, audio generation, end-frame control, and multi-prompt timeline support.
See Video Generation overview for common request fields, response format, and error codes.
Model-specific parameters
| Parameter | Type | Default | Description |
|---|---|---|---|
klingParams.duration | integer | 5 | Video duration in seconds (3–15) |
klingParams.aspect_ratio | string | — | Aspect ratio in "W:H" format (e.g. "16:9") |
klingParams.mode | string | "pro" | Generation mode: "standard" or "pro" |
klingParams.start_image | string | — | URL of an image to use as the first frame |
klingParams.end_image | string | — | URL of an image to use as the last frame |
klingParams.negative_prompt | string | — | Things to avoid in the video (max 2,500 chars) |
klingParams.generate_audio | boolean | true | Whether to generate audio along with the video |
klingParams.multi_prompt | string | — | JSON array of timed prompts for timeline control |
Credit cost
Pricing is per second of output. The total credit cost is credits-per-second × duration. The variant key combines mode and generate_audio; duration is applied as a multiplier.
| Variant | Credits / sec |
|---|---|
standard | 3 |
standard-audio | 4 |
pro | 5 |
pro-audio | 7 |
Examples: a 5-second pro clip with audio costs 7 × 5 = 35 credits; a 10-second standard clip without audio costs 3 × 10 = 30 credits; a 15-second pro clip with audio costs 7 × 15 = 105 credits.
Code examples
curl -X POST https://api.apiframe.ai/v2/videos/generate \
-H "X-API-Key: afk_your_api_key_here" \
-H "Content-Type: application/json" \
-d '{
"prompt": "a cinematic sunrise over a futuristic cityscape",
"model": "kling-3.0",
"klingParams": {
"duration": 10,
"mode": "pro",
"aspect_ratio": "16:9",
"generate_audio": true
}
}'import requests
response = requests.post(
"https://api.apiframe.ai/v2/videos/generate",
headers={
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
json={
"prompt": "a cinematic sunrise over a futuristic cityscape",
"model": "kling-3.0",
"klingParams": {
"duration": 10,
"mode": "pro",
"aspect_ratio": "16:9",
"generate_audio": True,
},
},
)
print(response.json())const response = await fetch("https://api.apiframe.ai/v2/videos/generate", {
method: "POST",
headers: {
"X-API-Key": "afk_your_api_key_here",
"Content-Type": "application/json",
},
body: JSON.stringify({
prompt: "a cinematic sunrise over a futuristic cityscape",
model: "kling-3.0",
klingParams: {
duration: 10,
mode: "pro",
aspect_ratio: "16:9",
generate_audio: true,
},
}),
});
console.log(await response.json());Try it
POST
/v2/videos/generateTry it