kling-3.0-turbo Video Generation
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"reference_images": [
"<string>"
],
"resolution": "<string>",
"duration": 123,
"aspect_ratio": "<string>",
"watermark": true
}
'import requests
url = "https://toapis.com/v1/videos/generations"
payload = {
"model": "<string>",
"prompt": "<string>",
"reference_images": ["<string>"],
"resolution": "<string>",
"duration": 123,
"aspect_ratio": "<string>",
"watermark": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
prompt: '<string>',
reference_images: ['<string>'],
resolution: '<string>',
duration: 123,
aspect_ratio: '<string>',
watermark: true
})
};
fetch('https://toapis.com/v1/videos/generations', 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://toapis.com/v1/videos/generations",
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' => '<string>',
'prompt' => '<string>',
'reference_images' => [
'<string>'
],
'resolution' => '<string>',
'duration' => 123,
'aspect_ratio' => '<string>',
'watermark' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://toapis.com/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"reference_images\": [\n \"<string>\"\n ],\n \"resolution\": \"<string>\",\n \"duration\": 123,\n \"aspect_ratio\": \"<string>\",\n \"watermark\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://toapis.com/v1/videos/generations")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"reference_images\": [\n \"<string>\"\n ],\n \"resolution\": \"<string>\",\n \"duration\": 123,\n \"aspect_ratio\": \"<string>\",\n \"watermark\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://toapis.com/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"reference_images\": [\n \"<string>\"\n ],\n \"resolution\": \"<string>\",\n \"duration\": 123,\n \"aspect_ratio\": \"<string>\",\n \"watermark\": true\n}"
response = http.request(request)
puts response.read_bodykling-3.0-turbo
kling-3.0-turbo Video Generation
Generate videos with the official kling-3.0-turbo model through the standard ToAPIs async video endpoint
POST
/
v1
/
videos
/
generations
kling-3.0-turbo Video Generation
curl --request POST \
--url https://toapis.com/v1/videos/generations \
--header 'Authorization: <authorization>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "<string>",
"prompt": "<string>",
"reference_images": [
"<string>"
],
"resolution": "<string>",
"duration": 123,
"aspect_ratio": "<string>",
"watermark": true
}
'import requests
url = "https://toapis.com/v1/videos/generations"
payload = {
"model": "<string>",
"prompt": "<string>",
"reference_images": ["<string>"],
"resolution": "<string>",
"duration": 123,
"aspect_ratio": "<string>",
"watermark": True
}
headers = {
"Authorization": "<authorization>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: '<authorization>', 'Content-Type': 'application/json'},
body: JSON.stringify({
model: '<string>',
prompt: '<string>',
reference_images: ['<string>'],
resolution: '<string>',
duration: 123,
aspect_ratio: '<string>',
watermark: true
})
};
fetch('https://toapis.com/v1/videos/generations', 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://toapis.com/v1/videos/generations",
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' => '<string>',
'prompt' => '<string>',
'reference_images' => [
'<string>'
],
'resolution' => '<string>',
'duration' => 123,
'aspect_ratio' => '<string>',
'watermark' => true
]),
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>",
"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://toapis.com/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"reference_images\": [\n \"<string>\"\n ],\n \"resolution\": \"<string>\",\n \"duration\": 123,\n \"aspect_ratio\": \"<string>\",\n \"watermark\": true\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "<authorization>")
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://toapis.com/v1/videos/generations")
.header("Authorization", "<authorization>")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"reference_images\": [\n \"<string>\"\n ],\n \"resolution\": \"<string>\",\n \"duration\": 123,\n \"aspect_ratio\": \"<string>\",\n \"watermark\": true\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://toapis.com/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = '<authorization>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"<string>\",\n \"prompt\": \"<string>\",\n \"reference_images\": [\n \"<string>\"\n ],\n \"resolution\": \"<string>\",\n \"duration\": 123,\n \"aspect_ratio\": \"<string>\",\n \"watermark\": true\n}"
response = http.request(request)
puts response.read_bodyNote for users in mainland China: Please use
https://toapis.cn as the API endpoint (Base URL). Replace https://toapis.com with https://toapis.cn in the examples in this document.- Async task API, returns a task ID after submission
- Uses the new official Kling Turbo upstream protocol
- Supports text-to-video and image-to-video with first-frame input only
resolutionsupports720pand1080pdurationsupports3s,4s,5s,6s,7s,8s,9s,10s,11s,12s,13s,14s,15saspect_ratioapplies to text-to-video requestswatermarkis a boolean toggle only; custom watermark payloads are not supported
Use publicly accessible image URLs. Do not pass base64 image data. Upload local images with the Upload Image API first.
Authorization
string
required
All endpoints require Bearer Token authentication.
Authorization: Bearer YOUR_API_KEY
Request Parameters
string
required
Video generation model name, fixed as
kling-3.0-turbo.string
required
Text prompt. For image-to-video, this is sent to Kling Turbo as the
prompt content item.string[]
Optional input images. For Kling Turbo image-to-video, only the first image is used as
first_frame.Tail frame input is not supported in this integration. Additional input images are ignored.
string
default:"720p"
Video resolution.Supported values:
720p1080p
integer
default:"5"
Video duration in seconds.Supported values:
3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15string
default:"16:9"
Video aspect ratio for text-to-video.Supported values:
16:99:161:1
boolean
default:"false"
Whether to add the official Kling watermark.
Examples
Text-to-Video
{
"model": "kling-3.0-turbo",
"prompt": "A cinematic shot of a red sports car driving through rain",
"resolution": "720p",
"duration": 5,
"aspect_ratio": "16:9"
}
Image-to-Video
{
"model": "kling-3.0-turbo",
"prompt": "Animate the character with subtle camera motion",
"reference_images": ["https://example.com/first-frame.png"],
"resolution": "1080p",
"duration": 5,
"watermark": true
}
Video generation is asynchronous. Use the Get Video Task Status endpoint to query progress and results.