imagestring必須
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.
モデルを試す
PNG、JPEG、WebP、GIF · 最大 20 MiB
次に何をしますか?
例を選択すると、その入力と結果がプレイグラウンドに読み込まれます。
{
"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).
開発を始める
このモデルを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"SandBaseのAPIキーを作成し、サーバー環境に設定してください。すべてのリクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開したり、リポジトリにコミットしたりしないでください。
このモデルIDと入力を使って /v1/run にPOSTしてください。上のリクエスト例には送信とポーリングが含まれています。
返されたrun IDを使って、ステータスがcompleted、failed、timeoutになるまでポーリングしてください。出力はcompleted後にのみ読み取ってください。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"モデルのimage、video、またはaudioフィールドに、公開アクセス可能なファイルURLを指定してください。対応形式と制限は各Playground入力の横に表示されます。
Playgroundの対応する画像フィールドでアップロードまたは置換を使用してください。video URLフィールドはホストされたドライビング動画を受け付けますが、動画アップロード対応を意味するものではありません。
imagestring必須First frame. Min 300x300 px, aspect ratio 0.4-2.5, up to 30 MB.
promptstring必須Describe subject, action, camera and light.
durationintegerOutput length in seconds (3-20).
デフォルト: 5
最小: 3
最大: 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
}完了したrunの結果は出力に表示されます。以下はモデルに保存されたサンプルであり、新規生成ではありません。
[
{
"url": "https://static.sandbase.ai/examples/f7115edf-3ff0-42a8-b28c-daa7bc658111/output/7210e3df-7c86-4cc8-a326-9f6a9094c2b5.mp4"
}
]