API DocsAI Model APIsVideosKling 3.0

Omni

Unified Omni video generation with Kling 3.0 Omni. Combine prompts, images, Elements, and reference videos. Async task API: submit, poll, then download.

Generate video with the Kling 3.0 Omni model using a flexible mix of inputs: text prompts, first/last frames, reference images, Elements, feature videos, and base videos.

Supports multi-shot storytelling, native / original / off audio, 720p / 1080p / 4k resolution, and 3–15 second duration.

This is an async task-based API: submit a request to receive a task id, poll for status, then download the video when complete.

Only Kling 3.0 Omni is supported.

Base URL

  • https://api.autorouter.top — Production

Authentication

BearerAuth: http (bearer) Authenticate using a Bearer Token. Format: Authorization: Bearer sk-xxxxxx

Endpoints

POST /kling/omni-video/kling-3.0-omni

Create Video Generation Task

Create an Omni video generation task from prompts, images, Elements, and/or videos.

Headers

NameTypeRequiredDefaultDescription
Content-TypestringYesapplication/jsonData exchange format
AuthorizationstringYes-Auth header. Format: Bearer sk-xxxxxx

Request Body

Content-Type: application/json

Example (prompt only):

{
  "contents": [
    {
      "type": "prompt",
      "text": "Change the color of the parrot’s feathers to match the reference image. Keep all other elements of the video unchanged."
    }
  ],
  "settings": {
    "resolution": "1080p",
    "duration": 5,
    "audio": "native",
    "multi_shot": false
  },
  "options": {
    "callback_url": "https://xxx/callback",
    "external_task_id": "",
    "watermark_info": {
      "enabled": false
    }
  }
}

Example (first_frame & refer_image):

{
  "contents": [
    {
      "type": "prompt",
      "text": "Change the color of the parrot’s feathers to match the reference image. Keep all other elements of the video unchanged."
    },
    {
      "type": "first_frame",
      "url": "https://example.com/first.png",
      "id": "image_1"
    },
    {
      "type": "refer_image",
      "url": "https://example.com/refer.png",
      "id": "image_2"
    }
  ],
  "settings": {
    "resolution": "1080p",
    "duration": 5,
    "audio": "native",
    "multi_shot": false
  },
  "options": {
    "callback_url": "https://xxx/callback",
    "external_task_id": ""
  }
}

Example (first_frame & last_frame & element):

{
  "contents": [
    {
      "type": "prompt",
      "text": "Change the color of the parrot’s feathers to match the reference image. Keep all other elements of the video unchanged."
    },
    {
      "type": "first_frame",
      "url": "https://example.com/first.png",
      "id": "image_1"
    },
    {
      "type": "last_frame",
      "url": "https://example.com/last.png",
      "id": "image_2"
    },
    {
      "type": "element",
      "element_id": "162",
      "id": "element_1"
    },
    {
      "type": "element",
      "element_id": "163",
      "id": "element_2"
    }
  ],
  "settings": {
    "resolution": "1080p",
    "duration": 5,
    "audio": "native",
    "multi_shot": true
  },
  "options": {
    "callback_url": "https://xxx/callback",
    "external_task_id": ""
  }
}

Example (feature_video):

{
  "contents": [
    {
      "type": "prompt",
      "text": "Change the color of the parrot’s feathers to match the reference image. Keep all other elements of the video unchanged."
    },
    {
      "type": "feature_video",
      "url": "https://example.com/feature.mp4",
      "id": "video_1"
    }
  ],
  "settings": {
    "resolution": "4k",
    "audio": "off",
    "multi_shot": true
  },
  "options": {
    "callback_url": "https://xxx/callback",
    "external_task_id": ""
  }
}

Example (base_video):

{
  "contents": [
    {
      "type": "prompt",
      "text": "Change the color of the parrot’s feathers to match the reference image. Keep all other elements of the video unchanged."
    },
    {
      "type": "base_video",
      "url": "https://example.com/base.mp4",
      "id": "video_1"
    }
  ],
  "settings": {
    "resolution": "1080p",
    "audio": "original",
    "multi_shot": false
  },
  "options": {
    "callback_url": "https://xxx/callback",
    "external_task_id": ""
  }
}

Properties:

