Kuaishou
Kling 4.0
kling-4.0/image-to-video
Kuaishou video generation model that can generate 30-second videos with stereo audio in a single pass, supports multi-keyframe and first/last frame control, and is suitable for marketing short films and storyboard previews
Try kling-4.0/image-to-video
Input
Showcases
View all showcasesOutput
videoPricing
kling-4.0/image-to-video per second
| Specifications | Unit Price |
|---|---|
| 1080P | $0.330 |
Overview
The Kling 4.0 image-to-video route is designed for developers who need to generate continuous video from a single first-frame image. Provide a jpeg or png image along with a description of motion, camera movement, and mood to obtain a 3- to 30-second clip, with support for 720p and 1080p resolutions and multiple aspect ratios including 16:9, 9:16, 1:1, and 21:9, billed by output seconds. It is suited to creative workflows that need to start from a fixed frame and control camera direction, such as advertising storyboards, short social videos, and narrative previsualization.
Key Highlights
- Lock the starting frame with a single image — Use one image as the shot's starting point and control motion and camera direction with a prompt, reducing the visual drift that comes from text-only generation.
- Adjustable duration and aspect ratio by scene — Duration ranges from 3 to 30 seconds, and the aspect ratio can be landscape, portrait, square, or widescreen; if unspecified, it follows the source image's ratio.
- Tiered resolution for drafts and final cuts — Use 720p for quick test clips and 1080p for delivery-grade output; the latter takes noticeably longer to render, so you can switch by stage.
Capabilities
First-frame-driven video generation: Given an image and a prompt, the model generates video; the prompt describes motion, camera movement, and atmosphere, and the model continues the shot using the first frame as the visual baseline.
3- to 30-second duration control: Specify the clip length with the duration parameter. Short clips are for quick validation, while long clips reduce the work of generating multiple times and stitching them together; billing is calculated by output seconds.
Selectable resolution and aspect ratio: Supports two output tiers, 720p and 1080p, with aspect ratios of 16:9, 9:16, 1:1, and 21:9. If left empty, the source image's ratio is used, making it easy to fit different placements in one go.
Sound-direction prompts: The prompt field can also describe the desired sound, expressing visual motion and auditory direction in the same call.
Use Cases
- Advertising storyboards: extend a shot from a fixed product frame — Input a product image and a camera-movement description to produce a dynamic clip of a few seconds to tens of seconds, for ad assets or storyboard previsualization.
- Short social videos: turn a portrait frame into motion — Use the 9:16 aspect ratio to generate a short video clip from a single composition, ready for portrait-format publishing.
- Narrative previsualization: advance the story from key frames — Generate segments from a scene's first frame with motion and mood descriptions, for low-cost validation of shot pacing and narrative continuity.
- Widescreen atmospheric shots — Use the 21:9 aspect ratio to generate an atmospheric long take from a still image, for opening titles, transitions, or background visuals.
Limitations and Selection Advice
Only a single first-frame image input is supported; multiple reference assets, keyframe sequences, and first/last-frame control are not available. The maximum duration per generation is 30 seconds, and resolution is limited to 720p and 1080p. 1080p rendering takes noticeably longer, so before delivering a final cut, it is advisable to first validate the shot and motion direction at 720p. When generating video from text alone, choose the text-to-video route in the same series; for long narratives that require precise multi-shot continuity, generate in segments and then edit them together.
What's new
View changelog →- New model New model available: kling-4.0/image-to-video
- Parameter change kling-4.0/image-to-video Parameter Update
- New model New model launch: kling-4.0/text-to-video
Frequently asked questions
View all FAQs →-
What does the first-frame image need to be?
A publicly reachable jpeg or png URL inside the image_urls array, one image per request. That image becomes the opening frame of the clip.
-
What happens if I leave aspect ratio out?
Output follows the source image's ratio, so a portrait image stays portrait. Set aspect_ratio only when you want to override the original framing.
-
Is the prompt required?
Yes. The first frame supplies composition and identity; the prompt directs motion, camera and sound. Both are required, and shorter prompts usually work better.
-
How is image-to-video billed?
Per output second, same as text-to-video, with separate tiers for 720p and 1080p and no minimum charge.
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/image-to-video
routestringOptionalCurrent fixed value: default
inputobjectRequired
Business parameters for kling-4.0/image-to-video and route default — see the parameter table below.
promptstringRequiredminLength 1maxLength 2500Prompt for camera movement, shot, and atmosphere. Describe what moves in the frame and how it moves, and include the desired sound effects here as well. This parameter is required.
durationintegerOptionalDefault: 5min 3max 30Duration of the video clip in seconds, ranging from 3 to 30, billed per second, default 5 seconds.
image_urlsarrayRequiredminItems 1maxItems 1Array of starting first-frame images for the video; elements are jpeg or png images.
Array [ string ]
resolutionstringOptionalDefault: "720p"Output resolution, default 720p; rendering at 1080p takes noticeably longer than at 720p.
720p1080paspect_ratiostringOptionalOutput aspect ratio; when left blank, it follows the source image ratio.
16:99:161:121:9callbackobjectOptional
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/image-to-video",
"input": {
"prompt": "…",
"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/image-to-video",
input: {
"prompt": "…",
"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/image-to-video",
"input": {
"prompt": "…",
"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 →-
Tutorial
Kling 4.0 Image-to-Video API: Request Reference and a Real Run
-
Tutorial
Kling 4.0 Prompts: 6 Ready-to-Use Templates with Real Outputs
Product, food, travel, everyday moments, ambient shots with sound and image-to-video, each with a real clip, the full prompt and a one-click prefill link.
6 -
Comparison
Best Image-to-Video Model for Product Ads: Kling 4.0 vs Veo 3.1 vs Runway Gen-4.5 vs Seedance 2.5
One sneaker still, one prompt, four models: which kept the colorway, which added sound, and what a finished 8-second ad costs.
8
Related Models
View all models →Same Type
-
HeyGen Avatar IV HeyGen $0.150 /second -
Veo 3.1 Lite Google $0.060 /second -
Kling 3.0 Turbo Kuaishou $0.130 /second -
Runway Gen 4.5 Runway $0.172 /second -
Wan 3.0 Video Alibaba $0.040 /second -
Vidu Q3 Vidu $0.149 /second -
FLUX 3 Max Black Forest Labs $0.121 /second -
HappyHorse 1.0 Alibaba $0.168 /second -
HappyHorse 1.1 Alibaba $0.160 /second -
Seedance 2.5 ByteDance $0.121 /second -
Kandinsky 6.0 Pro $1.93 /video -
Ray 3.2 Luma $0.214 /video



