Generate Videos with Omni
December 11, 2025 (October 20, 2026)
Table of contents
- Version Comparison
- Request Headers
- Request Body
- Prompt Reference Syntax
- Responses
- Model
- Examples
- Try It
This endpoint generates videos using Kling’s Omni model (O1 and v3) and Kling 4.0 (v4). It supports multiple workflows for different use cases:
- Default workflow: Text-to-video with optional image/element references
- Frames workflow: Generate video between start and end frame images
- Video Reference workflow: Use reference videos to guide generation style (up to 5 with
v4) - Video Transform workflow: Transform/modify a reference video
Version Comparison
| Feature | v4 | v3 | O1 |
|---|---|---|---|
| Duration | 3-30s | 3-15s | 3-10s |
| Mode | std (720p), pro (1080p) | std, pro, 4k | std, pro |
| Multi-shot | |||
| Native Audio | enable_audio (default on, no video) | ||
| Aspect Ratio | 16:9 (default), 9:16, 1:1, 21:9, auto | 16:9 (default), 9:16, 1:1 | 16:9 (default), 9:16, 1:1 |
Aspect Ratio auto | Frames workflow only | Frames workflow only | |
| Workflows | Default, Video Reference | All | All |
Max image_N | 10 | 7 | 7 |
Max element_N | 7 | 7 | 7 |
| Reference videos | Up to 5, 3-30s each, 30s in total | 1, 3-15s | 1, 3-10s |
Voices (voice_N) | Up to 3 | ||
| Prompt length | 8000 | 1700 | 1700 |
| VIDEO elements |
Omni 4.0 costs the same as Kling 4.0 on POST /videos/text2video (see the cost calculator). Kling offers 1080p to paid Kling subscribers only. 4K and HDR are not available for 4.0 yet.
If your Kling account can’t use Kling 4.0 yet, the request returns a 403 error.
https://api.useapi.net/v1/kling/videos/omni
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 woman @image_1 dancing elegantly in a ballroom",
"duration": "5",
"aspect_ratio": "16:9",
"count": 1,
"image_1": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg"
}
-
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 (unless using multi-shot), the text description of the video to generate. Maximum length: 8000 characters forv4and 1700 characters foro1andv3. Cannot be used together with multi-shot parameters (shot_N_prompt/shot_N_duration). Use@image_1,@image_2, etc. to reference images in your prompt. Use@element_1,@element_2, etc. (or@object_1, etc.) to reference saved elements. Use@video_1to reference a video in your prompt (@video_1through@video_5withv4). Use@voice_1,@voice_2and@voice_3to reference voices withv4. -
omni_versionis optional, the Omni model version to use. Supported values:o1,v3(default),v4. Versionv4uses Kling 4.0. It supports the default and video reference workflows, takes IMAGE and VIDEO elements, up to 5 reference videos and up to 3 voices, always generates stereo audio, and does not takeframe_start/frame_end,video_mode: transformor multi-shot. For start, end and keyframe images with Kling 4.0, use POST /videos/image2video-frames withmodel_name: kling-v4-0. -
modeis optional, the generation mode. Supported values:std(default),pro, or4k(4K resolution,omni_versionv3only). Versionv4supportsstd(720p) andpro(1080p). Kling offers 1080p to paid Kling subscribers only. -
enable_audiois optional, whether to generate native audio (a soundtrack) for the video. Default:true. Applies toomni_version: v3without a reference video. Set tofalsefor a silent video, which uses the lower audio-off price tier. Not valid together withvideo_1(usekeep_audiofor video workflows), withomni_version: o1, or withv4, which always generates audio.
Workflow Selection
The workflow is automatically determined based on which inputs you provide:
| Inputs Provided | Workflow |
|---|---|
frame_start (with optional frame_end) | Frames |
video_1 with video_mode=transform | Video Transform |
video_1 with video_mode=reference (default) | Video Reference |
| Images/elements only, or text-only | Default |
Default Workflow (Images/Elements)
Use images and/or saved elements as references in your prompt.
-
image_1throughimage_7are optional, URLs of reference images. You can upload images using POST /assets. Reference in prompt using@image_1,@image_2, etc. -
image_8throughimage_10are optional, more reference images forv4only. -
element_1throughelement_7are optional, IDs of saved elements. Create elements using POST /elements. Reference in prompt using@element_1or@object_1, etc.
Note: For o1 and v3, images and elements share the same pool of 7 slots. Combined total cannot exceed 7. For v4, you can use up to 10 images and up to 7 elements, with up to 15 references in total, counting image_N, element_N, video_N and voice_N.
Frames Workflow
Generate video that transitions between a start frame and optional end frame.
-
frame_startis required for frames workflow, URL of the start frame image. Internally mapped toimage_1. -
frame_endis optional, URL of the end frame image. Internally mapped toimage_2. Cannot be used withoutframe_start.
Restrictions: When using frames workflow, image_N, element_N, and video_1 are not allowed. Version v4 does not support the frames workflow.
Video Reference/Transform Workflow
Use reference videos to guide generation or transform a video directly.
-
video_1is optional, URL of a reference video. You can upload videos using POST /assets. Reference in prompt using@video_1. Video must be 3-10 seconds long (O1), 3-15 seconds (v3), or 3-30 seconds (v4). -
video_2throughvideo_5are optional, more reference videos forv4only. Use them in order starting fromvideo_1, and reference them in the prompt as@video_2through@video_5. Each video must be 3-30 seconds long, and all reference videos together at most 30 seconds. You can use up to 5 videos and VIDEO elements together, with at most 3 VIDEO elements. Versionso1andv3takevideo_1only. video_modeis optional, how to use the video reference. Supported values:reference(default),transform.reference: Video guides the style/motion of generated contenttransform: Video is directly transformed/modified (not supported byv4)
keep_audiois optional, whether to keep the soundtrack ofvideo_1. Default:false. Only applies whenvideo_1is provided. Withv4,video_1must have sound.
Note: When using video_1 with o1 or v3, you can still include up to 4 images/elements (combined). Version v4 keeps its usual limits.
Voices (v4 only)
With v4, people in the video can speak in a voice you choose.
voice_1,voice_2andvoice_3are optional, voices foromni_version: v4. Each takes a voiceidornamefrom GET /videos/voices. To use your own voice, save it first with POST /videos/voices and pass the sameemailhere, because a saved voice belongs to that Kling account. Use them in order starting fromvoice_1, and reference them in the prompt as@voice_1,@voice_2and@voice_3, for exampleA woman says "Good morning" in the voice of @voice_1. Versionso1andv3return a400error forvoice_N.
Some voices have samples shorter than 3 seconds, which Kling does not accept — the request returns a 400 error.
Duration Support Matrix
Duration availability depends on the workflow, inputs, and version:
| Scenario | O1 Durations | v3 Durations | v4 Durations | Notes |
|---|---|---|---|---|
| Text-only (no inputs) | 5, 10 | 3-15 | 3-30 | O1 restricted |
| Single start frame only | 5, 10 | 3-15 | O1 restricted | |
| Images/elements provided | 3-10 | 3-15 | 3-30 | Full range |
| Both frames (start + end) | 3-10 | 3-15 | Full range | |
| With reference videos | Locked to video length | Locked to video length | 3-30 | O1 and v3 cannot be changed, v4 defaults to the total length of the reference videos |
durationis optional, the duration in seconds. Default:5. Cannot be used together with multi-shot parameters (shot_N_prompt/shot_N_duration). VIP required for durations7-10(O1) or7-15(v3). Versionv4takes3to30seconds. Withvideo_1ando1orv3, the duration is the video’s length and cannot be changed.
With reference videos andv4, you can set3to30seconds. The default is the total length of the reference videos in whole seconds, from3to30.
Aspect Ratio Support Matrix
| Workflow | Allowed Values | Default |
|---|---|---|
| Default (text/images/elements) | 16:9, 9:16, 1:1, 21:9 and auto (v4 only) | 16:9 |
| Frames workflow | auto only | auto |
| Video Reference/Transform | 16:9, 9:16, 1:1, 21:9 and auto (v4 only) | 16:9 |
aspect_ratiois optional. When usingframe_start, aspect ratio is alwaysauto(derived from input). Witho1andv3,autois NOT allowed for other workflows.
Input Limits Matrix
| Workflow | Max Images | Max Elements | Max Combined | Max Video | Max Voices |
|---|---|---|---|---|---|
| Default | 7 | 7 | 7 | 0 | 0 |
| Frames | 0 | 0 | 0 | 0 | 0 |
| Video Reference | 4 | 4 | 4 | 1 | 0 |
| Video Transform | 4 | 4 | 4 | 1 | 0 |
v4, Default or Video Reference | 10 | 7 | 15 (video_N and voice_N included) | 5 (VIDEO elements included, at most 3 of them) | 3 |
Multi-shot (v3 only)
Split a video into multiple shots, each with its own prompt and duration. Useful for storytelling with scene transitions. Either hand the whole job to the model with multi_shot, or direct each shot yourself with shot_1_prompt and friends.
-
multi_shotis optional, let the model cut the video into several shots on its own. Supported values:false(default) ortrue. You write one ordinarypromptand Kling decides where the cuts fall. Ignored whenshot_1_promptis present — directing the shots yourself already turns multi-shot on. -
shot_1_promptthroughshot_6_promptare optional, per-shot text prompts. Maximum length: 2500 characters per shot. Minimum 2 shots required. Cannot be used together withpromptorduration. Use@image_1,@element_1, etc. references within shot prompts. -
shot_1_durationthroughshot_6_durationare optional, per-shot duration in seconds. Each shot must have both prompt and duration. Total duration must be 3-15 seconds. Shots must be sequential with no gaps (e.g.shot_1+shot_2, notshot_1+shot_3).
Other Parameters
-
countis optional, the number of videos to generate. Range:1to4. Default:1. VIP required for counts2-4. -
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.
Prompt Reference Syntax
Reference your inputs in the prompt using these patterns:
| Input Type | Prompt Syntax | Example |
|---|---|---|
| Images | @image_1, @image_2, … | "A woman @image_1 dancing..." |
| Elements | @element_1 or @object_1, … | "Character @element_1 walks..." |
| Frames | @image_1, @image_2 | "Scene transitions from @image_1 to @image_2" |
| Video | @video_1 (@video_1 through @video_5 with v4) | "Scene like @video_1 but in winter" |
Voices (v4) | @voice_1, @voice_2, @voice_3 | 'A woman says "Good morning" in the voice of @voice_1' |
Responses
-
{ "task": { "id": 123456789, "userId": 12345, "type": "m2v_omni_video", "scene": "NORMAL_CREATION", "status": 5, "status_name": "submitted", "status_final": false, "taskInfo": { "type": "m2v_omni_video", "inputs": [ { "name": "image_1", "inputType": "URL", "token": null, "blobStorage": null, "url": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg", "cover": null, "fromWorkId": null } ], "arguments": [ { "name": "prompt", "value": "A woman Image1 dancing elegantly in a ballroom" }, { "name": "rich_prompt", "value": "A woman <<<image_1>>> dancing elegantly in a ballroom" }, { "name": "kling_version", "value": "o1" }, { "name": "model_mode", "value": "pro" }, { "name": "duration", "value": "5" }, { "name": "aspect_ratio", "value": "16:9" }, { "name": "imageCount", "value": "1" } ], "extraArgs": {}, "callbackPayloads": [], "scene": "NORMAL_CREATION" }, "favored": false, "deleted": false, "viewed": false, "createTime": 1733836800000, "updateTime": 1733836800000 }, "works": [], "status": 5, "status_name": "submitted", "status_final": false, "message": "", "limitation": { "type": "m2v_omni_video", "remaining": 10000, "limit": 10000 }, "userPoints": { "points": [], "total": 0 }, "userTickets": { "ticket": [] }, "editProject": null } -
The parameters are invalid. When Kling refuses the submitted parameters,
errorcarries Kling’s own message, for example for a voice whose sample is too short.{ "error": "v40 audio duration must be between 3.0 and 30.1 seconds: audio_1 (TASK.InvalidArguments)" } -
{ "error": "Unauthorized", "code": 401 } -
Your Kling account can’t use the requested model yet, for example Kling 4.0.
{ "error": "This Kling account does not have access to the requested model or feature (AUTH.VPrivilegeEscalation)", "message": "Service busy (AUTH.VPrivilegeEscalation)" } -
{ "error": "<error message>" } -
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
{ // 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
}
Examples
-
# Default workflow with image curl -X POST "https://api.useapi.net/v1/kling/videos/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "[email protected]", "prompt": "A woman @image_1 dancing elegantly in a ballroom", "duration": "5", "aspect_ratio": "16:9", "image_1": "https://s21-kling.klingai.com/ai-platform/xxx/xxx.jpg" }' # Kling 4.0 with images, 21:9 curl -X POST "https://api.useapi.net/v1/kling/videos/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "[email protected]", "omni_version": "v4", "prompt": "The woman @image_1 walks into the cafe @image_2 and orders a coffee", "duration": "12", "aspect_ratio": "21:9", "image_1": "https://s21-kling.klingai.com/ai-platform/xxx/woman.jpg", "image_2": "https://s21-kling.klingai.com/ai-platform/xxx/cafe.jpg" }' # Kling 4.0 with a voice and two reference videos curl -X POST "https://api.useapi.net/v1/kling/videos/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "[email protected]", "omni_version": "v4", "prompt": "The dancer from @video_1 performs the moves from @video_2, then says \"Good morning\" in the voice of @voice_1", "duration": "10", "video_1": "https://s21-kling.klingai.com/ai-platform/xxx/dancer.mp4", "video_2": "https://s21-kling.klingai.com/ai-platform/xxx/moves.mp4", "voice_1": "Emma" }' # Using saved element curl -X POST "https://api.useapi.net/v1/kling/videos/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "[email protected]", "prompt": "Character @element_1 walking through a garden", "duration": "5", "element_1": "u_123456789012345" }' # Frames workflow curl -X POST "https://api.useapi.net/v1/kling/videos/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "[email protected]", "prompt": "Smooth transition from @image_1 to @image_2", "duration": "5", "frame_start": "https://s21-kling.klingai.com/ai-platform/xxx/start.jpg", "frame_end": "https://s21-kling.klingai.com/ai-platform/xxx/end.jpg" }' # Video reference workflow curl -X POST "https://api.useapi.net/v1/kling/videos/omni" \ -H "Content-Type: application/json" \ -H "Authorization: Bearer ..." \ -d '{ "email": "[email protected]", "prompt": "Scene like @video_1 but in a winter setting", "video_1": "https://s21-kling.klingai.com/ai-platform/xxx/reference.mp4", "video_mode": "reference" }' -
const token = "API token"; const email = "Previously configured account email"; const apiUrl = "https://api.useapi.net/v1/kling/videos/omni"; const response = await fetch(apiUrl, { method: "POST", headers: { "Content-Type": "application/json", "Authorization": `Bearer ${token}`, }, body: JSON.stringify({ email: email, prompt: "Character @element_1 dancing elegantly", duration: "5", aspect_ratio: "16:9", element_1: "u_123456789012345" }) }); 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/omni" headers = { "Content-Type": "application/json", "Authorization" : f"Bearer {token}" } data = { "email": email, "prompt": "Character @element_1 walking through garden", "duration": "5", "aspect_ratio": "16:9", "element_1": "u_123456789012345" } response = requests.post(apiUrl, headers=headers, json=data) print(response, response.json())