NameTypeRequiredDefaultEnumDescription
contentsobject[]Yes--Reference inputs (prompts, images, Elements, videos, etc.)
contents[].typestringYes-prompt, first_frame, last_frame, refer_image, feature_video, base_video, elementInput type
settingsobjectNo--Output config such as resolution and duration
settings.multi_shotbooleanNotrue-Whether to generate multi-shot video
settings.audiostringNooffnative, original, offWhether to generate audio for the video
settings.resolutionstringNo720p720p, 1080p, 4kVideo resolution
settings.aspect_ratiostringNo16:916:9, 9:16, 1:1Aspect ratio (width:height); required when there is no first frame or reference video
settings.durationintNo5315Duration in seconds
optionsobjectNo--General config such as callback URL and watermark
options.callback_urlstringNo--Callback URL for task status changes
options.external_task_idstringNo--Custom task ID; must be unique within the account
options.watermark_infoobjectNo--Whether to also generate a watermarked result

contentsobject[](Required)

Reference input collection. Example format:

[
  {
    "type": "prompt",
    "text": "string"
  },
  {
    "type": "first_frame",
    "url": "string",
    "id": "string"
  },
  {
    "type": "last_frame",
    "url": "string",
    "id": "string"
  },
  {
    "type": "refer_image",
    "url": "string",
    "id": "string"
  },
  {
    "type": "feature_video",
    "url": "string",
    "id": "string"
  },
  {
    "type": "base_video",
    "url": "string",
    "id": "string"
  },
  {
    "type": "element",
    "element_id": "string",
    "id": "string"
  }
]

typestring(Required)

Input type:

  • prompt: Text prompt
  • first_frame: First-frame image
  • last_frame: Last-frame image
  • refer_image: Element / scene reference image
  • feature_video: Feature reference video
  • base_video: Base video to edit
  • element: Element
type=promptobject(Mode-dependent)
{
  "type": "prompt",
  "text": "string"
}
  • text: Prompt content, max 3072 characters (recommended ≤ 2500)
  • Multi-shot format: "shot n, m, words; shot n, m, words;" (separated by standard semicolons), where:
    • n: shot sequence number (1–6 shots supported)
    • m: shot duration in seconds (each shot ≥ 1s; sum must equal total video duration)
    • words: shot prompt (max 512 characters)
  • Reference an image, Element, or video in the prompt with @xxx, e.g. @image_1, @Zhang, @video_1
  • Avoid Element names that are substrings of each other (e.g. @Zhang and @ZhangSan)
  • Avoid Element names that overlap with prompt content (e.g. do not use @gmail if the prompt contains xxx@gmail.com)
type=first_frame / last_frame / refer_imageobject(Mode-dependent)
{
  "type": "first_frame",
  "url": "string",
  "id": "string"
}

Images can be used as scene/style references, or as first/last frames.

  • url: Image URL or Base64
  • id: Optional input index ID for use in the prompt; must be unique within the same task
  • Formats: .jpg, .jpeg, .png
  • Size: max 50MB
  • Dimensions: width and height ≥ 300px; aspect ratio between 1:2.5 and 2.5:1
  • Supports first-frame and first-and-last-frame generation; last-frame-only is not supported
  • Quantity limits (depend on reference video and Element types):
    • No reference video + only multi-image Elements: total of reference images and multi-image Elements ≤ 7
    • No reference video + both video-character Elements and multi-image Elements: total of reference images and multi-image Elements ≤ 4
    • With a reference video + only multi-image Elements: total of reference images and multi-image Elements ≤ 4
    • With a reference video: video-character Elements and reference images cannot be used together
type=feature_video / base_videoobject(Mode-dependent)
{
  "type": "feature_video",
  "url": "string",
  "id": "string"
}
  • url: Video URL
  • id: Optional input index ID for use in the prompt; must be unique within the same task
  • Formats: .mp4, .mov
  • Size: max 200MB
  • Duration: 3s–15.5s (inclusive)
  • Dimensions: width and height between 700px and 4553px; total pixels ≤ 8294400; aspect ratio between 0.4 and 2
  • Frame rate: 24fps–60fps (output is 24fps)
  • Maximum 1 reference video. After adding a reference video, add at most one video-character Element

When using feature_video:

  • Multi-shot is supported; multi_shot must be true
  • Native audio is not supported; audio must be off

When using base_video (video to edit):

  • First/last frames are not supported
  • Multi-shot is not supported
  • Native audio is not supported; audio cannot be native
type=elementobject(Optional)
{
  "type": "element",
  "element_id": "string",
  "id": "string"
}
  • element_id: Element ID returned by the Element-related API
  • id: Input index ID used in the prompt (e.g. @element_1); must be unique within the same task
  • Elements are either video-character Elements (from video) or multi-image Elements (from images); limits differ by type
  • Count limits:
    • First frame or first-and-last frames: at most 3 Elements
    • No reference video + only multi-image Elements: reference images + multi-image Elements ≤ 7
    • No reference video + only video-character Elements: ≤ 3 video-character Elements
    • No reference video + both types: ≤ 3 video-character Elements; reference images + multi-image Elements ≤ 4
    • With reference video + only multi-image Elements: reference images + multi-image Elements ≤ 4
    • With reference video + only video-character Elements: ≤ 1 video-character Element
    • With a reference video: video-character Elements and multi-image Elements cannot be used together

