imagestring
Optional first-frame image URL for image-to-video.
kwaivgi/kling-video/v3Kling V3 by Kuaishou is a single entry point for Kling 3.0 video: text, image, reference, and video-guided generation in Standard, Pro, or 4K quality, with optional native audio.
Wypróbuj model
PNG, JPEG, WebP lub GIF · maksymalnie 20 MiB
PNG, JPEG, WebP lub GIF · maksymalnie 20 MiB
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Co chcesz zrobić dalej?
Wybierz przykład, aby wczytać jego dane wejściowe i wynik do playgroundu.
{
"duration": 3,
"generate_audio": false,
"prompt": "A calm lake at sunrise, gentle ripples, birds flying overhead"
}A single endpoint for Kling V3: text-to-video, image-to-video (with optional end frame), reference images, and video reference in one schema. Pick the tier with resolution.
| Mode | Send |
|---|---|
| Text | prompt only |
| Frames | image, optional end_image |
| References | images (refer to them as @Image1, …) |
| Video reference | video, optional images |
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 2,500 characters. |
resolution | standard / pro / 4k | standard | Tier: standard, pro, or 4k; sets the per-second rate. |
image | image URL | — | Optional first frame. |
video | video URL | — | Optional reference video. |
keep_original_sound | boolean | true | Keep the reference video's audio track. |
character_orientation | image / video | — | video follows the reference video's orientation (better for complex moves, up to 30s); image follows the image (better for camera moves, up to 10s). |
end_image | image URL | — | Optional last frame. |
images | image URL[] | — | Reference images, referred to as @Image1, @Image2, … in the prompt. |
duration | 3–15 | 5 | Output length in seconds. |
aspect_ratio | 16:9 / 9:16 / 1:1 | 16:9 | Output frame shape. |
generate_audio | boolean | true | Generate native audio with the clip. |
shot_type | customize / intelligent | customize | customize follows your multi_prompt shot list; intelligent lets the model plan the cuts. |
multi_prompt | object[] | — | Optional list of shots, each with its own prompt and duration. |
You pay per output second. Standard: $0.112 with audio, $0.084 without. Pro: $0.14 with audio, $0.112 without. 4K: $0.42. With a reference video: $0.126 (standard) or $0.168 (pro).
| Output | standard | pro | 4k |
|---|---|---|---|
| 5s with audio | $0.56 | $0.70 | $2.10 |
| 5s without audio | $0.42 | $0.56 | $2.10 |
| 5s with reference video | $0.63 | $0.84 | $2.10 |
| 10s with audio | $1.12 | $1.40 | $4.20 |
Failed runs are not charged.
multi_prompt with one entry per shot.Related: kwaivgi/kling-video/v3/pro/text-to-video (single-mode endpoint), kwaivgi/kling-video/v3/pro/image-to-video (single-mode endpoint).
Zacznij tworzyć
Prześlij ten model przez 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/v3",
"image": "https://static.sandbase.ai/examples/mirrored/f77b827ca02a-TNErq9yD7ZxGRATjfAqnh_EIgJSN67.png",
"video": "https://static.sandbase.ai/examples/mirrored/f1ecbb471a16-hklvF__w53diz6Rve7f5__JuDW2xl0mr6sJ_Kjz3Vxe_vidoeook--1-_1.mp4",
"prompt": "Based on @Video1, make the character from @Image1 dance.",
"duration": 5,
"shot_type": "customize",
"resolution": "standard",
"aspect_ratio": "16:9",
"generate_audio": true,
"keep_original_sound": true,
"character_orientation": "image"
}
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"Utwórz klucz API SandBase i ustaw go w środowisku serwera. Wszystkie żądania używają uwierzytelniania Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Przechowuj klucz na serwerze. Nie ujawniaj go w kodzie przeglądarkowym ani nie commituj do repozytorium.
Wyślij POST do /v1/run z tym identyfikatorem modelu i jego danymi wejściowymi. Powyższy przykład żądania obejmuje wysyłanie i odpytywanie statusu.
Użyj zwróconego ID uruchomienia, aby odpytywać status do momentu completion, failed lub timeout. Odczytaj wynik dopiero po completion.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Przekaż publicznie dostępny URL pliku w polu image, video lub audio modelu. Obsługiwane formaty i limity są pokazane obok każdego pola wejściowego w Playground.
Użyj kontrolki upload lub replace w obsługiwanych polach image w Playground. Pola URL wideo akceptują hostowany film źródłowy; nie oznacza to obsługi przesyłania wideo.
imagestringOptional first-frame image URL for image-to-video.
videostringOptional reference video URL for video-to-video generation.
imagesarrayOptional reference image URLs.
promptstringwymaganeText prompt for video generation or transformation. When using reference media, refer to them as @Image1, @Image2, and @Video1.
durationintegerGenerated video duration in seconds.
Domyślnie: 5
Możliwe wartości: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
end_imagestringOptional end-frame image URL for image-to-video.
shot_typestringDomyślnie: "customize"
Możliwe wartości: "customize", "intelligent"
resolutionstringGeneration quality tier.
Domyślnie: "standard"
Możliwe wartości: "standard", "pro", "4k"
aspect_ratiostringDomyślnie: "16:9"
Możliwe wartości: "16:9", "9:16", "1:1"
multi_promptarraygenerate_audiobooleanDomyślnie: true
keep_original_soundbooleanDomyślnie: true
character_orientationstringMożliwe wartości: "image", "video"
{
"model": "kwaivgi/kling-video/v3",
"image": "https://static.sandbase.ai/examples/mirrored/f77b827ca02a-TNErq9yD7ZxGRATjfAqnh_EIgJSN67.png",
"video": "https://static.sandbase.ai/examples/mirrored/f1ecbb471a16-hklvF__w53diz6Rve7f5__JuDW2xl0mr6sJ_Kjz3Vxe_vidoeook--1-_1.mp4",
"prompt": "Based on @Video1, make the character from @Image1 dance.",
"duration": 5,
"shot_type": "customize",
"resolution": "standard",
"aspect_ratio": "16:9",
"generate_audio": true,
"keep_original_sound": true,
"character_orientation": "image"
}Zakończone uruchomienie udostępnia swój wynik w output. Poniżej znajduje się zapisany przykład modelu, a nie nowa generacja.
[
{
"poster": "https://static.sandbase.ai/examples/posters/b585242ce007dea9c27c.jpg",
"source": "Self organization completed prediction",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/96c4d85a-9156-41f7-acd9-1695cbe2ce87/output/7d121d32-524c-4978-b033-d9ad4bafa6ba.mp4"
}
]