videostring필수
Video to edit (3-30s, min 700x700 px, up to 300 MB). The output keeps its length.
kwaivgi/kling-video/v4/video-editKling V4 Video Edit by Kuaishou edits a 3-30 second source video from a text instruction and optional reference images.
모델 사용해 보기
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 10
다음에 무엇을 하시겠습니까?
예시를 선택하면 입력값과 결과가 플레이그라운드에 로드됩니다.
{
"prompt": "Change the time of day in @Video1 to a starry night with the boat glowing softly, keep the camera motion.",
"video": "https://static.sandbase.ai/examples/c5782511-455d-4642-aed4-aee4d9a68521/input/cc801f7f-f034-4822-99db-04c72e2b9743.mp4"
}{
"prompt": "Restyle @Video1 as a hand-drawn watercolor animation, keep the vendor's motion and the flames.",
"video": "https://static.sandbase.ai/examples/8bd56a37-82da-4689-bfeb-b3d6e6db43dd/input/0ff13888-7225-4b82-bbe3-0ddbcabe39d0.mp4"
}Kling V4 video edit changes a 3–30 second source video from a text instruction, with optional reference images. The output keeps the source length.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Edit instruction. Refer to the source as @Video1 and images as @Image1, … |
video | video URL, required | — | 3–30s, min 700×700 px, up to 300 MB. |
images | image URL[] | — | Up to 10 reference images. |
resolution | 720p / 1080p / 4k | 1080p | Output resolution. |
dynamic_range | sdr / hdr | sdr | hdr outputs 10-bit HDR video. 1080p and 4k only. |
$0.094 (720p), $0.141 (1080p) or $0.329 (4K) per second, counted on input plus output (2× the source length). Settlement uses the output length (it matches the source); the quote before submission assumes a 30 second source when the length cannot be read. HDR adds $0.047 per output second at 1080p and $0.078 at 4K.
| Source | Price |
|---|---|
| 6s, 1080p | $1.692 |
| 10s, 720p | $1.88 |
| 10s, 4K | $6.58 |
| 10s, 4K, HDR | $7.36 |
| 30s, 1080p | $8.46 |
| Failed runs are not charged. |
Other Kling V4 endpoints: kwaivgi/kling-video/v4/text-to-video, kwaivgi/kling-video/v4/image-to-video, kwaivgi/kling-video/v4/reference-to-video, kwaivgi/kling-video/v4/video-edit.
빌드를 시작하세요
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/v4/video-edit",
"prompt": "Change the background to a tropical island at sunset.",
"resolution": "1080p",
"dynamic_range": "sdr"
}
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"모델의 이미지, 비디오 또는 오디오 필드에 공개적으로 접근 가능한 파일 URL을 전달하세요. 지원 형식과 제한은 각 Playground 입력 옆에 표시됩니다.
Playground의 지원되는 이미지 필드에서 업로드 또는 교체 컨트롤을 사용하세요. 비디오 URL 필드는 호스팅된 driving video를 받으며, 비디오 업로드 지원을 의미하지는 않습니다.
videostring필수Video to edit (3-30s, min 700x700 px, up to 300 MB). The output keeps its length.
imagesarrayOptional reference images, referenced as @Image1, @Image2, ...
promptstring필수Edit instruction. Refer to the source video as @Video1 and reference images as @Image1, @Image2, ...
resolutionstringOutput resolution.
기본값: "1080p"
가능한 값: "720p", "1080p", "4k"
dynamic_rangestringhdr outputs 10-bit HDR video; 1080p and 4k only.
기본값: "sdr"
가능한 값: "sdr", "hdr"
{
"model": "kwaivgi/kling-video/v4/video-edit",
"prompt": "Change the background to a tropical island at sunset.",
"resolution": "1080p",
"dynamic_range": "sdr"
}완료된 실행의 결과는 출력에 표시됩니다. 아래 내용은 새 생성 결과가 아니라 모델에 저장된 예시입니다.
[
{
"url": "https://static.sandbase.ai/examples/c5782511-455d-4642-aed4-aee4d9a68521/output/e7edbd9a-0c29-4b45-8e1d-701fba8ef596.mp4"
}
]