videostringobbligatorio
Reference video URL. Only .mp4/.mov formats, 3-10s duration, 720-2160px resolution, max 200MB.
kwaivgi/kling-video/o3/4k/video-to-videoKling O3 4K Video Reference by Kuaishou generates a new native 4K shot that follows the style and camera motion of a reference video, optionally guided by reference images.
Prova il modello
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Cosa vuoi fare dopo?
Seleziona un esempio per caricare i suoi input e il risultato nel playground.
{
"prompt": "Integrate @Element1 in the scene. Style video should be following watercolor style of @Image1",
"video": "https://static.sandbase.ai/examples/efb9ed85-8d55-48df-956f-2f5c72ee7fd8/input/b8d4e379-e81f-4fb1-9009-75af47153760.mp4"
}Kling O3 4K video reference: generate new shots that follow the motion and camera language of a reference video, while the prompt and optional reference images set the new scene and look.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 2,500 characters. |
images | image URL[] | — | Reference images, referred to as @Image1, @Image2, … in the prompt. |
video | video URL, required | — | Reference video, @Video1 in the prompt. |
duration | 3–15 | — | Output length; omit to match the reference. |
keep_audio | boolean | true | Keep the source video's audio track. |
shot_type | string | customize | customize follows your multi_prompt shot list; intelligent lets the model plan the cuts. |
aspect_ratio | 16:9 / 9:16 / 1:1 | 16:9 | Output frame shape. |
You pay $0.42 per output second. Without duration the output matches the reference length; the quote assumes 5 seconds.
| Output | Price |
|---|---|
| 3s | $1.26 |
| 5s | $2.10 |
| 10s | $4.20 |
| 15s | $6.30 |
Failed runs are not charged.
Other Kling O3 4K endpoints and tiers: kwaivgi/kling-video/o3/4k/text-to-video, kwaivgi/kling-video/o3/4k/image-to-video, kwaivgi/kling-video/o3/4k/reference-to-video, kwaivgi/kling-video/o3/4k/edit, kwaivgi/kling-video/o3/standard/video-to-video, kwaivgi/kling-video/o3/pro/video-to-video.
Inizia a costruire
Invia questo modello tramite la 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/o3/4k/video-to-video",
"video": "https://static.sandbase.ai/examples/kwaivgi/mirrored/example_inputs/kling-o3/pro-v2v-reference/video_reference.mp4",
"images": [
"https://static.sandbase.ai/examples/kwaivgi/mirrored/example_inputs/kling-o3/pro-v2v-reference/image_url1.jpg",
"https://static.sandbase.ai/examples/kwaivgi/mirrored/example_inputs/kling-o3/pro-v2v-reference/image_url2.jpg"
],
"prompt": "Integrate @Element1 in the scene. Style video should be following watercolor style of @Image1",
"duration": "5",
"shot_type": "customize",
"keep_audio": false,
"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"Crea una SandBase API key e impostala nell'ambiente del server. Tutte le richieste usano l'autenticazione Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conserva la key sul server. Non esporla nel codice del browser né committarla in un repository.
Esegui POST su /v1/run con questo ID modello e i relativi input. L'esempio di richiesta sopra include invio e polling.
Usa il run ID restituito per fare polling finché lo stato non è completed, failed o timeout. Leggi l'output solo dopo completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Passa un URL di file accessibile pubblicamente nel campo image, video o audio del modello. I formati supportati e i limiti sono mostrati accanto a ciascun input del Playground.
Usa il controllo upload o replace sui campi immagine supportati nel Playground. I campi URL video accettano un video di driving ospitato; non implicano il supporto al caricamento video.
videostringobbligatorioReference video URL. Only .mp4/.mov formats, 3-10s duration, 720-2160px resolution, max 200MB.
imagesarrayReference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 4 total (elements + reference images) when using video.
promptstringobbligatorioText prompt for video generation. Reference video as @Video1.
durationintegerVideo duration in seconds (3-15s for reference video).
Valori possibili: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
shot_typestringThe type of multi-shot video generation.
Predefinito: "customize"
keep_audiobooleanWhether to keep the original audio from the reference video.
Predefinito: true
aspect_ratiostringThe aspect ratio of the generated image.
Predefinito: "16:9"
Valori possibili: "16:9", "9:16", "1:1"
{
"model": "kwaivgi/kling-video/o3/4k/video-to-video",
"video": "https://static.sandbase.ai/examples/kwaivgi/mirrored/example_inputs/kling-o3/pro-v2v-reference/video_reference.mp4",
"images": [
"https://static.sandbase.ai/examples/kwaivgi/mirrored/example_inputs/kling-o3/pro-v2v-reference/image_url1.jpg",
"https://static.sandbase.ai/examples/kwaivgi/mirrored/example_inputs/kling-o3/pro-v2v-reference/image_url2.jpg"
],
"prompt": "Integrate @Element1 in the scene. Style video should be following watercolor style of @Image1",
"duration": "5",
"shot_type": "customize",
"keep_audio": false,
"aspect_ratio": "16:9"
}Un run completato espone il risultato in output. Quanto segue è l'esempio salvato del modello, non una nuova generazione.
[
{
"poster": "https://static.sandbase.ai/examples/posters/536c891e9af8cbdc212d.jpg",
"source": "Kling AI official schema mirror",
"source_url": "https://kling.ai/document-api/guides/get-started/overview",
"url": "https://static.sandbase.ai/examples/efb9ed85-8d55-48df-956f-2f5c72ee7fd8/output/bc98d56b-34da-4cc2-a825-6333105b5692.mp4"
}
]