Kling 4.0
Kuaishou's Kling 4.0 on the Kinovi API — text-to-video, multi-keyframe image-to-video (up to 10 frames), and reference-to-video at 720p or 1080p, 3–30 s.
- Model ID
kling-4.0/text-to-video- Type
- Video
- Provider
- Kuaishou
- From
- $0.0756 / s
Models in this series
Kling 4.0 ships as three public faces, each mapped to its dedicated upstream endpoint. Pick the model id that matches your input mode — a face never silently falls back to another mode.
| Model ID | Mode | Inputs | Model page |
|---|---|---|---|
kling-4.0/text-to-video | Text to video | Prompt only | Kling 4.0 Text to Video |
kling-4.0/image-to-video | Image / keyframes to video | 1–10 ordered keyframe images (imageUrls) + prompt | Kling 4.0 Image to Video |
kling-4.0/reference-to-video | Reference to video | Up to 10 images (imageUrls + keyframeUrls combined) and up to 5 reference videos (videoUrls) + prompt | Kling 4.0 Reference to Video |
Quickstart
Two calls: submit a task with createTask, then poll recordInfo with the returned taskId until status is success or fail.
Every request carries Authorization: Bearer <yourApiKey>. Create and manage keys at kinovi.ai/api-keys; see the API reference for rate limits and error codes.
Submit a task
POST https://kinovi.ai/api/v1/jobs/createTask
{
"model": "kling-4.0/text-to-video",
"inputs": {
"prompt": "A cinematic tracking shot through a neon-lit Tokyo alley in light rain, wet asphalt reflecting red lanterns, natural ambient street sound.",
"aspectRatio": "16:9",
"duration": 10,
"resolution": "1080p"
}
}Response 200 OK — the task is queued and credits are reserved. Use taskId to poll for the result.
{
"taskId": "task_01j9examplekling400001"
}Error responses
| HTTP | Body | When |
|---|---|---|
400 | { "message": "Invalid inputs for model", "errors": [ … ] } | Invalid face combination (e.g. imageUrls on text-to-video, aspectRatio: "adaptive" on text-to-video, audio on non-reference face, or duration outside 3–30). Nothing is charged. |
401 | { "message": "Invalid API Key" } | Missing or wrong Authorization header. |
402 | { "message": "Insufficient credits", "required": 407, "available": 0 } | Not enough credits for this duration × resolution. |
429 | { "message": "Concurrency limit reached (…)", "limit": 5, "current": 5 } | Too many tasks in progress; wait for one to finish. |
Query the result
GET https://kinovi.ai/api/v1/jobs/recordInfo?taskId=task_…
Poll every few seconds until status is success or fail.
status | Meaning |
|---|---|
waiting | Queued, not started yet |
generating | Running |
success | Done — read output[].url |
fail | Failed — see error.code / error.message; credits are refunded |
Parameters
Send these inside the createTask body. model and inputs.prompt are required on all three faces; everything else falls back to the default shown.
Reference media fields take any publicly reachable URL — host the files yourself, or upload them to Kinovi first with POST /api/v1/uploads and pass the returned url (see Uploading Assets).
| Field | Type | Default | Applies to | Description |
|---|---|---|---|---|
model | string | required | All | kling-4.0/text-to-video · kling-4.0/image-to-video · kling-4.0/reference-to-video. |
inputs.prompt | string | required | All | Scene description and motion instructions. Up to 26,000 ASCII characters or 11,000 non-ASCII characters (mixed prompts must satisfy E/26000 + N/11000 <= 1). |
inputs.duration | integer | 10 | All | Clip length in whole seconds, 3 to 30. |
inputs.resolution | string | 1080p | All | 720p · 1080p. |
inputs.aspectRatio | string | 16:9 (T2V) / adaptive (Ref) | T2V, Ref | T2V: 21:9 · 16:9 · 9:16 · 1:1. Ref adds adaptive. Image-to-video follows the keyframes' aspect ratio. |
inputs.imageUrls | string[] | – | I2V (required), Ref | I2V: 1–10 keyframe images in playback order (first = opening frame, last = closing frame, middle = intermediate frames). Ref: up to 10 subject/style reference images, cited as @image_1, @image_2… Each side ≥ 300 px, aspect ratio 2:5–5:2. Your own hosted URLs or Kinovi uploads. |
inputs.videoUrls | string[] | – | Ref only | Up to 5 MP4 reference videos, each 3–30 s and ≤ 30 s combined. Cited in prompt as @video_1, @video_2… Switches billing to the reference-video per-second rate. Your own hosted URLs or Kinovi uploads. |
inputs.keyframeUrls | string[] | – | Ref only | Optional keyframes in playback order. imageUrls + keyframeUrls combined cannot exceed 10 images. Your own hosted URLs or Kinovi uploads. |
inputs.audio | string | native | Ref only | native (generate audio) · original (keep reference video audio; requires at least one entry in videoUrls). |
callBackUrl | string | – | All | Optional webhook called when the task finishes. |
inputs.imageUrl and inputs.uploadedUrls are accepted as aliases for inputs.imageUrls, but only one image field may be sent per request.
Full request (reference-to-video)
{
"model": "kling-4.0/reference-to-video",
"inputs": {
"prompt": "The character from @image_1 walks across the rainy plaza following the camera arc from @video_1.",
"imageUrls": [
"https://static.kinovi.ai/generated-images/task_ff01ii3zvib7ndbx8negnh6q-0.png"
],
"videoUrls": [
"https://static.kinovi.ai/videos/seedance_video_1775631198994_17cd129c.mp4"
],
"aspectRatio": "adaptive",
"duration": 10,
"resolution": "1080p",
"audio": "native"
},
"callBackUrl": "https://example.com/hooks/kinovi"
}Pricing
Priced per second of video, by resolution. Live prices: Text to Video · Image to Video · Reference to Video.
| 720p | 1080p | |
|---|---|---|
| Standard (T2V, I2V, Ref without video) | $0.1260 / s | $0.1890 / s |
Reference-to-video with videoUrls (per billable second) | $0.0756 / s | $0.1134 / s |
When videoUrls is supplied on kling-4.0/reference-to-video, billable seconds equal input_duration + output_duration, settled on success at the reference-video rate. Without videoUrls, duration × the standard rate is charged at submit. Failed tasks are refunded in full.
Response
Result fields
{
"taskId": "task_01j9examplekling400001",
"model": "kling-4.0/text-to-video",
"status": "success",
"creditsUsed": 407.33,
"output": [
{
"url": "https://static.kinovi.ai/videos/kling40_example.mp4",
"width": 1920,
"height": 1080,
"mediaType": "video/mp4"
}
],
"error": null,
"createTime": 1790090613532,
"completeTime": 1790090901200
}Examples
Text to video (kling-4.0/text-to-video)
curl -sS -X POST "https://kinovi.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $KINOVI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-4.0/text-to-video",
"inputs": {
"prompt": "A steam locomotive crossing a misty stone viaduct at dawn, wide aerial tracking shot.",
"aspectRatio": "16:9",
"duration": 5,
"resolution": "1080p"
}
}'Image / keyframes to video (kling-4.0/image-to-video)
curl -sS -X POST "https://kinovi.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $KINOVI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-4.0/image-to-video",
"inputs": {
"prompt": "Smooth camera push-in as soft morning light shifts across the scene.",
"imageUrls": [
"https://static.kinovi.ai/generated-images/task_u91bn4h34rr0zy2m5o9z31si-0.png",
"https://static.kinovi.ai/generated-images/task_u91bn4h34rr0zy2m5o9z31si-1.png"
],
"duration": 5,
"resolution": "1080p"
}
}'Reference to video (kling-4.0/reference-to-video)
curl -sS -X POST "https://kinovi.ai/api/v1/jobs/createTask" \
-H "Authorization: Bearer $KINOVI_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "kling-4.0/reference-to-video",
"inputs": {
"prompt": "The subject in @image_1 turns toward the camera following the pacing of @video_1.",
"imageUrls": ["https://static.kinovi.ai/generated-images/task_ff01ii3zvib7ndbx8negnh6q-0.png"],
"videoUrls": ["https://static.kinovi.ai/videos/seedance_video_1775631198994_17cd129c.mp4"],
"aspectRatio": "adaptive",
"duration": 5,
"resolution": "720p",
"audio": "native"
}
}'Notes
- Prompt citations on reference-to-video: Cite reference images as
@image_1,@image_2, … and reference videos as@video_1,@video_2, … in the prompt. - Multi-keyframe ordering: On
kling-4.0/image-to-video(andkeyframeUrlsonreference-to-video), frames play in array order: index0is the first frame, the last item is the closing frame, and intermediate entries anchor middle beats.
FAQ
How many keyframes can I send to kling-4.0/image-to-video?
Between 1 and 10 images in inputs.imageUrls. With 1 image, it serves as the opening frame; with 2 or more, the first is the opening frame, the last is the closing frame, and any images between them act as intermediate keyframes.
How is kling-4.0/reference-to-video billed when I pass reference videos?
When videoUrls is included, Kinovi bills input_duration + output_duration at the lower reference-video per-second rate ($0.0756 / s at 720p, $0.1134 / s at 1080p) and settles the final credits on completion.
Can I keep the original audio from a reference video?
Yes — on kling-4.0/reference-to-video, set "audio": "original" alongside at least one clip in inputs.videoUrls.