ApiframeDocs
Video GenerationKling

Kling 4.0 Flash

Kling 4.0 Flash — the fast 720p tier of Kling 4.0, 3–20s with the same unified reference and editing inputs.

POST /v2/videos/generate — model: "kling-4.0-flash"

Kling 4.0 Flash is the speed/cost tier of Kling 4.0: 720p only, 3–20 seconds, with the same unified inputs — text, a first-frame image, reference images, reference videos, and a video to edit. Native audio is always on and prompts can be up to 26,000 characters.

Unlike the full model, image-to-video takes a single first frame (no middle or end keyframes) and there is no resolution choice.

See Video Generation overview for common request fields, response format, and error codes.

Model-specific parameters

ParameterTypeDefaultDescription
klingParams.durationinteger5Output duration in seconds (3–20). Ignored when base_video is set and omitted — the output keeps the clip's length
klingParams.aspect_ratiostring"16:9""21:9", "16:9", "9:16", or "1:1". Ignored when a start_image or base_video sets the shape
klingParams.start_imagestring—URL of the first frame
klingParams.reference_imagesstring[]—Up to 10 images for characters, products, scenes, or style
klingParams.reference_videosstring[]—Up to 5 clips (3–30s each, 30s total) for motion / camera / style reference
klingParams.base_videostring—A 3–30s clip to edit. Output keeps its length and aspect ratio
klingParams.keep_original_soundbooleanfalseKeep the input video's audio instead of generating native audio. Requires a video input

Credit cost

Pricing is per second at 720p:

VariantCredits / sec
720p12
720p-refvid8

Without video inputs the cost is 12 × duration: a 10-second clip costs 120 credits.

With reference_videos or a base_video the 720p-refvid rate applies to the total billed duration — output + max(input, output), where input is the combined length of all input clips. A 10-second output with a 5-second reference clip bills 8 × 20 = 160 credits.

Example result

Once the job is COMPLETED, the result object on GET /v2/jobs/:id looks like:

{
  "videoUrl": "https://cdn2.apiframe.ai/videos/b2c3d4e5-f6a7-8901-bcde-f23456789012.mp4"
}

See Result format for field details.

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": "the camera pulls back from the window as rain starts to fall",
    "model": "kling-4.0-flash",
    "klingParams": {
      "duration": 10,
      "start_image": "https://example.com/first-frame.png"
    }
  }'
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": "the camera pulls back from the window as rain starts to fall",
        "model": "kling-4.0-flash",
        "klingParams": {
            "duration": 10,
            "start_image": "https://example.com/first-frame.png",
        },
    },
)
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: "the camera pulls back from the window as rain starts to fall",
    model: "kling-4.0-flash",
    klingParams: {
      duration: 10,
      start_image: "https://example.com/first-frame.png",
    },
  }),
});
console.log(await response.json());

Try it

POST/v2/videos/generateTry it

On this page