Submit Kling 4.0 Flash Image to Video Task
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kwaivgi/kling-v4.0-flash/image-to-video",
"input": {
"prompt": "Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png"
],
"duration": 5,
"resolution": "720p"
}
}
'import requests
url = "https://api.vidgo.ai/api/generate/submit"
payload = {
"model": "kwaivgi/kling-v4.0-flash/image-to-video",
"input": {
"prompt": "Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.",
"image_urls": ["https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png"],
"duration": 5,
"resolution": "720p"
}
}
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-v4.0-flash/image-to-video',
input: {
prompt: 'Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.',
image_urls: [
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png'
],
duration: 5,
resolution: '720p'
}
})
};
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-v4.0-flash/image-to-video',
'input' => [
'prompt' => 'Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.',
'image_urls' => [
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png'
],
'duration' => 5,
'resolution' => '720p'
]
]),
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-v4.0-flash/image-to-video\",\n \"input\": {\n \"prompt\": \"Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png\"\n ],\n \"duration\": 5,\n \"resolution\": \"720p\"\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-v4.0-flash/image-to-video\",\n \"input\": {\n \"prompt\": \"Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png\"\n ],\n \"duration\": 5,\n \"resolution\": \"720p\"\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-v4.0-flash/image-to-video\",\n \"input\": {\n \"prompt\": \"Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png\"\n ],\n \"duration\": 5,\n \"resolution\": \"720p\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "537F9S6N1LJBX0VK",
"status": "not_started",
"created_time": "2026-11-25T11:17:21"
}
}{
"detail": "image_urls must contain exactly 1 start frame"
}{
"detail": "image_urls must contain exactly 1 start frame"
}Kling
Kling 4.0 Flash Image to Video
The Kling 4.0 Flash Image to Video API animates one start-frame image into a 3–20 second 720p video, with an optional prompt to direct motion.
POST
/
api
/
generate
/
submit
Submit Kling 4.0 Flash Image to Video Task
curl --request POST \
--url https://api.vidgo.ai/api/generate/submit \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"model": "kwaivgi/kling-v4.0-flash/image-to-video",
"input": {
"prompt": "Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.",
"image_urls": [
"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png"
],
"duration": 5,
"resolution": "720p"
}
}
'import requests
url = "https://api.vidgo.ai/api/generate/submit"
payload = {
"model": "kwaivgi/kling-v4.0-flash/image-to-video",
"input": {
"prompt": "Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.",
"image_urls": ["https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png"],
"duration": 5,
"resolution": "720p"
}
}
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-v4.0-flash/image-to-video',
input: {
prompt: 'Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.',
image_urls: [
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png'
],
duration: 5,
resolution: '720p'
}
})
};
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-v4.0-flash/image-to-video',
'input' => [
'prompt' => 'Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.',
'image_urls' => [
'https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png'
],
'duration' => 5,
'resolution' => '720p'
]
]),
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-v4.0-flash/image-to-video\",\n \"input\": {\n \"prompt\": \"Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png\"\n ],\n \"duration\": 5,\n \"resolution\": \"720p\"\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-v4.0-flash/image-to-video\",\n \"input\": {\n \"prompt\": \"Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png\"\n ],\n \"duration\": 5,\n \"resolution\": \"720p\"\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-v4.0-flash/image-to-video\",\n \"input\": {\n \"prompt\": \"Warm steam curls gently upward from the enamel cup of tea as the station attendant hands it to the elderly grandfather; raindrops streak steadily down the dark waiting-room window while warm train headlights glide across the misty platform outside. Subtle slow push-in, preserving faces, clothing, and warm tungsten light. Audio: soft autumn rain and distant train rumble.\",\n \"image_urls\": [\n \"https://cdn.vidgo.ai/apis/models/bytedance/seedream-v5.0-flash/text-to-image/v1/01/output.png\"\n ],\n \"duration\": 5,\n \"resolution\": \"720p\"\n }\n}"
response = http.request(request)
puts response.read_body{
"code": 200,
"data": {
"task_id": "537F9S6N1LJBX0VK",
"status": "not_started",
"created_time": "2026-11-25T11:17:21"
}
}{
"detail": "image_urls must contain exactly 1 start frame"
}{
"detail": "image_urls must contain exactly 1 start frame"
}- After submission, a
task_idwill be returned. If you provided acallback_url, when the task status becomesfinishedorfailed, a POST request will be sent to thecallback_url. - Regardless of whether
callback_urlis provided, you can retrieve the result through the unified Query Task Status endpoint.
Models
- kwaivgi/kling-v4.0-flash/image-to-video — Image-to-video with Kling 4.0 Flash from one start frame, 3–20 seconds at 720p.
Features
- One start-frame image via
image_urls. - Optional prompt up to 26,000 characters.
- Any whole-second duration from 3 to 20 seconds at 720p.
Required parameters
image_urls(string[]): Exactly one public HTTP(S) image URL, used as the start frame.
Optional parameters
prompt(string): Motion and camera direction, 1–26,000 characters after trimming.duration(integer): Output length,3–20seconds. Default5.resolution(string):720p. Default720p.
Output
The finished task returns one 720p MP4 video in thefiles array of Query Task Status and the callback payload.
Examples
- Rainy night station: steam curls from a cup of tea handed to a grandfather while rain streaks down the waiting-room window, 5 seconds (result).
Notes
image_urlsholds one image; a second image returns 400.- Put
modelandcallback_urlat the request root, next toinput.inputaccepts the fields listed above; other fields return 400. - Credits are reserved at submission and scale with the output duration at the 720p rate. A failed task is refunded in full. See the pricing page for current rates.
Body
application/json