imagestring
Optional first-frame image URL for image-to-video.
kwaivgi/kling-video/v3Kling V3 by Kuaishou is a single entry point for Kling 3.0 video: text, image, reference, and video-guided generation in Standard, Pro, or 4K quality, with optional native audio.
Thử model
PNG, JPEG, WebP hoặc GIF · tối đa 20 MiB
PNG, JPEG, WebP hoặc GIF · tối đa 20 MiB
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
Bạn muốn làm gì tiếp theo?
Chọn một ví dụ để nạp đầu vào và kết quả của nó vào playground.
{
"duration": 3,
"generate_audio": false,
"prompt": "A calm lake at sunrise, gentle ripples, birds flying overhead"
}A single endpoint for Kling V3: text-to-video, image-to-video (with optional end frame), reference images, and video reference in one schema. Pick the tier with resolution.
| Mode | Send |
|---|---|
| Text | prompt only |
| Frames | image, optional end_image |
| References | images (refer to them as @Image1, …) |
| Video reference | video, optional images |
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 2,500 characters. |
resolution | standard / pro / 4k | standard | Tier: standard, pro, or 4k; sets the per-second rate. |
image | image URL | — | Optional first frame. |
video | video URL | — | Optional reference video. |
keep_original_sound | boolean | true | Keep the reference video's audio track. |
character_orientation | image / video | — | video follows the reference video's orientation (better for complex moves, up to 30s); image follows the image (better for camera moves, up to 10s). |
end_image | image URL | — | Optional last frame. |
images | image URL[] | — | Reference images, referred to as @Image1, @Image2, … in the prompt. |
duration | 3–15 | 5 | Output length in seconds. |
aspect_ratio | 16:9 / 9:16 / 1:1 | 16:9 | Output frame shape. |
generate_audio | boolean | true | Generate native audio with the clip. |
shot_type | customize / intelligent | customize | customize follows your multi_prompt shot list; intelligent lets the model plan the cuts. |
multi_prompt | object[] | — | Optional list of shots, each with its own prompt and duration. |
You pay per output second. Standard: $0.112 with audio, $0.084 without. Pro: $0.14 with audio, $0.112 without. 4K: $0.42. With a reference video: $0.126 (standard) or $0.168 (pro).
| Output | standard | pro | 4k |
|---|---|---|---|
| 5s with audio | $0.56 | $0.70 | $2.10 |
| 5s without audio | $0.42 | $0.56 | $2.10 |
| 5s with reference video | $0.63 | $0.84 | $2.10 |
| 10s with audio | $1.12 | $1.40 | $4.20 |
Failed runs are not charged.
multi_prompt with one entry per shot.Related: kwaivgi/kling-video/v3/pro/text-to-video (single-mode endpoint), kwaivgi/kling-video/v3/pro/image-to-video (single-mode endpoint).
Bắt đầu xây dựng
Gửi model này qua 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/v3",
"image": "https://static.sandbase.ai/examples/mirrored/f77b827ca02a-TNErq9yD7ZxGRATjfAqnh_EIgJSN67.png",
"video": "https://static.sandbase.ai/examples/mirrored/f1ecbb471a16-hklvF__w53diz6Rve7f5__JuDW2xl0mr6sJ_Kjz3Vxe_vidoeook--1-_1.mp4",
"prompt": "Based on @Video1, make the character from @Image1 dance.",
"duration": 5,
"shot_type": "customize",
"resolution": "standard",
"aspect_ratio": "16:9",
"generate_audio": true,
"keep_original_sound": true,
"character_orientation": "image"
}
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"Tạo một SandBase API key và đặt nó trong môi trường máy chủ của bạn. Tất cả request sử dụng xác thực Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Giữ key trên máy chủ. Không hiển thị trong mã trình duyệt hoặc commit vào repository.
POST tới /v1/run với model ID này và các đầu vào của nó. Ví dụ request ở trên bao gồm cả bước gửi và polling.
Dùng run ID được trả về để poll cho đến khi trạng thái là completed, failed hoặc timeout. Chỉ đọc đầu ra sau khi completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Cung cấp một URL tệp có thể truy cập công khai trong trường image, video hoặc audio của model. Các định dạng và giới hạn được hỗ trợ hiển thị bên cạnh từng input trong Playground.
Dùng điều khiển upload hoặc replace trên các trường image được hỗ trợ trong Playground. Trường URL video chấp nhận một video driving được host; điều này không đồng nghĩa hỗ trợ tải lên video.
imagestringOptional first-frame image URL for image-to-video.
videostringOptional reference video URL for video-to-video generation.
imagesarrayOptional reference image URLs.
promptstringbắt buộcText prompt for video generation or transformation. When using reference media, refer to them as @Image1, @Image2, and @Video1.
durationintegerGenerated video duration in seconds.
Mặc định: 5
Giá trị có thể dùng: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
end_imagestringOptional end-frame image URL for image-to-video.
shot_typestringMặc định: "customize"
Giá trị có thể dùng: "customize", "intelligent"
resolutionstringGeneration quality tier.
Mặc định: "standard"
Giá trị có thể dùng: "standard", "pro", "4k"
aspect_ratiostringMặc định: "16:9"
Giá trị có thể dùng: "16:9", "9:16", "1:1"
multi_promptarraygenerate_audiobooleanMặc định: true
keep_original_soundbooleanMặc định: true
character_orientationstringGiá trị có thể dùng: "image", "video"
{
"model": "kwaivgi/kling-video/v3",
"image": "https://static.sandbase.ai/examples/mirrored/f77b827ca02a-TNErq9yD7ZxGRATjfAqnh_EIgJSN67.png",
"video": "https://static.sandbase.ai/examples/mirrored/f1ecbb471a16-hklvF__w53diz6Rve7f5__JuDW2xl0mr6sJ_Kjz3Vxe_vidoeook--1-_1.mp4",
"prompt": "Based on @Video1, make the character from @Image1 dance.",
"duration": 5,
"shot_type": "customize",
"resolution": "standard",
"aspect_ratio": "16:9",
"generate_audio": true,
"keep_original_sound": true,
"character_orientation": "image"
}Một run đã hoàn tất sẽ hiển thị kết quả trong output. Phần sau là ví dụ đã lưu của model, không phải một lần tạo mới.
[
{
"poster": "https://static.sandbase.ai/examples/posters/b585242ce007dea9c27c.jpg",
"source": "Self organization completed prediction",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/96c4d85a-9156-41f7-acd9-1695cbe2ce87/output/7d121d32-524c-4978-b033-d9ad4bafa6ba.mp4"
}
]