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/text-to-video",
"input": {
"prompt": "Wildlife documentary tracking shot at blue hour in a snowy Hokkaido pine clearing: a wild red fox trots smoothly across deep untouched powder snow, leaving crisp paw prints, warm breath misting in the freezing air. Midway it pauses, ears pivoting sharply as a clump of snow slips off a dark cedar bough behind it. Natural twilight, steady lateral tracking camera, no cuts. Audio: soft crunching snow footsteps, gentle winter wind through pine needles. No text, no logos, no watermarks.",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}
}
'{
"code": 200,
"data": {
"task_id": "WEGGOG5CV8XNKEN5",
"status": "not_started",
"created_time": "2026-11-25T11:13:02"
}
}{
"detail": "prompt must contain 1-26000 characters"
}{
"detail": "prompt must contain 1-26000 characters"
}Kling
Kling 4.0 Flash Text to Video
The Kling 4.0 Flash Text to Video API turns a prompt of up to 26,000 characters into a 3–20 second 720p video in five aspect ratios.
POST
/
api
/
generate
/
submit
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/text-to-video",
"input": {
"prompt": "Wildlife documentary tracking shot at blue hour in a snowy Hokkaido pine clearing: a wild red fox trots smoothly across deep untouched powder snow, leaving crisp paw prints, warm breath misting in the freezing air. Midway it pauses, ears pivoting sharply as a clump of snow slips off a dark cedar bough behind it. Natural twilight, steady lateral tracking camera, no cuts. Audio: soft crunching snow footsteps, gentle winter wind through pine needles. No text, no logos, no watermarks.",
"duration": 5,
"resolution": "720p",
"aspect_ratio": "16:9"
}
}
'{
"code": 200,
"data": {
"task_id": "WEGGOG5CV8XNKEN5",
"status": "not_started",
"created_time": "2026-11-25T11:13:02"
}
}{
"detail": "prompt must contain 1-26000 characters"
}{
"detail": "prompt must contain 1-26000 characters"
}- 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/text-to-video — Text-to-video with Kling 4.0 Flash, 3–20 seconds at 720p.
Features
- Prompts up to 26,000 characters for detailed action, camera, lighting and sound direction.
- Any whole-second duration from 3 to 20 seconds.
- Five aspect ratios:
auto,16:9,9:16,1:1,21:9. - 720p output in a single pass.
Required parameters
prompt(string): Scene description, 1–26,000 characters after trimming.
Optional parameters
duration(integer): Output length,3–20seconds. Default5.resolution(string):720p. Default720p.aspect_ratio(string):auto,16:9,9:16,1:1or21:9. Default16:9.
Output
The finished task returns one 720p MP4 video in thefiles array of Query Task Status and the callback payload.
Examples
- Wildlife tracking shot: a red fox trots across a snowy Hokkaido pine clearing at blue hour, 5 seconds,
16:9(result). - Vertical close-up: a potter’s hands raise a stoneware vase on a spinning wheel, 5 seconds,
9:16(result).
Notes
durationtakes whole numbers (or integer strings) from 3 to 20.- 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