settingsobject(Optional)

Output configuration such as resolution and duration.

multi_shotboolean(Optional)

Whether to generate multi-shot video. Default true.

When set to false, multi-shot prompts will not produce multi-shot output.

audiostring(Optional)

Whether to generate audio for the video. Default off.

  • native: Include native audio matching the visuals
  • original: Retain the original sound of the reference video
  • off: No audio
resolutionstring(Optional)

Output video resolution. Default 720p.

  • 720p: 720P output
  • 1080p: 1080P output
  • 4k: 4K output
aspect_ratiostring(Optional)

Aspect ratio of generated video frames. Default 16:9.

Options: 16:9, 9:16, 1:1

Required when there is no first frame or reference video.

durationint(Optional)

Video duration in seconds. Default 5.

Options: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15

optionsobject(Optional)

General configurations such as callback URL and watermark.

{
  "callback_url": "https://example.com/cb",
  "external_task_id": "string",
  "watermark_info": {
    "enabled": false
  }
}

callback_urlstring(Optional)

Callback URL for task result notifications. If set, the server sends a notification when the task status changes.

external_task_idstring(Optional)

Custom task ID. Does not overwrite the system-generated task ID and can be used for querying. Must be unique within the account.

watermark_infoobject(Optional)

Whether to also generate a watermarked result, controlled by enabled:

{
  "enabled": false
}
  • true: Include watermarked result
  • false (default): No watermark

Custom watermarks are not supported.

Responses

200: Task created successfully

Content-Type: application/json

Request Example

curl -X POST "https://api.autorouter.top/kling/omni-video/kling-3.0-omni" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx" \
  -d '{
  "contents": [
    {
      "type": "prompt",
      "text": "Change the color of the parrot’s feathers to match the reference image. Keep all other elements of the video unchanged."
    },
    {
      "type": "first_frame",
      "url": "https://example.com/first.png",
      "id": "image_1"
    },
    {
      "type": "refer_image",
      "url": "https://example.com/refer.png",
      "id": "image_2"
    }
  ],
  "settings": {
    "resolution": "1080p",
    "duration": 5,
    "audio": "native",
    "multi_shot": false
  },
  "options": {
    "callback_url": "https://xxx/callback",
    "external_task_id": ""
  }
}'

Response Example

{
  "code": 0,
  "message": "string",
  "request_id": "string",
  "data": {
    "id": "string",
    "status": "submitted",
    "create_time": 1781080778802,
    "update_time": 1781080794151,
    "external_id": "string"
  }
}

Response fields:

NameTypeDescription
codeintegerError code; 0 means success
messagestringError message
request_idstringRequest ID generated by the system
data.idstringSystem-generated task ID
data.statusstringTask status: submitted, processing, succeeded, failed
data.create_timeintegerTask creation time, Unix timestamp (ms)
data.update_timeintegerTask update time, Unix timestamp (ms)
data.external_idstringCustom task ID, if any

GET /kling/tasks

Query Video Generation Task

Query async task status and results by task ID or custom task ID.

  • Use either task_ids or external_task_ids, not both
  • Batch queries are supported; separate multiple IDs with ,
  • Generated results are cleared after about 30 days; save them promptly

Headers

NameTypeRequiredDefaultDescription
Content-TypestringYesapplication/jsonData exchange format
AuthorizationstringYes-Auth header. Format: Bearer sk-xxxxxx

Query Params

NameTypeRequiredDescription
task_idsstringNoSystem-generated task IDs, comma-separated
external_task_idsstringNoCustom task IDs, comma-separated

Responses

200: Task queried successfully

Content-Type: application/json

Request Example

curl -X GET "https://api.autorouter.top/kling/tasks?task_ids={id}" \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer sk-xxxxxx"

Response Example

{
  "code": 0,
  "message": "string",
  "request_id": "string",
  "data": [
    {
      "id": "893605946402811985",
      "status": "succeeded",
      "message": "string",
      "create_time": 1781080778802,
      "update_time": 1781080794151,
      "external_id": "string",
      "outputs": [
        {
          "type": "video",
          "id": "string",
          "url": "string",
          "watermark_url": "string",
          "duration": "5"
        }
      ],
      "billing": [
        {
          "charge_type": "cash",
          "cash_type": "balance",
          "amount": "string",
          "package_type": "video",
          "list_price": "string"
        }
      ]
    }
  ]
}

