imagestringobbligatorio
Image to use as the first frame of the video.
kwaivgi/kling-video/o3/pro/reference-to-videoKling O3 Pro Reference to Video by Kuaishou generates a 3-15 second 1080p video that keeps characters and objects from reference images consistent with optional native audio.
Prova il modello
PNG, JPEG, WebP o GIF · massimo 20 MiB
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 6
PNG, JPEG, WebP o GIF · massimo 20 MiB
Cosa vuoi fare dopo?
Seleziona un esempio per caricare i suoi input e il risultato nel playground.
{
"image": "https://static.sandbase.ai/examples/00305a50-ad70-47d4-a341-44f6307e4de7/input/8e4efa71-0572-4785-b669-3be2232325a8.png",
"prompt": "@Element1 and @Element2 enters the scene from two sides. Elephant starts to play with the ball"
}Kling O3 Pro reference-to-video, the quality-first O3 tier. A start frame plus up to 6 reference images keep characters, objects, and style consistent; refer to them as @Image1, @Image2 in the prompt.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 2,500 characters. |
image | image URL, required | — | Start frame. JPEG, PNG, or WebP URL. |
images | image URL[] (≤6) | — | Reference images, referred to as @Image1, @Image2, … in the prompt. |
end_image | image URL | — | Optional last frame. |
duration | 3–15 | 5 | Output length in seconds. |
generate_audio | boolean | false | 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. |
aspect_ratio | 16:9 / 9:16 / 1:1 | 16:9 | Output frame shape. |
You pay for output seconds: $0.112 without audio and $0.14 with generate_audio.
| Output | Without audio | With audio |
|---|---|---|
| 3s | $0.336 | $0.42 |
| 5s (default) | $0.56 | $0.70 |
| 10s | $1.12 | $1.40 |
| 15s | $1.68 | $2.10 |
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/edit, kwaivgi/kling-video/o3/pro/video-to-video, kwaivgi/kling-video/o3/standard/reference-to-video, kwaivgi/kling-video/o3/4k/reference-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/pro/reference-to-video",
"image": "https://static.sandbase.ai/examples/mirrored/ec18b1edee80-myilPNN_WYdJCmpTy4Sjr_6XNBi9Mm.png",
"prompt": "@Element1 and @Element2 enters the scene from two sides. Elephant starts to play with the ball",
"duration": 8,
"shot_type": "customize",
"aspect_ratio": "16:9",
"generate_audio": false
}
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.
imagestringobbligatorioImage to use as the first frame of the video.
imagesarrayAdditional reference image URLs. Together with `image`, at most 7 images are accepted; do not repeat `image` in this list.
promptstringobbligatorioText prompt for video generation. Either prompt or multi_prompt must be provided, but not both.
durationintegerVideo duration in seconds (3-15s).
Predefinito: 5
Valori possibili: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
end_imagestringImage to use as the last frame of the video.
shot_typestringThe type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure.
Predefinito: "customize"
Valori possibili: "customize", "intelligent"
aspect_ratiostringThe aspect ratio of the generated image.
Predefinito: "16:9"
Valori possibili: "16:9", "9:16", "1:1"
multi_promptarrayList of prompts for multi-shot video generation.
generate_audiobooleanWhether to generate native audio for the video.
Predefinito: false
{
"model": "kwaivgi/kling-video/o3/pro/reference-to-video",
"image": "https://static.sandbase.ai/examples/mirrored/ec18b1edee80-myilPNN_WYdJCmpTy4Sjr_6XNBi9Mm.png",
"prompt": "@Element1 and @Element2 enters the scene from two sides. Elephant starts to play with the ball",
"duration": 8,
"shot_type": "customize",
"aspect_ratio": "16:9",
"generate_audio": false
}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/6c71b49500d46127942a.jpg",
"source": "Kling AI official schema mirror",
"source_url": "https://kling.ai/document-api/guides/get-started/overview",
"url": "https://static.sandbase.ai/examples/00305a50-ad70-47d4-a341-44f6307e4de7/output/8ea05cc7-d021-419e-ac64-11633979f30a.mp4"
}
]