videostringobrigatório
Reference video URL. Only .mp4/.mov formats, 3-10s duration, 720-2160px resolution, max 200MB.
kwaivgi/kling-video/o3/pro/video-to-videoKling O3 Pro Video Reference by Kuaishou generates a new 1080p shot that follows the style and camera motion of a reference video, optionally guided by reference images.
Testar o modelo
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
O que você gostaria de fazer em seguida?
Selecione um exemplo para carregar as entradas e o resultado no playground.
{
"prompt": "Integrate @Element1 in the scene. Style video should be following watercolor style of @Image1",
"video": "https://static.sandbase.ai/examples/c271a607-41a7-4a7c-9f29-8adb9e8f2139/input/061abebf-7eb7-46c8-8cd6-61f071300ece.mp4"
}Kling O3 Pro 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.168 per output second. Without duration the output matches the reference length; the quote assumes 5 seconds.
| Output | Price |
|---|---|
| 3s | $0.504 |
| 5s | $0.84 |
| 10s | $1.68 |
| 15s | $2.52 |
Failed runs are not charged.
Other Kling O3 Pro endpoints and tiers: kwaivgi/kling-video/o3/pro/text-to-video, kwaivgi/kling-video/o3/pro/image-to-video, kwaivgi/kling-video/o3/pro/reference-to-video, kwaivgi/kling-video/o3/pro/edit, kwaivgi/kling-video/o3/standard/video-to-video, kwaivgi/kling-video/o3/4k/video-to-video.
Comece a construir
Envie este modelo pela 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/pro/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"Crie uma chave da API SandBase e defina-a no ambiente do seu servidor. Todas as requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha a chave no servidor. Não a exponha em código do navegador nem a comite em um repositório.
Faça POST para /v1/run com este ID de modelo e suas entradas. O exemplo de requisição acima inclui envio e polling.
Use o ID de execução retornado para fazer polling até que o status seja completed, failed ou timeout. Leia a saída somente após completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Passe uma URL de arquivo acessível publicamente no campo de imagem, vídeo ou áudio do modelo. Os formatos e limites suportados são mostrados ao lado de cada entrada do Playground.
Use o controle de upload ou substituição nos campos de imagem suportados no Playground. Campos de URL de vídeo aceitam um vídeo de condução hospedado; isso não implica suporte a upload de vídeo.
videostringobrigatórioReference 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.
promptstringobrigatórioText prompt for video generation. Reference video as @Video1.
durationintegerVideo duration in seconds (3-15s for reference video).
Valores possíveis: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
shot_typestringThe type of multi-shot video generation.
Padrão: "customize"
keep_audiobooleanWhether to keep the original audio from the reference video.
Padrão: true
aspect_ratiostringThe aspect ratio of the generated image.
Padrão: "16:9"
Valores possíveis: "16:9", "9:16", "1:1"
{
"model": "kwaivgi/kling-video/o3/pro/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"
}Uma execução concluída expõe seu resultado em output. O texto a seguir é o exemplo salvo do modelo, não uma nova geração.
[
{
"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/c271a607-41a7-4a7c-9f29-8adb9e8f2139/output/555d79f0-f606-474f-a863-7d3ed478aa80.mp4"
}
]