kling-4.0-flash omni-video
curl --request POST \
--url https://models.kapon.cloud/kling/omni-video/kling-4.0-flash \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": {
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 3
},
"contents": [
{
"type": "prompt",
"text": "Follow the movement in @motion"
},
{
"type": "feature_video",
"url": "https://example.com/reference.mp4",
"id": "motion"
}
]
}
'import requests
url = "https://models.kapon.cloud/kling/omni-video/kling-4.0-flash"
payload = {
"settings": {
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 3
},
"contents": [
{
"type": "prompt",
"text": "Follow the movement in @motion"
},
{
"type": "feature_video",
"url": "https://example.com/reference.mp4",
"id": "motion"
}
]
}
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: '720p', aspect_ratio: '16:9', duration: 3},
contents: [
{type: 'prompt', text: 'Follow the movement in @motion'},
{type: 'feature_video', url: 'https://example.com/reference.mp4', id: 'motion'}
]
})
};
fetch('https://models.kapon.cloud/kling/omni-video/kling-4.0-flash', 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-flash",
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' => '720p',
'aspect_ratio' => '16:9',
'duration' => 3
],
'contents' => [
[
'type' => 'prompt',
'text' => 'Follow the movement in @motion'
],
[
'type' => 'feature_video',
'url' => 'https://example.com/reference.mp4',
'id' => 'motion'
]
]
]),
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-flash"
payload := strings.NewReader("{\n \"settings\": {\n \"resolution\": \"720p\",\n \"aspect_ratio\": \"16:9\",\n \"duration\": 3\n },\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"Follow the movement in @motion\"\n },\n {\n \"type\": \"feature_video\",\n \"url\": \"https://example.com/reference.mp4\",\n \"id\": \"motion\"\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-flash")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"resolution\": \"720p\",\n \"aspect_ratio\": \"16:9\",\n \"duration\": 3\n },\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"Follow the movement in @motion\"\n },\n {\n \"type\": \"feature_video\",\n \"url\": \"https://example.com/reference.mp4\",\n \"id\": \"motion\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://models.kapon.cloud/kling/omni-video/kling-4.0-flash")
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\": \"720p\",\n \"aspect_ratio\": \"16:9\",\n \"duration\": 3\n },\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"Follow the movement in @motion\"\n },\n {\n \"type\": \"feature_video\",\n \"url\": \"https://example.com/reference.mp4\",\n \"id\": \"motion\"\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 Flash · 全能参考与编辑
支持首帧、参考图、参考视频、待编辑视频和可验证的现有主体。仅支持720p,显式时长为3至20秒的整数。audio 为 original 时需传 base_video 或 feature_video。按官方计费时长和冻结客户价结算。
POST
/
kling
/
omni-video
/
kling-4.0-flash
kling-4.0-flash omni-video
curl --request POST \
--url https://models.kapon.cloud/kling/omni-video/kling-4.0-flash \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"settings": {
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 3
},
"contents": [
{
"type": "prompt",
"text": "Follow the movement in @motion"
},
{
"type": "feature_video",
"url": "https://example.com/reference.mp4",
"id": "motion"
}
]
}
'import requests
url = "https://models.kapon.cloud/kling/omni-video/kling-4.0-flash"
payload = {
"settings": {
"resolution": "720p",
"aspect_ratio": "16:9",
"duration": 3
},
"contents": [
{
"type": "prompt",
"text": "Follow the movement in @motion"
},
{
"type": "feature_video",
"url": "https://example.com/reference.mp4",
"id": "motion"
}
]
}
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: '720p', aspect_ratio: '16:9', duration: 3},
contents: [
{type: 'prompt', text: 'Follow the movement in @motion'},
{type: 'feature_video', url: 'https://example.com/reference.mp4', id: 'motion'}
]
})
};
fetch('https://models.kapon.cloud/kling/omni-video/kling-4.0-flash', 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-flash",
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' => '720p',
'aspect_ratio' => '16:9',
'duration' => 3
],
'contents' => [
[
'type' => 'prompt',
'text' => 'Follow the movement in @motion'
],
[
'type' => 'feature_video',
'url' => 'https://example.com/reference.mp4',
'id' => 'motion'
]
]
]),
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-flash"
payload := strings.NewReader("{\n \"settings\": {\n \"resolution\": \"720p\",\n \"aspect_ratio\": \"16:9\",\n \"duration\": 3\n },\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"Follow the movement in @motion\"\n },\n {\n \"type\": \"feature_video\",\n \"url\": \"https://example.com/reference.mp4\",\n \"id\": \"motion\"\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-flash")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"settings\": {\n \"resolution\": \"720p\",\n \"aspect_ratio\": \"16:9\",\n \"duration\": 3\n },\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"Follow the movement in @motion\"\n },\n {\n \"type\": \"feature_video\",\n \"url\": \"https://example.com/reference.mp4\",\n \"id\": \"motion\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://models.kapon.cloud/kling/omni-video/kling-4.0-flash")
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\": \"720p\",\n \"aspect_ratio\": \"16:9\",\n \"duration\": 3\n },\n \"contents\": [\n {\n \"type\": \"prompt\",\n \"text\": \"Follow the movement in @motion\"\n },\n {\n \"type\": \"feature_video\",\n \"url\": \"https://example.com/reference.mp4\",\n \"id\": \"motion\"\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