imagestringआवश्यक
Image to use as the first frame of the video.
kwaivgi/kling-video/o3/4k/reference-to-videoKling O3 4K Reference to Video by Kuaishou generates a 3-15 second native 4K video that keeps characters and objects from reference images consistent with optional native audio.
model को आज़माएँ
PNG, JPEG, WebP, या GIF · अधिकतम 20 MiB
PNG, JPEG, WebP, or GIF · 20 MiB maximum each · up to 6
PNG, JPEG, WebP, या GIF · अधिकतम 20 MiB
आप आगे क्या करना चाहेंगे?
प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
{
"image": "https://static.sandbase.ai/examples/839ecdfa-6208-438f-9129-1e17498adde9/input/2cec874a-01f0-462f-ae5a-d77bf801590b.png",
"prompt": "@Element1 and @Element2 enters the scene from two sides. Elephant starts to play with the ball"
}Kling O3 4K reference-to-video, native 4K output in one pass, without a separate upscale. A start frame plus up to 6 reference images keep characters, objects, and style consistent; refer to them as @Image1, @Image2 in the prompt.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 2,500 characters. |
image | image URL, required | — | Start frame. JPEG, PNG, or WebP URL. |
images | image URL[] (≤6) | — | Reference images, referred to as @Image1, @Image2, … in the prompt. |
end_image | image URL | — | Optional last frame. |
duration | 3–15 | 5 | Output length in seconds. |
generate_audio | boolean | false | Generate native audio with the clip. |
multi_prompt | object[] | — | Optional list of shots, each with its own prompt and duration. |
shot_type | customize / intelligent | 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.42 per output second, with or without audio.
| Output | Price |
|---|---|
| 3s | $1.26 |
| 5s (default) | $2.10 |
| 10s | $4.20 |
| 15s | $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/edit, kwaivgi/kling-video/o3/4k/video-to-video, kwaivgi/kling-video/o3/standard/reference-to-video, kwaivgi/kling-video/o3/pro/reference-to-video.
बिल्डिंग शुरू करें
इस model को 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/reference-to-video",
"image": "https://static.sandbase.ai/examples/mirrored/d5f4a0f0f119-NaslJIC7F2WodS6DFZRRJ.png",
"prompt": "@Element1 and @Element2 enters the scene from two sides. Elephant starts to play with the ball",
"duration": 8,
"end_image": "https://static.sandbase.ai/examples/mirrored/b5db8ef4ab4d-BwHi22qoQnqaTNMMhe533.png",
"shot_type": "customize",
"aspect_ratio": "16:9",
"generate_audio": false
}
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 बनाएँ और इसे अपने server environment में सेट करें। सभी requests Bearer authentication का उपयोग करती हैं।
export SANDBASE_API_KEY="YOUR_API_KEY"Key को सर्वर पर रखें। इसे browser code में expose न करें या repository में commit न करें।
इस model ID और इसके inputs के साथ /v1/run पर POST करें। ऊपर दिया गया request example submission और polling दोनों शामिल करता है।
Completed, failed या timeout होने तक poll करने के लिए लौटाए गए run ID का उपयोग करें। Output केवल completed होने के बाद पढ़ें।
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Model के image, video या audio field में सार्वजनिक रूप से उपलब्ध फ़ाइल URL पास करें। समर्थित formats और limits प्रत्येक Playground input के पास दिखाए गए हैं।
Playground में समर्थित image fields पर upload या replace control का उपयोग करें। Video URL fields hosted driving video स्वीकार करते हैं; इससे video-upload support का संकेत नहीं मिलता।
imagestringआवश्यकImage to use as the first frame of the video.
imagesarrayAdditional reference image URLs. Together with `image`, at most 7 images are accepted; do not repeat `image` in this list.
promptstringआवश्यकText prompt for video generation. Either prompt or multi_prompt must be provided, but not both.
durationintegerVideo duration in seconds (3-15s).
डिफ़ॉल्ट: 5
संभावित मान: 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15
end_imagestringImage to use as the last frame of the video.
shot_typestringThe type of multi-shot video generation. 'intelligent' lets the model automatically determine shot structure.
डिफ़ॉल्ट: "customize"
संभावित मान: "customize", "intelligent"
aspect_ratiostringThe aspect ratio of the generated image.
डिफ़ॉल्ट: "16:9"
संभावित मान: "16:9", "9:16", "1:1"
multi_promptarrayList of prompts for multi-shot video generation.
generate_audiobooleanWhether to generate native audio for the video.
डिफ़ॉल्ट: false
{
"model": "kwaivgi/kling-video/o3/4k/reference-to-video",
"image": "https://static.sandbase.ai/examples/mirrored/d5f4a0f0f119-NaslJIC7F2WodS6DFZRRJ.png",
"prompt": "@Element1 and @Element2 enters the scene from two sides. Elephant starts to play with the ball",
"duration": 8,
"end_image": "https://static.sandbase.ai/examples/mirrored/b5db8ef4ab4d-BwHi22qoQnqaTNMMhe533.png",
"shot_type": "customize",
"aspect_ratio": "16:9",
"generate_audio": false
}पूरा हुआ run अपना परिणाम output में दिखाता है। नीचे दिया गया model का सेव किया हुआ example है, नई generation नहीं।
[
{
"poster": "https://static.sandbase.ai/examples/posters/6c71b49500d46127942a.jpg",
"source": "Kling AI official schema mirror",
"source_url": "https://kling.ai/document-api/guides/get-started/overview",
"url": "https://static.sandbase.ai/examples/839ecdfa-6208-438f-9129-1e17498adde9/output/2bc0bcbc-410c-4147-ac45-6f9a508cb26b.mp4"
}
]