videostring必填
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.
試用這個模型
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
接下來您想做什麼?
選擇一個範例,將其輸入與結果載入 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.
開始建置
透過 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"建立 SandBase API 金鑰,並將其設定在伺服器環境中。所有請求都使用 Bearer 驗證。
export SANDBASE_API_KEY="YOUR_API_KEY"請將金鑰保留在伺服器端,不要在瀏覽器程式碼中公開,也不要提交到儲存庫。
使用此模型 ID 及其輸入,向 /v1/run 發送 POST。上方的請求範例包含提交與輪詢。
使用回傳的執行 ID 持續輪詢,直到狀態為 completed、failed 或 timeout。只有在 completed 之後才讀取輸出。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"在模型的 image、video 或 audio 欄位中傳入可公開存取的檔案 URL。支援格式與限制會顯示在每個 Playground 輸入欄位旁。
在 Playground 中支援的圖片欄位上使用上傳或取代控制項。影片 URL 欄位可接受託管的 driving video;它們不代表支援影片上傳。
videostring必填Reference 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.
promptstring必填Text prompt for video generation. Reference video as @Video1.
durationintegerVideo duration in seconds (3-15s for reference video).
可能值:3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
shot_typestringThe type of multi-shot video generation.
預設:"customize"
keep_audiobooleanWhether to keep the original audio from the reference video.
預設:true
aspect_ratiostringThe aspect ratio of the generated image.
預設:"16:9"
可能值:"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"
}已完成的執行會在輸出中顯示結果。以下為模型已儲存的範例,並非新的生成結果。
[
{
"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"
}
]