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 key และตั้งค่าไว้ในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอทั้งหมดใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์หรือคอมมิตลง repository
POST ไปที่ /v1/run ด้วย model ID นี้และอินพุตของมัน ตัวอย่างคำขอด้านบนมีทั้งการส่งและการ polling
ใช้ run ID ที่ส่งกลับมาเพื่อ polling จนกว่าสถานะจะเป็น completed, failed หรือ timeout ให้อ่าน output หลังจาก completed เท่านั้น
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"ส่ง URL ไฟล์ที่เข้าถึงได้สาธารณะในช่อง image, video หรือ audio ของโมเดล รูปแบบและข้อจำกัดที่รองรับแสดงอยู่ข้างแต่ละอินพุตใน Playground
ใช้ตัวควบคุม upload หรือ replace ในช่องรูปภาพที่รองรับใน Playground ช่อง URL ของวิดีโอรองรับวิดีโอ driving ที่โฮสต์ไว้; ไม่ได้หมายความว่าสามารถอัปโหลดวิดีโอได้
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"
}run ที่เสร็จสมบูรณ์จะแสดงผลลัพธ์ใน output ต่อไปนี้เป็นตัวอย่างที่บันทึกไว้ของโมเดล ไม่ใช่การสร้างใหม่
[
{
"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"
}
]