Generate Videos with O1 (Omni)
December 11, 2025 (January 12, 2026)
Table of contents
This endpoint generates videos using Klingβs O1 (Omni) model. 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 a reference video to guide generation style
- Video Transform workflow: Transform/modify a reference video
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 when only one account configured. However, if you have multiple accounts configured, this parameter becomes required. -
promptis required, the text description of the video to generate. Maximum length: 1700 characters. 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. -
omni_versionis optional, the O1 model version to use. Supported values:o1(default). -
modeis optional, the generation mode. Supported values:std(default),pro.
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=reference (default) | Video Reference |
video_1 with video_mode=transform | Video Transform |
| 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. -
element_1throughelement_7are optional, IDs of saved elements. Create elements using POST /elements. Reference in prompt using@element_1or@object_1, etc.
Note: Images and elements share the same pool of 7 slots. Combined total cannot exceed 7.
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.
Video Reference/Transform Workflow
Use a reference video to guide generation or transform it 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. 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
keep_audiois optional, whether to keep audio from the reference video. Default:true. Only applies whenvideo_1is provided.
Note: When using video_1, you can still include up to 4 images/elements (combined).
Duration Support Matrix
Duration availability depends on the workflow and inputs:
| Scenario | Allowed Durations | Notes |
|---|---|---|
| Text-only (no inputs) | 5, 10 | Restricted set |
| Single start frame only | 5, 10 | Restricted set |
| Images/elements provided | 3, 4, 5, 6, 7, 8, 9, 10 | Full range |
| Both frames (start + end) | 3, 4, 5, 6, 7, 8, 9, 10 | Full range |
With video_1 | Locked to video length | Cannot be changed |
durationis optional, the duration in seconds. Default:5. VIP required for durations7-10. Whenvideo_1is provided, duration is auto-detected and cannot be overridden.
Aspect Ratio Support Matrix
| Workflow | Allowed Values | Default |
|---|---|---|
| Default (no video/frames) | 16:9, 9:16, 1:1 | 16:9 |
| Frames workflow | auto only | auto |
| Video Reference/Transform | auto only | auto |
aspect_ratiois optional. When usingframe_startorvideo_1, aspect ratio must beauto(forced automatically). For default workflow,autois NOT allowed.
Input Limits Matrix
| Workflow | Max Images | Max Elements | Max Combined | Max Video |
|---|---|---|---|---|
| Default | 7 | 7 | 7 | 0 |
| Frames | 0 | 0 | 0 | 0 |
| Video Reference | 4 | 4 | 4 | 1 |
| Video Transform | 4 | 4 | 4 | 1 |
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 | "Scene like @video_1 but in winter" |
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 } -
{ "error": "<error message>" } -
{ "error": "Unauthorized", "code": 401 } -
{ "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" }' # 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())