REST API · Kling 4.0 Flash
Kling 4.0 Flash API
Kling 4.0 at 720p for less, with image-to-video and video edits.
Use the same endpoints as every other model and change one field. Flash covers text-to-video, image-to-video, multi-reference and video editing at 720p, from 3 to 20 seconds, starting at 24 credits per second.
"model": "kling-4.0-flash"| 1 | curl -X POST 'https://kling3api.com/api/generate' \ |
| 2 | -H 'Authorization: Bearer YOUR_API_KEY' \ |
| 3 | -H 'Content-Type: application/json' \ |
| 4 | -d '{ |
| 5 | "model": "kling-4.0-flash", |
| 6 | "prompt": "A paper boat sails down a rainy city gutter, macro lens, the camera tracks alongside it", |
| 7 | "duration": 5, |
| 8 | "aspect_ratio": "9:16" |
| 9 | }' |
- Model ID
- kling-4.0-flash
- Duration
- 3–20 s
- Resolution
- 720p
- Aspect ratio
- 16:9 · 9:16 · 1:1 · 21:9
- Price from
- 24 credits/s
Two endpoints, one async flow
Every request is asynchronous. Create a task, keep the task_id, then poll the status endpoint until the video URL is ready.
Create an API key
Sign in and create a key in the dashboard. Send it as a Bearer token on every request, and keep it on your server, never in browser code.
http1 Authorization: Bearer YOUR_API_KEY POST /api/generate
Send the model ID, a prompt and your inputs. Credits are reserved when the task is accepted, and the response returns a task_id straight away.
json1 { 2 "code": 200, 3 "message": "success", 4 "data": { 5 "task_id": "n71f3a9c1e27b4d0a9k4flash", 6 "status": "IN_PROGRESS", 7 "consumed_credits": 120 8 } 9 } GET /api/status
Poll every 10–15 seconds. When status is SUCCESS, data.response[0] is the video URL. If a task fails, its credits go back to your balance.
json1 { 2 "code": 200, 3 "message": "success", 4 "data": { 5 "task_id": "n71f3a9c1e27b4d0a9k4flash", 6 "status": "SUCCESS", 7 "consumed_credits": 120, 8 "response": [ 9 "https://cdn.example.com/v/abc.mp4" 10 ], 11 "error_message": null 12 } 13 }
Request examples by input mode
Each tab is a complete request body for POST /api/generate. Replace the example URLs with your own public HTTPS files and send it.
Send a prompt with a duration and an aspect ratio. Without an aspect ratio, the video is 16:9.
| 1 | { |
| 2 | "model": "kling-4.0-flash", |
| 3 | "prompt": "A paper boat sails down a rainy city gutter, macro lens, the camera tracks alongside it", |
| 4 | "duration": 5, |
| 5 | "aspect_ratio": "9:16" |
| 6 | } |
mode is optional. Without it, the API infers it from your inputs: video selects video-edit, images or videos select reference-to-video, image selects image-to-video, and anything else is text-to-video.
Pricing per output second
You pay for the seconds you generate, rounded up to a whole credit per task. There is no monthly minimum.
| Configuration | Per second | 5 s video | 10 s video | 20 s video |
|---|---|---|---|---|
| Text, image or reference images | 24 credits/s | 120≈ $1.20 | 240≈ $2.40 | 480≈ $4.80 |
| With reference videos | 32 credits/s | 160≈ $1.60 | 320≈ $3.20 | 640≈ $6.40 |
| Video edit, per source second | 32 credits/s | 160≈ $1.60 | 320≈ $3.20 | 640≈ $6.40 |
Pay-as-you-go credit packs convert at 100 credits per US dollar, which is the rate used for the dollar figures above. Subscription plans can lower the effective rate. Every create response includes consumed_credits, so you can reconcile usage per task.
See credit packsRequest parameters
Send these fields at the top level of the JSON body for POST /api/generate.
Set to kling-4.0-flash.
text-to-video, image-to-video, reference-to-video or video-edit. Inferred from your inputs when omitted.
Describe the scene or the edit. Optional for image-to-video.
Output length in whole seconds, from 3 to 20. Ignored for video-edit. Defaults to 5.
16:9, 9:16, 1:1 or 21:9. References also accept auto.
First-frame image for image-to-video.
Up to 10 reference images, mentioned as @image_1, @image_2 and so on.
Up to 5 reference videos, mentioned as @video_1 and so on.
Source video for video-edit.
Keep the audio of the reference or source video. Defaults to false.
Limits and validation
Requests that break these rules are rejected with HTTP 400 before any credits are charged.
- prompt can be up to 2,500 characters. It is required for every mode except image-to-video.
- duration is a whole number of seconds from 3 to 20. The default is 5. Video edits ignore it and follow the source video.
- aspect_ratio is 16:9, 9:16, 1:1 or 21:9, and references also accept auto. Image-to-video and video edits follow the source.
- Output resolution is 720p.
- Up to 10 images and 5 reference videos per request. All media must be at a public HTTP or HTTPS URL.
- Video edits accept source videos from 3 to 20 seconds.
Which Kling model should you call?
All models share one API key, the same two endpoints and one credit balance. Switching models is a change to the request body, not a new integration.
| Model | Select with | Duration | Resolution | From | Best for |
|---|---|---|---|---|---|
| Kling 4.0 | "model": "kling-4.0" | 3–30 s | 720p · 1080p | 28.5 credits/s | Scenes up to 30 s at 1080p, multi-reference casting and keyframe-directed shots |
| Kling 4.0 Flash | "model": "kling-4.0-flash" | 3–20 s | 720p | 24 credits/s | Lower-cost 720p clips up to 20 s, image-to-video and video edits |
| Kling 3.0 | "type": "pro-text-to-video" | 3–15 s | pro / std | 40 credits/s | Existing Kling 3.0 integrations with pro and std modes and optional sound |
Kling 4.0 Flash API questions
What is the model ID for the Kling 4.0 Flash API?
Send "model": "kling-4.0-flash" in the body of POST /api/generate. Status checks use the same GET /api/status endpoint as every other model.
How much does the Kling 4.0 Flash API cost?
24 credits per output second for text, image and image-reference requests, and 32 credits per second when you add reference videos. A 10-second clip costs 240 credits. Credits for failed tasks go back to your balance.
Can I animate an image without a prompt?
Yes. Send an image with no prompt and Flash animates it as image-to-video. Adding a short prompt gives you more control over the motion.
How is a video edit billed?
Video edits are priced from the length of your source video at 32 credits per second, with a 3-second minimum. The exact amount is in consumed_credits in the create response.
What resolution does Kling 4.0 Flash return?
Flash returns 720p video. If you need 1080p, scenes longer than 20 seconds, subjects or keyframes, call Kling 4.0 with "model": "kling-4.0" instead.
Is this the official Kling API?
No. kling3api.com is an independent API platform that provides access to Kling models. It is not affiliated with or endorsed by Kuaishou.
Make your first Kling 4.0 Flash request
Create a key, paste the cURL example into your terminal and you will have a task_id in seconds.