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.
Kling 4.0 Flash Image to Video API
kwaivgi/kling-v4.0-flash/image-to-videoKling 4.0 Flash Image to Video API animates a single start frame into a 3–20 second 720p clip with optional prompt guidance at 18.8 credits per second. It preserves your opening subject, lighting, and framing while adding smooth camera movement.
Drag and drop files, paste from clipboard, or provide a URL. Required. Exactly 1 start frame image (JPEG, PNG, or WebP, up to 30 MB).
1/1 files added
Examples
REST API
Quick Start
Submit a Kling 4.0 Flash Image to Video request in three steps, capture task_id, and fetch the generated 720p video.
Connect to the Vidgo API
Create an API key on your server and send it in the Authorization header as a Bearer token.
- Endpoint
- POST
https://api.vidgo.ai/api/generate/submit - Authentication
- Authorization: Bearer VIDGO_API_KEY
Submit one video task
Send the model ID and mode inputs to the unified submit endpoint.
curl --request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--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"
}
}'Wait for the result
Poll the status endpoint with task_id until it reaches finished or failed.
Track status
GET https://api.vidgo.ai/api/generate/status/{task_id}Poll while not_started or running; read data.files[].file_url when finished.
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "537F9S6N1LJBX0VK",
"status": "not_started",
"created_time": "2026-11-25T11:17:21"
}
}{
"code": 200,
"data": {
"task_id": "537F9S6N1LJBX0VK",
"status": "finished",
"files": [
{
"file_type": "video",
"file_url": "https://cdn.vidgo.ai/apis/models/kwaivgi/kling-v4.0-flash/image-to-video/v1/01/output.mp4"
}
],
"created_time": "2026-11-25T11:17:21",
"error_message": null,
"progress": 100
}
}Complete runnable example
End-to-end script combining submission, polling, terminal checks, and output extraction.
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"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"
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
while true; do
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep 2
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
doneRequest Parameters
Place model and optional callback_url at the request root, and mode parameters inside input.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | — | Fixed to kwaivgi/kling-v4.0-flash/image-to-video. |
| callback_url | string (URL) | No | — | Public HTTP(S) URL that receives the terminal task payload. |
| input.image_urls | string[] | Yes | — | Array with exactly 1 public HTTP(S) start frame image URL. |
| input.prompt | string | No | — | Motion, camera, and audio direction (1–26,000 characters when provided). |
| input.duration | integer | No | 5 | Whole seconds from 3 to 20. |
| input.resolution | string | No | 720p | Fixed to 720p. |
Response Fields
Submission returns task_id immediately. Status responses provide generated video files or error details upon completion.
| Field | Type | Description |
|---|---|---|
| code | integer | Application result code; 0 or 200 indicates success. |
| data.task_id | string | Unique task identifier for status polling. |
| data.status | string | not_started | running | finished | failed |
| data.progress | number | Completion percentage (0–100). |
| data.files[].file_url | string | Public URL of the generated video. |
| data.files[].file_type | string | File type, video for video outputs. |
| data.error_message | string | null | Failure detail when status is failed. |
Task Lifecycle
Poll only while status is not_started or running; stop on finished or failed.
not_startedAccepted and queued to start.
runningVideo generation is running; keep polling.
finishedComplete; read video URL from data.files[].file_url.
failedFailed; read data.error_message and stop polling.
Polling and Errors
- Authentication401 means the Bearer API key is missing or invalid.
- Validation400 means a parameter, duration (3–20 s), or total input video duration (≤20 s) is invalid.
- Polling intervalPoll every 5–10 seconds, or set callback_url to avoid polling.
Model Specifications
| Specification | Value | Description |
|---|---|---|
| Model | kwaivgi/kling-v4.0-flash/image-to-video | Public model identifier for asynchronous video generation. |
| Resolution | 720p | Fixed 720p output. |
| Duration | 3–20 s | Defaults to 5 s in generation modes; total input video duration up to 20 s. |
| Pricing | 18.8 / 12.6 credits/s | 18.8 credits/s ($0.094/s) without video input; 12.6 credits/s ($0.063/s) with video input, billed on output + max(output, ceil(total input seconds)). |
Related Models
Kling 4.0 Flash Image to Video API FAQ
What is the Kling 4.0 Flash Image to Video API?
Kling 4.0 Flash Image to Video is a Kuaishou video model that animates a single start frame into 720p motion. The Kling 4.0 Flash Image to Video API produces 3–20 second clips at 18.8 credits per second with an optional text prompt for camera and action control. It preserves the opening frame's subject, lighting, and framing while generating fluid single-pass motion. You can call it programmatically or try it from the playground above.
Is a prompt required for the Kling 4.0 Flash Image to Video API?
No. Prompt is optional in Image to Video mode; you can omit it for natural automatic motion or supply up to 26,000 characters of direction.
How many images does Kling 4.0 Flash Image to Video accept?
Exactly 1 start frame in image_urls. For start-and-end frame control, use Kling 4.0 Image to Video.
How is aspect ratio determined in Kling 4.0 Flash Image to Video?
The output video automatically follows the dimensions and framing of the uploaded start frame.
What durations can Kling 4.0 Flash Image to Video generate?
Any whole number of seconds from 3 to 20, defaulting to 5 seconds.
How much does the Kling 4.0 Flash Image to Video API cost?
It costs 18.8 credits ($0.094) per output second; a 5-second clip is 94 credits ($0.47).
Which image formats work with Kling 4.0 Flash Image to Video?
Upload or pass a public HTTP(S) URL for a JPEG, PNG, or WebP image up to 30 MB.



