videostringobrigatório
Video to edit (3-20s, min 700x700 px, up to 300 MB). The output keeps its length.
kwaivgi/kling-video/v4/flash/video-editKling V4 Flash Video Edit by Kuaishou edits a 3-20 second source video into a 720p result from a text instruction and optional reference images.
Testar o modelo
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 10
O que você gostaria de fazer em seguida?
Selecione um exemplo para carregar as entradas e o resultado no playground.
{
"images": [
"https://static.sandbase.ai/examples/e72b57c8-1fef-4fc5-93f8-0473dd8fb581/input/b6aa6d28-155c-42b5-b034-064ed3222127.png",
"https://static.sandbase.ai/examples/e72b57c8-1fef-4fc5-93f8-0473dd8fb581/input/cc34d877-819c-4495-a496-625cee4cc554.png"
],
"prompt": "The blocky car proxy is the KESSEL R4 rally car from @Image1 - chalk-white body with the diagonal signal-orange and charcoal band, black 27 on a white roundel on the doors, slim LED headlamps joined by a light bar, roof scoop, rear wing, red mudflaps, white six-spoke gravel wheels. The grey road ribbon is the loose ochre-grey gravel stage and the cones and cylinders are the pine and birch forest of @Image2, on a crisp autumn morning with low sun raking through the trees and hanging dust. The mannequin proxies behind the rope are rally spectators in muted outdoor jackets and beanies behind red-and-white tape. Keep the exact blocking, timing, camera position and pan of the playblast. Physically real gravel rally: the car slides through the hairpin with opposite lock, rear wheels throwing a thick fan of gravel and a rolling dust cloud that drifts across the spectators; stones rattle off the bank; the suspension works over the ruts; spectators flinch, cheer and raise phones. Sound: a turbocharged four-cylinder rally engine on anti-lag with pops and bangs, gravel spray, crowd cheering. No text other than the number 27, no sponsor logos.",
"video": "https://static.sandbase.ai/examples/e72b57c8-1fef-4fc5-93f8-0473dd8fb581/input/4494b4bf-ff4e-4cc8-ac0d-9895bf65742e.mp4"
}{
"prompt": "Turn the scene in @Video1 into a snowy winter night with falling snowflakes and warm street lamps, keep the paper boat and the camera motion.",
"video": "https://static.sandbase.ai/examples/10c551a4-b8e2-42db-9f69-23eeefe474a4/input/5aeb6a40-0bad-4b5d-b97b-5a031ae1721f.mp4"
}Kling V4 Flash video edit changes a 3–20 second source video from a text instruction, with optional reference images. The 720p 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–20s, min 700×700 px, up to 300 MB. |
images | image URL[] | — | Up to 10 reference images. |
$0.063 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 20 second source when the length cannot be read.
| Source | Price |
|---|---|
| 5s | $0.63 |
| 10s | $1.26 |
| 20s | $2.52 |
| Failed runs are not charged. |
Other Kling V4 Flash endpoints: kwaivgi/kling-video/v4/flash/text-to-video, kwaivgi/kling-video/v4/flash/image-to-video, kwaivgi/kling-video/v4/flash/reference-to-video, kwaivgi/kling-video/v4/flash/video-edit. For 1080p or clips up to 30 seconds, use Kling V4 (kwaivgi/kling-video/v4/text-to-video and its siblings).
Comece a construir
Envie este modelo pela 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/flash/video-edit",
"prompt": "Change the background to a tropical island at sunset."
}
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"Crie uma chave da API SandBase e defina-a no ambiente do seu servidor. Todas as requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha a chave no servidor. Não a exponha em código do navegador nem a comite em um repositório.
Faça POST para /v1/run com este ID de modelo e suas entradas. O exemplo de requisição acima inclui envio e polling.
Use o ID de execução retornado para fazer polling até que o status seja completed, failed ou timeout. Leia a saída somente após completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Passe uma URL de arquivo acessível publicamente no campo de imagem, vídeo ou áudio do modelo. Os formatos e limites suportados são mostrados ao lado de cada entrada do Playground.
Use o controle de upload ou substituição nos campos de imagem suportados no Playground. Campos de URL de vídeo aceitam um vídeo de condução hospedado; isso não implica suporte a upload de vídeo.
videostringobrigatórioVideo to edit (3-20s, min 700x700 px, up to 300 MB). The output keeps its length.
imagesarrayOptional reference images, referenced as @Image1, @Image2, ...
promptstringobrigatórioEdit instruction. Refer to the source video as @Video1 and reference images as @Image1, @Image2, ...
{
"model": "kwaivgi/kling-video/v4/flash/video-edit",
"prompt": "Change the background to a tropical island at sunset."
}Uma execução concluída expõe seu resultado em output. O texto a seguir é o exemplo salvo do modelo, não uma nova geração.
[
{
"url": "https://static.sandbase.ai/examples/e72b57c8-1fef-4fc5-93f8-0473dd8fb581/output/1b1033c7-a1e4-4051-82c4-f2cf9522e9d0.mp4"
}
]