imagesarray
Up to 10 reference images, referenced as @Image1, @Image2, ...
kwaivgi/kling-video/v4/flash/reference-to-videoKling V4 Flash Reference to Video by Kuaishou generates a 3-20 second 720p video that keeps characters, objects and motion from reference images and videos.
Modell testen
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 10
Was möchten Sie als Nächstes tun?
Wählen Sie ein Beispiel aus, um seine Eingaben und das Ergebnis in den Playground zu laden.
{
"aspect_ratio": "16:9",
"images": [
"https://static.sandbase.ai/examples/876cfe40-c2cf-4869-91fb-457ac514139b/input/3f37b438-31f7-40e3-83a2-f07ca1a7a364.png",
"https://static.sandbase.ai/examples/876cfe40-c2cf-4869-91fb-457ac514139b/input/34423a11-3143-42fa-b016-f38ffd07ec35.png",
"https://static.sandbase.ai/examples/876cfe40-c2cf-4869-91fb-457ac514139b/input/475de517-faa0-4318-a194-ea7679683fe3.png",
"https://static.sandbase.ai/examples/876cfe40-c2cf-4869-91fb-457ac514139b/input/54f8f7ad-2075-49c6-a036-7d29525b5fd0.png"
],
"prompt": "Macro product film for the watchmaker AUREL on black velvet under one raking strip light. @Image1 is the dial, @Image2 the movement seen through the caseback, @Image3 the case flank, @Image4 the strap. Slow precise shots with hard cuts: the dial with the seconds hand sweeping, the balance wheel ticking through the caseback, light gliding along the brushed case flank, then the full watch resting on velvet. Quiet mechanical ticking."
}{
"aspect_ratio": "16:9",
"images": [
"https://static.sandbase.ai/examples/2ecd270c-9080-436a-ac22-336247bcebbb/input/ca6f413c-eb10-4c28-ab93-6f4f50e5a71a.png"
],
"prompt": "The sneaker from @Image1 bounces off wet city pavement in slow motion, splashing puddle water, then lands as a runner's foot steps into frame at sunrise. Street ambience and footsteps."
}Kling V4 Flash reference-to-video keeps characters, objects and motion from reference images and videos in a new 3–20 second 720p clip.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Refer to inputs as @Image1, @Video1, … |
images | image URL[] | — | Up to 10 reference images. |
videos | video URL[] | — | Up to 5 reference videos, 3–20s each, 20s combined. |
aspect_ratio | 21:9 / 16:9 / 9:16 / 1:1 | — | Leave empty to follow the references. |
duration | 3–20 | 5 | Output length in seconds. |
Without reference videos: $0.094 per output second. With reference videos: $0.063 per second of output plus input, where the input side counts at least as long as the output. The quote before submission assumes 20 seconds of reference video when the length cannot be read.
| Request | Price |
|---|---|
| 5s, images only (default) | $0.47 |
| 10s, images only | $0.94 |
| 5s, 8s reference video | $0.819 |
| 10s, 4s reference video | $1.26 |
| Failed runs are not charged. |
voice_ids) are only on kwaivgi/kling-video/v4/reference-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).
Jetzt loslegen
Senden Sie dieses Modell über die 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/reference-to-video",
"prompt": "@Element1 and @Element2 are having dinner at the table in @Image1",
"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"Erstellen Sie einen SandBase API-Schlüssel und legen Sie ihn in Ihrer Serverumgebung fest. Alle Anfragen verwenden Bearer-Authentifizierung.
export SANDBASE_API_KEY="YOUR_API_KEY"Bewahren Sie den Schlüssel auf dem Server auf. Geben Sie ihn nicht in Browser-Code preis und committen Sie ihn nicht in ein Repository.
POST an /v1/run mit dieser Modell-ID und ihren Eingaben. Das obige Anfragebeispiel umfasst Übermittlung und Polling.
Verwenden Sie die zurückgegebene Run-ID zum Polling, bis der Status completed, failed oder timeout ist. Lesen Sie die Ausgabe erst nach completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Übergeben Sie eine öffentlich zugängliche Date-URL im Bild-, Video- oder Audiofeld des Modells. Unterstützte Formate und Limits werden neben jedem Playground-Eingabefeld angezeigt.
Verwenden Sie im Playground bei unterstützten Bildfeldern die Steuerung zum Hochladen oder Ersetzen. Video-URL-Felder akzeptieren ein gehostetes Fahrvideo; sie implizieren keine Unterstützung für Video-Uploads.
imagesarrayUp to 10 reference images, referenced as @Image1, @Image2, ...
promptstringerforderlichText prompt. Refer to references as @Image1, @Video1, ...
videosarrayUp to 5 reference videos (3-20s each, 20s combined), referenced as @Video1, ... Video references switch to the input-plus-output price.
durationintegerOutput length in seconds (3-20).
Standard: 5
Minimum: 3
Maximum: 20
aspect_ratiostringOutput frame shape. Leave empty to follow the references (adaptive).
Mögliche Werte: "21:9", "16:9", "9:16", "1:1"
{
"model": "kwaivgi/kling-video/v4/flash/reference-to-video",
"prompt": "@Element1 and @Element2 are having dinner at the table in @Image1",
"duration": 5
}Ein abgeschlossener Run stellt sein Ergebnis in der Ausgabe bereit. Das Folgende ist das gespeicherte Beispiel des Modells, keine neue Generierung.
[
{
"url": "https://static.sandbase.ai/examples/876cfe40-c2cf-4869-91fb-457ac514139b/output/1a4f7442-8e80-42f1-bc60-d406f0829c20.mp4"
}
]