Create Video From Multiple Images
April 18, 2025 (November 16, 2026)
Table of contents
This endpoint generates a video from multiple images (up to 4) that will appear as elements in the video.
Model 3.0 additionally supports saved elements via element_1-element_3 parameters, with a combined maximum of 3 images/elements.
Model Support Matrix
| Feature | v3.0 | v1.6 |
|---|---|---|
Image inputs (image_0-image_3) | ||
Element inputs (element_1-element_3) | ||
| Max combined inputs | 3 | 4 |
| Duration | 3-15s | 5/10s |
| Audio | Always on | Optional |
| aspect_ratio |
https://api.useapi.net/v1/kling/videos/image2video-elements
Request Headers
Authorization: Bearer {API token}
Content-Type: application/json
# Alternatively you can use multipart/form-data
# Content-Type: multipart/form-data
API tokenis required, see Setup useapi.net for details.
Request Body
{
"email": "[email protected]",
"prompt": "A museum gallery with artwork on display",
"image_0": "https://example.com/image1.jpg",
"image_1": "https://example.com/image2.jpg",
"image_2": "https://example.com/image3.jpg",
"image_3": "https://example.com/image4.jpg",
"negative_prompt": "low quality, blurry, distorted",
"duration": "5",
"aspect_ratio": "16:9",
"model_name": "kling-v1-6",
"mode": "std",
"replyUrl": "https://your-callback-url.com/webhook",
"replyRef": "your-reference-id"
}
-
emailis optional. Leave it out and the job goes to one of your accounts that has a free job slot, picked at random. Each account runs at most itsmaxJobsjobs at once, and GET scheduler/available shows the free slots. If no account has a free slot, the response is429.
Passemailto run the job on that account (429if it is busy). Uploaded files, elements, voices, avatars and earlier tasks belong to one account, so pass theemailof the account they came from.
With more than one account, reading the task with GET tasks/task_idneeds its account’semail. The response’stask.userIdis that account’ssession.userIdin GET accounts, and GET scheduler lists each running task with itsemail. -
promptis required, text description of the video to generate.
Maximum length: 2500 characters. -
image_0toimage_3are URLs to images that will appear in the video. At least one image or element must be provided. Images can be uploaded using POST /assets and the returned URLs can be used here. -
element_1toelement_3are optional, IDs of saved elements. Model3.0only. Model1.6ignores them next to an image and the response lists that inwarnings. Without an image it returns400. Create elements using POST /elements. Combined total of images + elements cannot exceed 3 for model3.0. -
negative_promptis optional, what not to include in the generated video. Maximum length: 2500 characters. Model3.0ignores it and the response lists that inwarnings. -
durationis optional, length of the video in seconds. Model3.0:3to15seconds (default5). Model1.6:5(default) or10. -
aspect_ratiois optional, the video aspect ratio. Supported values:16:9(default),9:16,1:1. Model3.0ignores it (the aspect ratio comes from the input image) and the response lists that inwarnings. -
model_nameis optional, the AI model version to use. Supported values:kling-v3-0,kling-v1-6(default). -
modeis optional, quality level. Supported values:std(standard, default),pro(higher quality, slower generation), or4k(4K resolution, model3.0only). Model1.6runs4kasproand the response lists that inwarnings. -
enable_audiois optional, add sound effects. Supported values:false(default) ortrue. Model3.0defaults to audio enabled; setenable_audio: falseto disable. -
maxJobsis optional, range from1to50.
Specifies the maximum number of concurrent jobs. -
replyUrlis optional, a callback URL to receive generation progress and result.
See GET /tasks/task_idfor response model. -
replyRefis optional, a reference identifier for the callback.
Note: At least one image or element must be provided. For model 1.6, at least one of image_0-image_3 is required. For model 3.0, elements (element_1-element_3) alone are also sufficient.
Responses
-
{ "task": { "id": 123456789, "userId": 12345, "type": "m2v_img2video_hq", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "m2v_img2video_hq", "inputs": [ { "name": "ref_img_0", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/image1.jpg", "cover": null, "fromWorkId": null }, { "name": "raw_ref_img_0", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/image1.jpg", "cover": null, "fromWorkId": null }, { "name": "ref_img_1", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/image2.jpg", "cover": null, "fromWorkId": null }, { "name": "raw_ref_img_1", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://example.com/image2.jpg", "cover": null, "fromWorkId": null } ], "arguments": [ { "name": "prompt", "value": "A museum gallery with artwork on display" }, { "name": "negative_prompt", "value": "low quality, blurry, distorted" }, { "name": "duration", "value": "5" }, { "name": "aspect_ratio", "value": "16:9" }, { "name": "kling_version", "value": "1.6" }, { "name": "imageList", "value": "[{\"top\":0,\"left\":0,\"width\":1,\"height\":1},{\"top\":0,\"left\":0,\"width\":1,\"height\":1}]" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1745376611075, "updateTime": 1745376611075 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "m2v_img2video_hq", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null }When the model cannot honor a value of the request, the job still runs the way it always has and the response adds a
warningsarray that says what was used instead, for example"warnings": ["aspect_ratio is ignored by kling-v3-0 (the aspect ratio comes from the input image)"]. The field is left out when there is nothing to report. -
The parameters are invalid. When Kling refuses the submitted parameters,
errorcarries Kling’s own message.{ "error": "At least one image (image_0, image_1, image_2 or image_3) is required" } -
{ "error": "Unauthorized", "code": 401 } -
Kling was unable to locate one of the referenced assets. Make sure to use POST /assets to upload assets.
{ "error": "Sorry, the requested resource was not found (VALID.ResourceNotFound)", "message": "Not Found" } -
The Kling account named in
erroris out of credits, and Kling did not create a task. Add credits or upgrade the plan of that account on kling.ai, or send the job to another account withemail.messagekeeps Kling’s own text.{ "error": "Kling account [email protected] is out of credits: Credit are insufficient, you can upgrade your membership or purchase credit. (TASK.PointNotEnough)", "message": "积分消费失败 (TASK.PointNotEnough)" } -
Kling uses a
500response to indicate moderation and other issues with the input. It may be hard to separate actual 500 errors from moderation errors, so use theerrorfield text and your best judgement to tell them apart, since themessagefield most often has very generic and perhaps misleading text.{ "error": "The content you uploaded appears to violate the community guidelines. (CM_EXT.POther)", "message": "Service busy (CM_EXT.POther)" }
When successful, the response includes a task ID which can be used to check the status using GET /tasks/task_id.
Model
The new task, with its task.id and status_name: poll it with GET /tasks/task_id until status_final is true.
The task record, field by field
{ // TypeScript, all fields are optional
task: {
id: number
userId: number
type: string
scene: string
status: number
status_name: 'submitted' | 'failed' | 'processing' | 'succeed'
status_final: boolean
taskInfo: {
type: string
inputs: Array<{
name: string
inputType: string
token: string | null
blobStorage: any | null
url: string
cover: string | null
fromWorkId: number | null
}>
arguments: Array<{
name: string
value: string
}>
extraArgs: Record<string, any>
callbackPayloads: any[]
scene: string
}
favored: boolean
deleted: boolean
viewed: boolean
createTime: number
updateTime: number
viewTime: number
}
works: Array<any>
status: number
status_name: 'submitted' | 'failed' | 'processing' | 'succeed'
status_final: boolean
message: string
error: string
limitation: {
type: string
remaining: number
limit: number
}
userPoints: {
points: Array<{
orderId: string
type: string
amount: number
balance: number
startTime: number
endTime: number
}>
total: number
}
userTickets: {
ticket: Array<{
orderId: string
type: string
packageType: string
amount: number
balance: number
startTime: number
endTime: number
}>
}
editProject: any | null
warnings: string[] // only when a value of the request was run differently or ignored, e.g. mode 4k as pro
}
Examples
-
curl -X POST "https://api.useapi.net/v1/kling/videos/image2video-elements" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer …" \ -d '{ "email": "[email protected]", "prompt": "A museum gallery with artwork on display", "image_0": "https://example.com/image1.jpg", "image_1": "https://example.com/image2.jpg", "negative_prompt": "low quality, blurry, distorted" }' -
const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/videos/image2video-elements"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, prompt: "A museum gallery with artwork on display", image_0: "https://example.com/image1.jpg", image_1: "https://example.com/image2.jpg", negative_prompt: "low quality, blurry, distorted" }) }); const result = await response.json(); console.log("response", {response, result}); -
import requests token = "API token" email = "Previously configured account email" apiUrl = "https://api.useapi.net/v1/kling/videos/image2video-elements" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "prompt": "A museum gallery with artwork on display", "image_0": "https://example.com/image1.jpg", "image_1": "https://example.com/image2.jpg", "negative_prompt": "low quality, blurry, distorted" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json())