promptstringerforderlich
Describe subject, action, camera and light.
kwaivgi/kling-video/v4/flash/text-to-videoKling V4 Flash Text to Video by Kuaishou turns a text prompt into a 3-20 second 720p video at a lower price than Kling V4.
Modell testen
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",
"prompt": "Elegant luxury resort film, one continuous camera move with no cuts: from an unmade bed, out through open glass doors, across a teak deck and down to the waterline as a guest dives in for the first swim of the day just as the sun breaks the horizon. Soft golden light, gentle lens flare, sound of waves and birds."
}{
"aspect_ratio": "16:9",
"prompt": "A small paper boat sails across a rain puddle on a city sidewalk at dusk, neon signs reflect and ripple in the water, raindrops patter around it and a tram bell rings in the distance, low camera at water level."
}Kling V4 Flash text-to-video is the faster, lower-cost tier of Kling V4: write a scene and get back a 3–20 second 720p clip with sound.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Describe subject, action, camera and light. |
aspect_ratio | 16:9 / 9:16 / 1:1 / 21:9 | 16:9 | Output frame shape. |
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. |
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/text-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,
"aspect_ratio": "16:9"
}
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.
promptstringerforderlichDescribe subject, action, camera and light.
durationintegerOutput length in seconds (3-20).
Standard: 5
Minimum: 3
Maximum: 20
aspect_ratiostringOutput frame shape.
Standard: "16:9"
Mögliche Werte: "16:9", "9:16", "1:1", "21:9"
{
"model": "kwaivgi/kling-video/v4/flash/text-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,
"aspect_ratio": "16:9"
}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/79bf908a-a650-4831-9195-97d003cbfeac/output/6a0241e6-ddaa-4c3e-9e2a-3b3593ab5967.mp4"
}
]