imagesarrayआवश्यक
Additional reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 7 total (elements + reference images + start image).
kwaivgi/kling-video/3.0/omni/pro/reference-to-videoKling 3.0 Omni Pro Reference to Video by Kuaishou generates a 3-10 second 1080p video that keeps characters and objects from reference images consistent.
model को आज़माएँ
PNG, JPEG, WebP, or GIF · 20 MiB maximum each
आप आगे क्या करना चाहेंगे?
प्लेग्राउंड में इसके इनपुट और परिणाम लोड करने के लिए कोई उदाहरण चुनें।
{
"images": [
"https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_images_0.png",
"https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_images_1.png"
],
"prompt": "Take @Image1 as the start frame. Start with a high-angle satellite view of the ancient greenhouse ruin surrounded by nature. The camera swoops down and flies inside the building, revealing the character from @Element1 standing in the sun-drenched center. The camera then seamlessly transitions into a smooth 180-degree orbit around the character, moving to the back view. As the open backpack comes into focus, the camera continues to push forward, zooming deep inside the bag to reveal the glowing stone from @Element2 nestled inside. Cinematic lighting, hopeful atmosphere, 35mm lens. Make sure to keep it as the style of @Image2."
}Kling 3.0 Omni Pro reference-to-video: cast characters and objects from reference images (and optional elements) into a new 3–10 second scene.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 2,500 characters. |
images | image URL[], required | — | Reference images, referred to as @Image1, @Image2, … in the prompt. |
duration | 3–10 | 5 | Output length in seconds. |
elements | object[] | — | Optional character or object elements to keep consistent. |
aspect_ratio | 16:9 / 9:16 / 1:1 | 16:9 | Output frame shape. |
$0.112 per output second.
| Output | Price |
|---|---|
| 3s | $0.336 |
| 5s (default) | $0.56 |
| 10s | $1.12 |
Failed runs are not charged.
Other Kling 3.0 Omni endpoints: kwaivgi/kling-video/3.0/omni/pro/image-to-video, kwaivgi/kling-video/3.0/omni/pro/video-to-video/edit.
बिल्डिंग शुरू करें
इस 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/3.0/omni/pro/reference-to-video",
"images": [
"https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_images_0.png",
"https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_images_1.png"
],
"prompt": "Take @Image1 as the start frame. Start with a high-angle satellite view of the ancient greenhouse ruin surrounded by nature. The camera swoops down and flies inside the building, revealing the character from @Element1 standing in the sun-drenched center. The camera then seamlessly transitions into a smooth 180-degree orbit around the character, moving to the back view. As the open backpack comes into focus, the camera continues to push forward, zooming deep inside the bag to reveal the glowing stone from @Element2 nestled inside. Cinematic lighting, hopeful atmosphere, 35mm lens. Make sure to keep it as the style of @Image2.",
"duration": 5,
"elements": [
{
"frontal_image_url": "https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_element_0.png",
"reference_image_urls": [
"https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_element_1.png",
"https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_element_2.png"
]
},
{
"frontal_image_url": "https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_element_3.png",
"reference_image_urls": [
"https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_element_4.png"
]
}
],
"aspect_ratio": "16:9"
}
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 का संकेत नहीं मिलता।
imagesarrayआवश्यकAdditional reference images for style/appearance. Reference in prompt as @Image1, @Image2, etc. Maximum 7 total (elements + reference images + start image).
promptstringआवश्यकTake @Element1, @Element2 to reference elements and @Image1, @Image2 to reference images in order.
durationintegerVideo duration in seconds.
डिफ़ॉल्ट: 5
संभावित मान: 3, 4, 5, 6, 7, 8, 9, 10
elementsarrayElements (characters/objects) to include in the video. Reference in prompt as @Element1, @Element2, etc. Maximum 7 total (elements + reference images + start image).
aspect_ratiostringThe aspect ratio of the generated image.
डिफ़ॉल्ट: "16:9"
संभावित मान: "16:9", "9:16", "1:1"
{
"model": "kwaivgi/kling-video/3.0/omni/pro/reference-to-video",
"images": [
"https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_images_0.png",
"https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_images_1.png"
],
"prompt": "Take @Image1 as the start frame. Start with a high-angle satellite view of the ancient greenhouse ruin surrounded by nature. The camera swoops down and flies inside the building, revealing the character from @Element1 standing in the sun-drenched center. The camera then seamlessly transitions into a smooth 180-degree orbit around the character, moving to the back view. As the open backpack comes into focus, the camera continues to push forward, zooming deep inside the bag to reveal the glowing stone from @Element2 nestled inside. Cinematic lighting, hopeful atmosphere, 35mm lens. Make sure to keep it as the style of @Image2.",
"duration": 5,
"elements": [
{
"frontal_image_url": "https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_element_0.png",
"reference_image_urls": [
"https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_element_1.png",
"https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_element_2.png"
]
},
{
"frontal_image_url": "https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_element_3.png",
"reference_image_urls": [
"https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/input_element_4.png"
]
}
],
"aspect_ratio": "16:9"
}पूरा हुआ run अपना परिणाम output में दिखाता है। नीचे दिया गया model का सेव किया हुआ example है, नई generation नहीं।
[
{
"poster": "https://static.sandbase.ai/examples/posters/f7d56e1be9db929ba8e6.jpg",
"source": "Kling AI official schema mirror",
"source_url": "https://kling.ai/document-api/guides/get-started/overview",
"url": "https://static.sandbase.ai/examples/kwaivgi/kling-video/omni/pro/reference-to-video/output_url_2.mp4"
}
]