Kling 2.5 Turbo Pro 文生视频
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kwaivgi/kling-v2.5-turbo-pro/text-to-video",
"input": {
"prompt": "A slow camera pan across a sunlit garden.",
"duration": 5,
"aspect_ratio": "16:9"
}
}
'import requests
url = "https://api.vidgo.ai/api/generate/submit"
payload = {
"model": "kwaivgi/kling-v2.5-turbo-pro/text-to-video",
"input": {
"prompt": "A slow camera pan across a sunlit garden.",
"duration": 5,
"aspect_ratio": "16:9"
}
}
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({
model: 'kwaivgi/kling-v2.5-turbo-pro/text-to-video',
input: {
prompt: 'A slow camera pan across a sunlit garden.',
duration: 5,
aspect_ratio: '16:9'
}
})
};
fetch('https://api.vidgo.ai/api/generate/submit', 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://api.vidgo.ai/api/generate/submit",
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([
'model' => 'kwaivgi/kling-v2.5-turbo-pro/text-to-video',
'input' => [
'prompt' => 'A slow camera pan across a sunlit garden.',
'duration' => 5,
'aspect_ratio' => '16:9'
]
]),
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.vidgo.ai/api/generate/submit"
payload := strings.NewReader("{\n \"model\": \"kwaivgi/kling-v2.5-turbo-pro/text-to-video\",\n \"input\": {\n \"prompt\": \"A slow camera pan across a sunlit garden.\",\n \"duration\": 5,\n \"aspect_ratio\": \"16:9\"\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.vidgo.ai/api/generate/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"kwaivgi/kling-v2.5-turbo-pro/text-to-video\",\n \"input\": {\n \"prompt\": \"A slow camera pan across a sunlit garden.\",\n \"duration\": 5,\n \"aspect_ratio\": \"16:9\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vidgo.ai/api/generate/submit")
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 \"model\": \"kwaivgi/kling-v2.5-turbo-pro/text-to-video\",\n \"input\": {\n \"prompt\": \"A slow camera pan across a sunlit garden.\",\n \"duration\": 5,\n \"aspect_ratio\": \"16:9\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "task-unified-example",
"status": "running",
"created_time": "2026-09-10T08:00:00"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Kling
Kling 2.5 Turbo Pro 文生视频
使用 Kling 2.5 Turbo Pro 创建 5 秒或 10 秒的场景,通过文本控制主体、动作和视觉风格。
POST
/
api
/
generate
/
submit
Kling 2.5 Turbo Pro 文生视频
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kwaivgi/kling-v2.5-turbo-pro/text-to-video",
"input": {
"prompt": "A slow camera pan across a sunlit garden.",
"duration": 5,
"aspect_ratio": "16:9"
}
}
'import requests
url = "https://api.vidgo.ai/api/generate/submit"
payload = {
"model": "kwaivgi/kling-v2.5-turbo-pro/text-to-video",
"input": {
"prompt": "A slow camera pan across a sunlit garden.",
"duration": 5,
"aspect_ratio": "16:9"
}
}
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({
model: 'kwaivgi/kling-v2.5-turbo-pro/text-to-video',
input: {
prompt: 'A slow camera pan across a sunlit garden.',
duration: 5,
aspect_ratio: '16:9'
}
})
};
fetch('https://api.vidgo.ai/api/generate/submit', 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://api.vidgo.ai/api/generate/submit",
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([
'model' => 'kwaivgi/kling-v2.5-turbo-pro/text-to-video',
'input' => [
'prompt' => 'A slow camera pan across a sunlit garden.',
'duration' => 5,
'aspect_ratio' => '16:9'
]
]),
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.vidgo.ai/api/generate/submit"
payload := strings.NewReader("{\n \"model\": \"kwaivgi/kling-v2.5-turbo-pro/text-to-video\",\n \"input\": {\n \"prompt\": \"A slow camera pan across a sunlit garden.\",\n \"duration\": 5,\n \"aspect_ratio\": \"16:9\"\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.vidgo.ai/api/generate/submit")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"kwaivgi/kling-v2.5-turbo-pro/text-to-video\",\n \"input\": {\n \"prompt\": \"A slow camera pan across a sunlit garden.\",\n \"duration\": 5,\n \"aspect_ratio\": \"16:9\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.vidgo.ai/api/generate/submit")
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 \"model\": \"kwaivgi/kling-v2.5-turbo-pro/text-to-video\",\n \"input\": {\n \"prompt\": \"A slow camera pan across a sunlit garden.\",\n \"duration\": 5,\n \"aspect_ratio\": \"16:9\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "task-unified-example",
"status": "running",
"created_time": "2026-09-10T08:00:00"
}
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}Request timeout{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}{
"detail": "<string>"
}- 提交后会返回
task_id。如果提供了callback_url,当任务状态变为finished或failed时,系统会向callback_url发送 POST 请求。 - 无论是否提供
callback_url,都可以通过统一的查询任务状态接口获取结果。
模型
- kwaivgi/kling-v2.5-turbo-pro/text-to-video - 根据文本提示词生成视频场景。
- 如需帧引导,请使用图生视频接口。
功能
- 根据文本提示词生成视频场景。
- 用
negative_prompt描述需要避免的内容。
时长选项
- 5、10 秒 -
duration设为整数。可选。默认值:5 秒。字符串、布尔值、小数时长和null会被拒绝。
高级参数
model 和可选的 callback_url 放在请求根级。所有工作流程参数(包括输出选项)都放在 input 中。
只发送该工作流程支持的 input 字段。不支持的 input 字段会在扣除积分前被拒绝。
提示词
prompt:必填。描述场景和期望的动作。长度:1-2,500 个字符。- 请提供字符串,不能是数字、布尔值、数组或对象。检查 2,500 个 Unicode 字符上限之前会先去除首尾空白。
宽高比
aspect_ratio:可选字符串。未规定预设选项或默认值。不使用时省略。
负面提示词
negative_prompt:可选。描述需要避免的内容。
计费因素
计费取决于视频时长(duration)。文生视频和图生视频费率相同。
提交时扣除积分,任务失败时退还。授权
使用 VIDGO_API_KEY。
请求体
application/json