videostringwajib
Reference video URL. Only .mp4/.mov formats, 3-10s duration, 720-2160px resolution, max 200MB.
kwaivgi/kling-video/o3/4k/editKling O3 4K Video Edit by Kuaishou edits an input video from a text instruction, optionally guided by reference images, at native 4K.
Coba model ini
PNG, JPEG, WebP, or GIF Β· 20 MiB maximum each
Apa yang ingin Anda lakukan selanjutnya?
Pilih contoh untuk memuat input dan hasilnya ke playground.
{
"prompt": "Change environment to be fully snow as @Image1. Replace animal with @Element1",
"video": "https://static.sandbase.ai/examples/9a3754af-416e-4d82-9080-086173a5abf6/input/ccf25009-a184-4290-9917-1ac770a9a29e.mp4"
}Kling O3 4K video edit: change an existing clip with an instruction, such as restyling it or swapping objects or people, while motion and camera are kept. Reference images can supply the new look.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | β | Up to 2,500 characters. |
images | image URL[] | β | Optional reference images, @Image1, @Image2, β¦ |
video | video URL, required | β | Source clip, @Video1 in the prompt. |
shot_type | string | customize | customize follows your multi_prompt shot list; intelligent lets the model plan the cuts. |
keep_audio | boolean | true | Keep the source video's audio track. |
You pay $0.42 per second of the source video. The quote before submission assumes 15 seconds; the final charge uses the measured length.
| Source clip | Price |
|---|---|
| 3s source | $1.26 |
| 5s source | $2.10 |
| 10s source | $4.20 |
| 15s source | $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/video-to-video, kwaivgi/kling-video/o3/standard/edit, kwaivgi/kling-video/o3/pro/edit.
Mulai membangun
Kirim model ini melalui 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/edit",
"video": "https://static.sandbase.ai/examples/kwaivgi/mirrored/example_inputs/kling-o3/pro-v2v-edit/video_reference.mp4",
"images": [
"https://static.sandbase.ai/examples/kwaivgi/mirrored/example_inputs/kling-o3/pro-v2v-edit/image_url1.jpg"
],
"prompt": "Change environment to be fully snow as @Image1. Replace animal with @Element1",
"shot_type": "customize",
"keep_audio": true
}
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"Buat SandBase API key dan atur di environment server Anda. Semua permintaan menggunakan autentikasi Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Simpan key di server. Jangan tampilkan di kode browser atau commit ke repository.
POST ke /v1/run dengan ID model ini dan inputnya. Contoh permintaan di atas mencakup pengiriman dan polling.
Gunakan run ID yang dikembalikan untuk polling sampai status completed, failed, atau timeout. Baca output hanya setelah completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Kirim URL file yang dapat diakses publik di field image, video, atau audio model. Format dan batas yang didukung ditampilkan di samping setiap input Playground.
Gunakan kontrol upload atau replace pada field gambar yang didukung di Playground. Field URL video menerima video driving yang di-host; ini tidak berarti dukungan upload video.
videostringwajibReference 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.
promptstringwajibText prompt for video generation. Reference video as @Video1.
shot_typestringThe type of multi-shot video generation.
Default: "customize"
keep_audiobooleanWhether to keep the original audio from the reference video.
Default: true
{
"model": "kwaivgi/kling-video/o3/4k/edit",
"video": "https://static.sandbase.ai/examples/kwaivgi/mirrored/example_inputs/kling-o3/pro-v2v-edit/video_reference.mp4",
"images": [
"https://static.sandbase.ai/examples/kwaivgi/mirrored/example_inputs/kling-o3/pro-v2v-edit/image_url1.jpg"
],
"prompt": "Change environment to be fully snow as @Image1. Replace animal with @Element1",
"shot_type": "customize",
"keep_audio": true
}Run yang selesai menampilkan hasilnya di output. Berikut adalah contoh tersimpan model ini, bukan generasi baru.
[
{
"poster": "https://static.sandbase.ai/examples/posters/85513ed0d7d10db979c7.jpg",
"source": "Kling AI official schema mirror",
"source_url": "https://kling.ai/document-api/guides/get-started/overview",
"url": "https://static.sandbase.ai/examples/9a3754af-416e-4d82-9080-086173a5abf6/output/d6db0f2f-26c2-4aeb-887e-5c1933cadd74.mp4"
}
]