imagestringbắt buộc
First frame. Min 300x300 px, aspect ratio 0.4-2.5, up to 30 MB.
kwaivgi/kling-video/v4/flash/image-to-videoKling V4 Flash Image to Video by Kuaishou animates a start image into a 3-20 second 720p video at a lower price than Kling V4.
Thử model
PNG, JPEG, WebP hoặc GIF · tối đa 20 MiB
Bạn muốn làm gì tiếp theo?
Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
{
"image": "https://static.sandbase.ai/examples/f7115edf-3ff0-42a8-b28c-daa7bc658111/input/0554146a-a649-485b-be48-497e51131c34.png",
"prompt": "The same elements in the reference are rigid: the fictional KITO Runner 01 low-top sneaker: off-white suede overlays (#EEE9DF) on a bone-coloured finely perforated engineered mesh upper, a sage-green suede heel tab (#8FA383), a natural gum-rubber cupsole with a fine herringbone edge, tonal off-white flat laces and tonal off-white stitching; the only marking is a small debossed \"KITO\" on the sage heel tab. It is a single right shoe standing on a warm light-grey paper seamless that curves up into the background with no visible horizon line. Preserve every element exactly; the shoe and the set are frozen, only the camera moves along the keyframed trajectory: one complete, eased 360-degree orbit around the shoe like a motion-control product rig, dipping slightly lower as it passes the back and the inner side, then rising and pushing in gently to finish on a slightly higher hero three-quarter view of the same outer side it started on.\nUNSEEN SIDES must be coherent with the visible ones: the heel shows the full sage-green suede heel tab with the small debossed 'KITO' centred on it; the medial (inner) side mirrors the lateral side's off-white suede overlay layout on the perforated bone mesh; the gum cupsole wraps all the way round with the same height and herringbone edge; tonal off-white laces and stitching everywhere. The shoe is one pair-half: never a second shoe.\nLIGHT is fixed in the world: one large soft key from the upper left, so as the camera orbits the suede nap and perforations catch raking light on the far side and the gum sole glows slightly translucent when backlit; the soft contact shadow stays anchored to the floor.\nAVOID: the shoe rotating or sliding instead of the camera, sole thickness changing, extra eyelets, lace geometry re-tying itself, stripes or swoosh-like marks appearing, logo text anywhere except the heel tab, seamless edge or studio gear coming into frame, flicker, warped toe box."
}{
"image": "https://static.sandbase.ai/examples/9b6230cc-2f64-459c-b5e7-d8a350aeac50/input/0bb985d3-4a2d-4884-8f3d-4f9a0e8397af.png",
"prompt": "Slow cinematic push-in, branches sway gently in the wind, waves roll onto the shore and the sky warms toward sunset."
}Kling V4 Flash image-to-video animates a start image into a 3–20 second 720p clip with sound, at a lower price than Kling V4.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | What moves and how the camera moves. |
image | image URL, required | — | First frame. Min 300×300 px, aspect ratio 0.4–2.5, up to 30 MB. |
duration | 3–20 | 5 | Output length in seconds. |
Billed per output second: $0.094 at 720p.
| Output | Price |
|---|---|
| 5s (default) | $0.47 |
| 10s | $0.94 |
| 20s | $1.88 |
| Failed runs are not charged. |
kwaivgi/kling-video/v4/image-to-video.Other Kling V4 Flash endpoints: kwaivgi/kling-video/v4/flash/text-to-video, kwaivgi/kling-video/v4/flash/image-to-video, kwaivgi/kling-video/v4/flash/reference-to-video, kwaivgi/kling-video/v4/flash/video-edit. For 1080p or clips up to 30 seconds, use Kling V4 (kwaivgi/kling-video/v4/text-to-video and its siblings).
Bắt đầu xây dựng
Gửi model này qua SandBase Unified Run API.
# The quoted heredoc keeps Unicode and shell metacharacters unchanged.
result=$(curl --fail-with-body --silent \
-X POST "https://api.sandbase.ai/v1/run" \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
-H "Content-Type: application/json" \
--data-binary @- <<'SANDBASE_JSON'
{
"model": "kwaivgi/kling-video/v4/flash/image-to-video",
"prompt": "A detective in a black trench coat stands on a rooftop in the rain, looking through a telescope at the street below.",
"duration": 5
}
SANDBASE_JSON
)
run_id=$(printf '%s' "$result" | jq -r .id)
for attempt in $(seq 1 120); do
status=$(printf '%s' "$result" | jq -r .status)
case "$status" in completed|failed|timeout) break ;; esac
sleep 2
result=$(curl --fail-with-body --silent \
-H "Authorization: Bearer $SANDBASE_API_KEY" \
"https://api.sandbase.ai/v1/run/$run_id")
done
status=$(printf '%s' "$result" | jq -r .status)
[ "$status" = completed ] || { echo "Generation ended: $status" >&2; exit 1; }
printf '%s\n' "$result"Tạo một SandBase API key và đặt nó trong môi trường máy chủ của bạn. Tất cả request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key trên máy chủ. Không hiển thị trong mã trình duyệt hoặc commit vào repository.
POST tới /v1/run với model ID này và các đầu vào của nó. Ví dụ request ở trên bao gồm cả bước gửi và polling.
Dùng run ID được trả về để poll cho đến khi trạng thái là completed, failed hoặc timeout. Chỉ đọc đầu ra sau khi completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Cung cấp một URL tệp có thể truy cập công khai trong trường image, video hoặc audio của model. Các định dạng và giới hạn được hỗ trợ hiển thị bên cạnh từng input trong Playground.
Dùng điều khiển upload hoặc replace trên các trường image được hỗ trợ trong Playground. Trường URL video chấp nhận một video driving được host; điều này không đồng nghĩa hỗ trợ tải lên video.
imagestringbắt buộcFirst frame. Min 300x300 px, aspect ratio 0.4-2.5, up to 30 MB.
promptstringbắt buộcDescribe subject, action, camera and light.
durationintegerOutput length in seconds (3-20).
Mặc định: 5
Tối thiểu: 3
Tối đa: 20
{
"model": "kwaivgi/kling-video/v4/flash/image-to-video",
"prompt": "A detective in a black trench coat stands on a rooftop in the rain, looking through a telescope at the street below.",
"duration": 5
}Một run đã hoàn tất sẽ hiển thị kết quả trong output. Phần sau là ví dụ đã lưu của model, không phải một lần tạo mới.
[
{
"url": "https://static.sandbase.ai/examples/f7115edf-3ff0-42a8-b28c-daa7bc658111/output/7210e3df-7c86-4cc8-a326-9f6a9094c2b5.mp4"
}
]