kling-4.0 omni-video
curl --request POST \
--url https://models.kapon.cloud/kling/omni-video/kling-4.0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": {
"resolution": "1080p",
"audio": "original"
},
"contents": [
{
"type": "prompt",
"text": "Change the red cup in @base to blue while preserving its original audio"
},
{
"type": "base_video",
"url": "https://example.com/base.mp4",
"id": "base"
}
]
}
'import requests
url = "https://models.kapon.cloud/kling/omni-video/kling-4.0"
payload = {
"settings": {
"resolution": "1080p",
"audio": "original"
},
"contents": [
{
"type": "prompt",
"text": "Change the red cup in @base to blue while preserving its original audio"
},
{
"type": "base_video",
"url": "https://example.com/base.mp4",
"id": "base"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {resolution: '1080p', audio: 'original'},
contents: [
{
type: 'prompt',
text: 'Change the red cup in @base to blue while preserving its original audio'
},
{type: 'base_video', url: 'https://example.com/base.mp4', id: 'base'}
]
})
};
fetch('https://models.kapon.cloud/kling/omni-video/kling-4.0', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://models.kapon.cloud/kling/omni-video/kling-4.0",
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([
'settings' => [
'resolution' => '1080p',
'audio' => 'original'
],
'contents' => [
[
'type' => 'prompt',
'text' => 'Change the red cup in @base to blue while preserving its original audio'
],
[
'type' => 'base_video',
'url' => 'https://example.com/base.mp4',
'id' => 'base'
]
]
]),
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://models.kapon.cloud/kling/omni-video/kling-4.0"
payload := strings.NewReader("{\n \"settings\": {\n \"resolution\": \"1080p\",\n \"audio\": \"original\"\n },\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"Change the red cup in @base to blue while preserving its original audio\"\n },\n {\n \"type\": \"base_video\",\n \"url\": \"https://example.com/base.mp4\",\n \"id\": \"base\"\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://models.kapon.cloud/kling/omni-video/kling-4.0")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"resolution\": \"1080p\",\n \"audio\": \"original\"\n },\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"Change the red cup in @base to blue while preserving its original audio\"\n },\n {\n \"type\": \"base_video\",\n \"url\": \"https://example.com/base.mp4\",\n \"id\": \"base\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://models.kapon.cloud/kling/omni-video/kling-4.0")
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 \"settings\": {\n \"resolution\": \"1080p\",\n \"audio\": \"original\"\n },\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"Change the red cup in @base to blue while preserving its original audio\"\n },\n {\n \"type\": \"base_video\",\n \"url\": \"https://example.com/base.mp4\",\n \"id\": \"base\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "success",
"request_id": "request-id",
"data": {
"id": "upstream-task-id",
"status": "submitted",
"create_time": 1781080778802,
"update_time": 1781080778802
}
}API 2.0
Kling 4.0 · 全能参考与编辑
支持关键帧、参考图片、feature_video/base_video、element和voice;默认1080p及adaptive画幅。省略时长由提示词、基片或默认10秒决定。视频输入总时长含视频主体,最多30秒;按usage.input_duration及usage.output_duration计算积分,outputs[].duration为媒体时长,不使用帧尾差或测试余额金额作为客户售价。缺最终计量时保留账务待处理,不猜扣款。
POST
/
kling
/
omni-video
/
kling-4.0
kling-4.0 omni-video
curl --request POST \
--url https://models.kapon.cloud/kling/omni-video/kling-4.0 \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": {
"resolution": "1080p",
"audio": "original"
},
"contents": [
{
"type": "prompt",
"text": "Change the red cup in @base to blue while preserving its original audio"
},
{
"type": "base_video",
"url": "https://example.com/base.mp4",
"id": "base"
}
]
}
'import requests
url = "https://models.kapon.cloud/kling/omni-video/kling-4.0"
payload = {
"settings": {
"resolution": "1080p",
"audio": "original"
},
"contents": [
{
"type": "prompt",
"text": "Change the red cup in @base to blue while preserving its original audio"
},
{
"type": "base_video",
"url": "https://example.com/base.mp4",
"id": "base"
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
settings: {resolution: '1080p', audio: 'original'},
contents: [
{
type: 'prompt',
text: 'Change the red cup in @base to blue while preserving its original audio'
},
{type: 'base_video', url: 'https://example.com/base.mp4', id: 'base'}
]
})
};
fetch('https://models.kapon.cloud/kling/omni-video/kling-4.0', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://models.kapon.cloud/kling/omni-video/kling-4.0",
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([
'settings' => [
'resolution' => '1080p',
'audio' => 'original'
],
'contents' => [
[
'type' => 'prompt',
'text' => 'Change the red cup in @base to blue while preserving its original audio'
],
[
'type' => 'base_video',
'url' => 'https://example.com/base.mp4',
'id' => 'base'
]
]
]),
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://models.kapon.cloud/kling/omni-video/kling-4.0"
payload := strings.NewReader("{\n \"settings\": {\n \"resolution\": \"1080p\",\n \"audio\": \"original\"\n },\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"Change the red cup in @base to blue while preserving its original audio\"\n },\n {\n \"type\": \"base_video\",\n \"url\": \"https://example.com/base.mp4\",\n \"id\": \"base\"\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://models.kapon.cloud/kling/omni-video/kling-4.0")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"resolution\": \"1080p\",\n \"audio\": \"original\"\n },\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"Change the red cup in @base to blue while preserving its original audio\"\n },\n {\n \"type\": \"base_video\",\n \"url\": \"https://example.com/base.mp4\",\n \"id\": \"base\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://models.kapon.cloud/kling/omni-video/kling-4.0")
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 \"settings\": {\n \"resolution\": \"1080p\",\n \"audio\": \"original\"\n },\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"Change the red cup in @base to blue while preserving its original audio\"\n },\n {\n \"type\": \"base_video\",\n \"url\": \"https://example.com/base.mp4\",\n \"id\": \"base\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"message": "success",
"request_id": "request-id",
"data": {
"id": "upstream-task-id",
"status": "submitted",
"create_time": 1781080778802,
"update_time": 1781080778802
}
}Authorizations
Body
application/json