Guide
Kling 4.0 Flash API Guide: Three Modes, $0.1225 per Second and Examples
Text-to-video, image-to-video and reference-to-video share one set of parameters: 720p, 3–20 seconds, native audio
- Model
- kling-4.0-flash
On this page
What Kling 4.0 Flash is
Kling 4.0 Flash is the fast tier of Kling 4.0. On HiAPI it is split into three model IDs, one per input type:
kling-4.0-flash/text-to-video: a prompt in, a video out.kling-4.0-flash/image-to-video: one first-frame image plus a prompt describing motion and camera.kling-4.0-flash/reference-to-video: 1–10 reference images that you address as@Image1,@Image2and so on in the prompt, so people, products or a style stay consistent across the clip.
All three output 720p video, 3–20 seconds long (whole seconds, 5 by default), with native audio generated together with the picture. You don't need to add a soundtrack separately.
Pricing: $0.1225 per second, same for all three modes
You pay per second of output at $0.1225. Audio is included and reference images cost nothing extra. Common lengths:
- 5 seconds (default): $0.6125
- 10 seconds: $1.225
- 20 seconds (maximum): $2.45
The cost depends only on duration. The simplest way to save money is to test prompts and framing at 3–5 seconds, then extend once the shot works. Failed tasks are refunded in full.
Parameters
The three models share prompt, duration and resolution. They differ in image input and frame shape:
prompt: up to 2,500 characters. Required for text-to-video and reference-to-video. Optional for image-to-video, though describing motion and camera gives you more control.duration: an integer from 3 to 20. Defaults to 5.resolution: only720pfor now.aspect_ratio: text-to-video accepts 16:9 (default), 9:16, 1:1 and 21:9. Reference-to-video addsauto, which is its default. Image-to-video has no such parameter; the frame follows the input image.image_urls: exactly one image for image-to-video, 1–10 for reference-to-video, none for text-to-video.
Making a request
Video generation on HiAPI is asynchronous: you create a task, then poll for the result. model goes at the top level and everything else goes inside input.
Text-to-video, vertical, 8 seconds:
curl -X POST https://api.hiapi.ai/v1/tasks \
-H "Authorization: Bearer $HIAPI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-4.0-flash/text-to-video",
"input": {
"prompt": "A neon street corner on a rainy night, a girl with a clear umbrella turns to look at the camera, slow push-in, rain and distant traffic sounds",
"aspect_ratio": "9:16",
"duration": 8
}
}'
That request costs 8 × $0.1225 = $0.98.
Reference-to-video, with two images to lock the person and the product:
{
"model": "kling-4.0-flash/reference-to-video",
"input": {
"prompt": "The woman from @Image1 picks up the bottle from @Image2 by a cafe window, turns to the camera and smiles, natural light",
"image_urls": [
"https://example.com/model.jpg",
"https://example.com/bottle.jpg"
],
"aspect_ratio": "16:9",
"duration": 5
}
}
Once the task is created, poll GET https://api.hiapi.ai/v1/tasks/{taskId} until it succeeds, then take the video URL from the output.
Which mode to use
- You have an idea but no assets: use text-to-video. It is good for exploring directions and previsualizing shots.
- You already have a finished frame (a poster, a product hero shot, a character sheet): use image-to-video. Composition and colors follow the first frame, so the prompt only needs to say how things move.
- The same person or product must appear across different shots: use reference-to-video. Name each image as
@ImageNin the prompt and say what it does in the scene.
Current limits
- 720p only, with no 1080p tier.
- 20 seconds per call at most. Longer pieces need to be generated in segments and edited together.
- Images must be public http(s) URLs, JPEG or PNG, at least 300px on each side, with an aspect ratio between 2:5 and 5:2.
- Audio is always generated with the picture and there is no switch to turn it off. Describe the sound you want (ambience, effects, mood) in the prompt.
Related articles
View all articles →-
Guide
FLUX 3 Image Klein API Guide: Five Resolution Tiers, Parameters and Examples
One model ID for text-to-image and reference editing, $0.0092–$0.0412 per image from 768 to 4K
4 min read -
Guide
Seedream 5.5 API Guide: Pricing, Parameters and Examples
Priced by size tier with a per-reference fee; one model ID for text-to-image and image editing
5 min read -
Guide
Gemini Omni 1.2 Flash Integration Guide: Input Modes, Parameters, and Spec-Based Billing
The minimal integration path for the public model gemini-omni-1.2-flash: input modes, parameter constraints, copyable requests, and resolution-based billing