Kuaishou
Kling 4.0 Flash
kling-4.0-flash/image-to-video
A lightweight, fast video model in the Kuaishou Kling 4.0 series, supporting text-to-video, image-to-video, and reference-image generation, with a single clip length of 3 to 20 seconds and 720p output, suitable for rapid batch production of social media short videos and creative draft iteration
Try kling-4.0-flash/image-to-video
Input
Showcases
View all showcasesOutput
videoPricing
kling-4.0-flash/image-to-video per second
| Specifications | Unit Price |
|---|---|
| 720P | $0.1225 |
Overview
This is an image-to-video model that takes a single first-frame image and an optional prompt, and outputs a dynamic video clip with visuals. Input images support JPEG or PNG, must be at least 300 pixels in both width and height, and must have an aspect ratio between 2:5 and 5:2; the output frame shape follows the first-frame image. Users select a clip duration of 3 to 20 seconds, and the finished video is fixed at 720p. It is aimed at developers and content creators who need to quickly turn still images into short dynamic content, and is suitable for vertical social media assets, short product showcase clips, and rapid iteration on creative drafts.
Key Highlights
- Drive a dynamic clip with a single first-frame image — just provide one JPEG or PNG image, and the output aspect ratio stays consistent with the first-frame image, making it easy to reuse existing layout assets.
- Duration selectable at second-level granularity — set the clip length between 3 and 20 seconds per request, suitable for cutting into short scene clips according to platform pacing.
- Generous prompt limit — the optional prompt can be up to 2500 characters for describing motion, camera, and atmosphere, making it easy to spell out the visual concept.
- Fixed 720p output — every request renders uniformly at 720p, making it easy to batch-produce visual assets with consistent specs within short cycles.
Capabilities
- First-frame image-to-video: input an image that meets the size and aspect-ratio requirements as the starting frame, and the model generates a dynamic clip from it; the output aspect ratio follows that image, making it suitable for extending existing still frames into short videos.
- Motion and camera prompting: the optional prompt can be up to 2500 characters and can describe motion patterns, camera movement, and visual atmosphere to guide how the scene changes after the first-frame image.
- 3 to 20 second duration selection: set the clip length to one value between 3 and 20 seconds per request, defaulting to 5 seconds; billing is by duration, making it easy to control the length of each asset according to placement.
- 720p output: each request outputs a 720p video, suitable for short scene assets that require a consistent resolution and do not need higher clarity.
Use Cases
- Vertical short-form social media asset production — content creators generate several-second clips from vertical first-frame images to use as opening or transition shots on short-video platforms, quickly supplementing dynamic assets.
- Product showcase and e-commerce looping clips — operations staff upload product still images and pair them with short prompts describing camera and atmosphere to generate product showcase clips for detail pages or feed placements.
- Rapid visualization of creative drafts — creative teams turn storyboard first-frame images into short clips for internal discussion of pacing and shot concepts, reducing early waiting time.
- Rapid testing of layouts and hooks — marketers use the same first-frame image with different prompts to generate multiple short clips, compare the appeal of opening shots, and screen directions.
Limitations and Selection Advice
Only one first-frame image is supported, in JPEG or PNG format, with both width and height at least 300 pixels and an aspect ratio between 2:5 and 5:2; otherwise it cannot be used as input. Each clip duration must be one value between 3 and 20 seconds, and longer videos cannot be generated; resolution is fixed at 720p with no other specs supported. The output aspect ratio is determined by the first-frame image and cannot be specified separately. The prompt is optional and limited to 2500 characters. Video generation involves dynamic changes, and the model does not guarantee that the visual content will be reproduced exactly as expected or that every delivery will succeed.
What's new
View changelog →- New model Kling 4.0 Flash Now Available: Text, Image and Reference to Video
Frequently asked questions
View all FAQs →-
How long a video can this model generate?
A single generation produces 3 to 20 seconds, 5 seconds by default, billed per second. For long videos over 20 seconds, you need to split them into multiple segments, generate each separately, and then stitch them together.
-
What is the highest resolution that can be output?
Only one tier is available: 720p. The resolution parameter only accepts 720p, and this applies equally to text-to-video, image-to-video, and reference-to-video.
-
How do I choose between image-to-video and reference-to-video?
To make the picture start moving from a still frame, use image-to-video: put only 1 first-frame image in image_urls, and the output aspect ratio follows that image. To have the people and styles from multiple images participate in the composition, use reference-to-video: image_urls can hold 1 to 10 images, and you can choose aspect_ratio yourself.
-
Can the first frame and the last frame be controlled?
Specifying the end frame is currently not supported, and there is no multi-keyframe control. Image-to-video only fixes the starting image; the ending is generated by the model according to the prompt. To make the ending more controllable, you can clearly state the final action and where the camera stops in the prompt.
Create a generation task
https://api.hiapi.ai/v1/tasks Headers
AuthorizationstringRequiredAccount API key. Required on every request. Example: Bearer YOUR_HIAPI_API_KEY. Get your API key
Content-TypestringOptionalThe request body is always parsed as JSON; when sent, only application/json (optionally with charset) is accepted — any other value returns 415. Example: application/json.
Idempotency-KeystringOptionalIdempotency key, up to 255 bytes. Retries with the same key from the same account create the task only once; replays return the original taskId.
On network timeouts or client retries, the same key creates the task only once — no double charges (scope: the API key's account). Use a business-unique identifier as the key (e.g. "order-42"); replays return the original taskId, and keys expire 24 hours after the first request. See the Unified Async API overview for the full scenario matrix.
Body
modelstringRequiredCurrent fixed value: kling-4.0-flash/image-to-video
routestringOptionalCurrent fixed value: default
inputobjectRequired
Business parameters for kling-4.0-flash/image-to-video and route default — see the parameter table below.
promptstringOptionalmaxLength 2500Optional visual description used to specify motion, camera, and atmosphere; you can also write the desired sound content in it, and the audio will be generated together with the video.
durationintegerOptionalDefault: 5min 3max 20Duration of the generated video in seconds, ranging from 3 to 20, billed per second, defaulting to 5 seconds.
image_urlsarrayRequiredminItems 1maxItems 1Array of images marking the starting point of the storyboard, with elements being image addresses; JPEG or PNG is supported, width and height are both at least 300px, the aspect ratio is between 2:5 and 5:2, and the output frame shape follows the image.
Array [ string ]
resolutionstringOptionalDefault: "720p"Output resolution. This model only supports 720p rendering, defaulting to 720p.
720pcallbackobjectOptional
Terminal-state notification config. When omitted, no callback is delivered — poll the task yourself. See the callback note below.
Provide callback.url when creating a task and HiAPI POSTs to your service once the task reaches a terminal state — no polling needed. The callback payload mirrors the task detail structure; signature verification, delivery retries and idempotency are documented on the Unified Async API overview page.
urlstringRequiredRequired when callback is present. A POST is sent to this URL once the task reaches a terminal state; must be a valid http(s) URL.
whenstringOptionalDefault: "final"Only final is supported today — notified on both success and fail.
finalstoragestringOptionalDefault: "temp"Artifact storage tier: temp (default, retained about 7 days) or persistent (long-term, billed by size). Insufficient balance or exceeding the storage cap silently downgrades to temp; the effective tier is shown in the task detail response.
temppersistentRequest examples
# Submit an async task; returns a taskId immediately (no waiting for generation)
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/image-to-video",
"input": {
"duration": 5,
"image_urls": "…",
"resolution": "720p"
}
}' const res = await fetch("https://api.hiapi.ai/v1/tasks", {
method: "POST",
headers: {
Authorization: `Bearer ${process.env.HIAPI_API_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
model: "kling-4.0-flash/image-to-video",
input: {
"duration": 5,
"image_urls": "…",
"resolution": "720p"
}
}),
});
const task = await res.json();
// { code: 200, message: "success", data: { taskId } } import os, requests
res = requests.post(
"https://api.hiapi.ai/v1/tasks",
headers={"Authorization": f"Bearer {os.environ['HIAPI_API_KEY']}"},
json={
"model": "kling-4.0-flash/image-to-video",
"input": {
"duration": 5,
"image_urls": "…",
"resolution": "720p"
}
},
)
print(res.json()) # { code, message, data: { taskId } } 200 OK
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR"
}
} 400 Bad Request
{
"code": 400,
"message": "invalid request",
"data": null,
"error_code": "INVALID_REQUEST"
} Get task detail
https://api.hiapi.ai/v1/tasks/:id Response fields
taskIdstringRequiredTask ID, always prefixed with tk-hiapi-.
modelstringRequiredResolved full model name. Tasks submitted with the route parameter return base@route (e.g. gpt-image-2/text-to-image@ext); otherwise identical to the name passed at creation.
routestringOptionalPresent only when the task was submitted with an explicit route parameter; echoes the submitted value.
statusstringRequiredTask status.
queued Queued, not started yet.
handling Being processed.
archiving Processing finished, artifacts being prepared.
success Terminal: completed, artifacts available (output returned).
fail Terminal: failed (error returned).
After submission, check status: success and fail are terminal, everything else is non-terminal. Poll every 1–3 seconds until terminal. On success, download artifacts from output[].url and transfer them before expireAt; pass storage: "persistent" at creation time when long-term retention is needed.
creatednumberRequiredTask creation time (Unix seconds).
completednumberRequiredUnix seconds when the task reached a terminal state; fixed to 0 while not terminal.
outputarrayOptional
Present only when status == success. Artifact list — always an array; a single task may return multiple types at once (e.g. video + first_frame).
Array [ object ]
Array items
urlstringRequiredArtifact URL, directly downloadable.
typestringRequiredCurrent possible values: video, image, audio, first_frame, last_frame, thumbnail; more may be added later.
expireAtnumberRequiredUnix seconds until which the artifact remains accessible; download or transfer before it expires.
errorobjectOptional
Present only when status == fail.
codestringRequiredBusiness error code.
messagestringRequiredError description.
Response examples
Success
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-01HZTQ8BX2N3GM3YFK4Z9D7VQR",
"model": "happyhorse-1-0",
"status": "success",
"created": 1777282033,
"completed": 1777282099,
"output": [
{
"url": "https://cdn.hiapi.ai/tasks/.../video.mp4",
"type": "video",
"expireAt": 1777886899
}
]
}
} Processing (non-terminal)
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "archiving",
"created": 1777282033,
"completed": 0
}
} Failed
{
"code": 200,
"message": "success",
"data": {
"taskId": "tk-hiapi-...",
"model": "happyhorse-1-0",
"status": "fail",
"created": 1777282033,
"completed": 1777282099,
"error": {
"code": "TASK_FAILED",
"message": "task failed"
}
}
} Articles
View all articles →-
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
5 min read -
Tutorial
How to Use kling-4.0-flash Image-to-Video via the HiAPI API: curl and Python
A practical request walkthrough: first-frame image input, async job polling, sync audio, and error triage
10 min read -
Tutorial
How to Call kling-4.0-flash Reference-to-Video via the HiAPI API: curl and Python
A working request walkthrough for multi-reference image-to-video, async polling, and troubleshooting
11 min read
Related Models
View all models →Same Type
-
Kandinsky 6.0 Pro $1.93 /video -
Kling 3.0 Kuaishou $0.100 /second -
FLUX 3 Max Black Forest Labs $0.243 /second -
Grok Imagine 1.5 Lite xAI $0.029 /second -
Vidu Q4 Preview Vidu $0.051 /second -
Muse Video 1.0 Meta $0.034 /video -
Wan 2.7 Video Alibaba $0.100 /second -
Vidu Q3 Vidu $0.149 /second -
Seedance 2.0 ByteDance $0.010 /second -
HeyGen Avatar V HeyGen $0.150 /second -
Seedance 2.5 ByteDance $0.121 /second -
Kling 4.0 Kuaishou $0.204 /second