Model routes
Create a Kling Omni video
Create a Kling Omni video task with the model ID in the URL, then retrieve the result by task ID.
POST
/
omni-video
/
{model}
cURL
curl https://api.cometapi.com/omni-video/kling-3.0-omni \
-H "Authorization: Bearer $COMETAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"contents": [
{
"type": "prompt",
"text": "A paper boat drifts on a pond."
}
],
"settings": {
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5,
"multi_shot": false,
"audio": "off"
}
}
JSONimport os
import requests
response = requests.post(
"https://api.cometapi.com/omni-video/kling-3.0-omni",
headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
json={
"contents": [
{
"type": "prompt",
"text": "A paper boat drifts on a pond.",
}
],
"settings": {
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5,
"multi_shot": False,
"audio": "off",
},
},
)
response.raise_for_status()
result = response.json()
print(result["data"]["id"])
const response = await fetch(
"https://api.cometapi.com/omni-video/kling-3.0-omni",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"contents": [
{
"type": "prompt",
"text": "A paper boat drifts on a pond."
}
],
"settings": {
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5,
"multi_shot": false,
"audio": "off"
}
}),
},
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
console.log(result.data.id);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/omni-video/{model}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contents' => [
[
'type' => 'prompt',
'text' => 'A paper boat drifts on a pond.'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cometapi.com/omni-video/{model}"
payload := strings.NewReader("{\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"A paper boat drifts on a pond.\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cometapi.com/omni-video/{model}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"A paper boat drifts on a pond.\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/omni-video/{model}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"A paper boat drifts on a pond.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "SUCCEED",
"data": {
"id": "example-task-id",
"status": "submitted"
}
}Use
For
The response returns an
Use the
POST /omni-video/{model} to create an asynchronous Kling Omni video task. Place the model ID in the URL and provide the input in contents.
Choose a model
kling-3.0-omni:720p,1080p, or4k; 3-15 seconds;native,original, oroffaudio.kling-o1:720por1080p; 3-10 seconds;originaloroffaudio.
kling-3.0-omni. To create a silent video, set settings.audio to off.
Request parameters
| Field | Required | Description |
|---|---|---|
Path model | Yes | Model ID in the URL. Choose an ID from the list above; do not add it to the request body. |
contents | Yes | Nonempty array of video inputs. For a text-only request, include a prompt item. |
contents[].type | Yes | prompt, first_frame, last_frame, refer_image, feature_video, or base_video. A last_frame needs a first_frame. |
contents[].text | For a prompt item | Text that describes the video. |
contents[].url | For image or video items | Image URL or Base64 image data; video items use a public video URL. |
settings.resolution | No | Output resolution. If omitted, the request uses 720p. Available values depend on model. |
settings.aspect_ratio | No | Frame shape: 16:9, 9:16, or 1:1. If omitted, the request uses 16:9. |
settings.duration | No | Video length in whole seconds. If omitted, the request uses 5 seconds. Use a duration within the selected model’s range. |
settings.multi_shot | No | For kling-3.0-omni, set true for multiple shots or false for one continuous shot. Do not include this field for kling-o1. |
settings.audio | No | Set native, original, or off according to the selected model and inputs. |
options.callback_url | No | HTTPS URL that receives task status callbacks. |
options.external_task_id | No | Your own task identifier for correlation; retain the returned data.id for queries. |
options.watermark_info.enabled | No | Set to true to request a watermark. |
kling-3.0-omni, a feature_video input requires settings.multi_shot: true and settings.audio: off. A base_video input requires settings.multi_shot: false and cannot use settings.audio: native. Do not combine base_video with a first or last frame.
The official default for kling-3.0-omni is multi_shot: true; set the field explicitly when you need a defined shot mode. For kling-o1, prompts can contain up to 2500 characters. If the request contains only a first_frame and no other reference image or video, use a duration of 5 or 10 seconds.
To create a five-second text-only video, send this request body to POST /omni-video/kling-3.0-omni:
{
"contents": [
{
"type": "prompt",
"text": "A paper boat drifts on a pond."
}
],
"settings": {
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5,
"multi_shot": false,
"audio": "off"
}
}
id for the asynchronous task:
{
"code": 0,
"message": "SUCCEED",
"data": {
"id": "example-task-id",
"status": "submitted"
}
}
data.id value with Get a Kling task until the task completes. Read the finished video URL from the task’s outputs array. Store the video in your own storage if you need durable access.
The OpenAPI panel contains matching Shell, Python, and JavaScript requests. For more input combinations, see the Kling 3.0 Omni video API reference or Kling O1 Omni video API reference.Authorizations
Authenticate with your CometAPI API key.
Path Parameters
Kling Omni model ID. The selected model controls resolution, duration, and audio choices.
Available options:
kling-3.0-omni, kling-o1 Body
application/json
Omni video request fields exposed by the CometAPI route. The model ID is a path parameter, not a body field.
Video input items. Send a prompt item for text-only generation.
Minimum array length:
1Show child attributes
Show child attributes
Output settings exposed by the CometAPI route. Set model-specific fields explicitly for the intended result.
Show child attributes
Show child attributes
Optional task fields exposed by the CometAPI route.
Show child attributes
Show child attributes
Response
200 - application/json
Task created. Store data.id for a GET /tasks query.
Last modified on September 25, 2026
⌘I
cURL
curl https://api.cometapi.com/omni-video/kling-3.0-omni \
-H "Authorization: Bearer $COMETAPI_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'JSON'
{
"contents": [
{
"type": "prompt",
"text": "A paper boat drifts on a pond."
}
],
"settings": {
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5,
"multi_shot": false,
"audio": "off"
}
}
JSONimport os
import requests
response = requests.post(
"https://api.cometapi.com/omni-video/kling-3.0-omni",
headers={"Authorization": "Bearer " + os.environ["COMETAPI_KEY"]},
json={
"contents": [
{
"type": "prompt",
"text": "A paper boat drifts on a pond.",
}
],
"settings": {
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5,
"multi_shot": False,
"audio": "off",
},
},
)
response.raise_for_status()
result = response.json()
print(result["data"]["id"])
const response = await fetch(
"https://api.cometapi.com/omni-video/kling-3.0-omni",
{
method: "POST",
headers: {
Authorization: `Bearer ${process.env.COMETAPI_KEY}`,
"Content-Type": "application/json",
},
body: JSON.stringify({
"contents": [
{
"type": "prompt",
"text": "A paper boat drifts on a pond."
}
],
"settings": {
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 5,
"multi_shot": false,
"audio": "off"
}
}),
},
);
if (!response.ok) throw new Error(`HTTP ${response.status}`);
const result = await response.json();
console.log(result.data.id);
<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.cometapi.com/omni-video/{model}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'contents' => [
[
'type' => 'prompt',
'text' => 'A paper boat drifts on a pond.'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.cometapi.com/omni-video/{model}"
payload := strings.NewReader("{\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"A paper boat drifts on a pond.\"\n }\n ]\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.cometapi.com/omni-video/{model}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"A paper boat drifts on a pond.\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.cometapi.com/omni-video/{model}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"A paper boat drifts on a pond.\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "SUCCEED",
"data": {
"id": "example-task-id",
"status": "submitted"
}
}