Response fields:

NameTypeDescription
codeintegerError code; 0 means success
messagestringError message
request_idstringRequest ID generated by the system, for tracing and troubleshooting
dataobject[]Task list
data[].idstringTask ID being queried
data[].statusstringTask status: submitted, processing, succeeded, failed
data[].messagestringStatus message; failure reason when failed (e.g. content moderation)
data[].create_timeintegerTask creation time, Unix timestamp (ms)
data[].update_timeintegerTask update time, Unix timestamp (ms)
data[].external_idstringCustom task ID, if any
data[].outputsobject[]Generated results; fields vary by type
data[].billingobject[]Billing details

statusstring

Task status:

  • submitted: Submitted
  • processing: Processing
  • succeeded: Succeeded
  • failed: Failed

Recommended poll interval: 3–5 seconds until status is succeeded or failed.

outputsobject[]

Generated results. Fields depend on type. Possible values: image, video, audio, element, voice. Omni success typically returns type=video.

type=videoobject
NameTypeDescription
typestringFixed as video
idstringVideo ID generated by the system
urlstringResult URL (hotlink-protected; cleared after ~30 days; save promptly)
watermark_urlstringWatermarked result URL (hotlink-protected)
durationstringGenerated video duration in seconds
type=imageobject
NameTypeDescription
typestringFixed as image
urlstringResult URL (hotlink-protected; cleared after ~30 days)
watermark_urlstringWatermarked image download URL (hotlink-protected)
group_idstringOnly present for grouped images; marks group relationship
type=audioobject
NameTypeDescription
typestringFixed as audio
idstringAudio ID generated by the system
mp3_urlstringMP3 result URL (hotlink-protected; cleared after ~30 days)
wav_urlstringWAV result URL (hotlink-protected; cleared after ~30 days)
mp3_durationstringMP3 duration in seconds
wav_durationstringWAV duration in seconds
type=voiceobject
NameTypeDescription
typestringFixed as voice
idstringAudio ID generated by the system
namestringAudio name
urlstringMaterial download link
owned_bystringVoice source: kling for official library, numbers for creator ID
statusstringStatus: succeeded, deleted
type=elementobject
NameTypeDescription
typestringFixed as element
idstringElement ID generated by the system
namestringElement name
descriptionstringElement description
element_typestringElement type: video_character_elements, multi_image_elements
referencesobject[]Related materials
references[].typestringMaterial type: image, video, voice
references[].rolestringMaterial role; image: frontal / reference; video and voice: refer
references[].urlstringMaterial download link
references[].idstringVoice ID (when type=voice)
references[].namestringVoice name (when type=voice)
references[].owned_bystringVoice source (when type=voice)
owned_bystringElement source: kling for official library, numbers for creator ID
statusstringStatus: succeeded, deleted
tagsobject[]Element tags
tags[].idintegerTag ID
tags[].namestringTag name
tags[].descriptionstringTag description

billingobject[]

Billing details.

charge_typestring

Account charge type:

  • cash: Balance deduction
  • unit: Resource package deduction
cash_typestring

Balance type; only present when charge_type=cash:

  • balance: Official quota
  • test_balance: Test quota
amountstring

Deduction amount. When charge_type=cash, the discounted balance price; when charge_type=unit, the resource package units deducted (decimal string).

package_typestring

Resource package type; only present when charge_type=unit. Enum: video, image, audio.

list_pricestring

List price for balance deduction; only present when charge_type=cash.

Error Handling

HTTP 400 Parameter Errors

ScenarioSuggestion
Missing contentsProvide at least one valid content item
Last frame onlyNot supported; include a first frame
Invalid image / video format or sizeFollow first_frame / refer_image / feature_video / base_video limits
Too many reference images or ElementsFollow the quantity limits for the current mode
feature_video with audio=nativeUse audio=off
base_video with first/last frame or multi_shot / audio=nativeFollow base-video restrictions
Missing aspect_ratio when no first frame or reference videoProvide settings.aspect_ratio
Invalid duration / resolution / audioUse documented enum values
Multi-shot duration mismatchEnsure sum of shot durations equals settings.duration

HTTP 401 / 403 Auth Errors

  • 401 Unauthorized: Invalid or expired API Key
  • 403 Forbidden: API Key is not allowed to access this model

HTTP 402 Insufficient Balance

Insufficient balance. Please top up in the AutoRouter console.

Task failed Status

CauseSuggestion
Content moderation failedAdjust the prompt or change reference media
Image / video URL unreachableEnsure public access, or use Base64 for images
Invalid parameter combinationFollow the Request Body rules

When a task fails, AutoRouter automatically refunds your account.

On this page