imagestringจำเป็น
URL of the input image to animate.
google/gemini-omni-flash/image-to-videoGemini Omni Flash by Google - animate still images into dynamic videos with AI. Transform photos into cinematic clips with natural motion, camera movement, and optional audio generation.
ลองใช้โมเดล
PNG, JPEG, WebP หรือ GIF · สูงสุด 20 MiB
ต้องการทำอะไรต่อ
เลือกตัวอย่างเพื่อโหลดอินพุตและผลลัพธ์ลงใน playground
{
"aspect_ratio": "9:16",
"duration": 3,
"image": "https://static.sandbase.ai/examples/cfbc9108-0728-4751-a18f-2e8eb3e6a9ea/input/4746f7db-31ca-43c2-a62c-cbc2ef82a1eb.jpg",
"prompt": "The waves roll gently onto the shore, slow push-in, no dialogue"
}Gemini Omni Flash image-to-video: animate a picture into a 3–10 second clip with synchronized audio.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 20,000 characters. |
image | image URL, required | — | First frame. JPEG, PNG, or WebP URL. |
duration | integer 3–10 | 8 | Output length in seconds (3–10). |
aspect_ratio | 16:9 / 9:16 | 16:9 | Output frame shape. |
You pay $0.13 per output second.
| Output | Price |
|---|---|
| 3s | $0.39 |
| 8s (default) | $1.04 |
| 10s | $1.30 |
Failed runs are not charged.
Other Gemini Omni Flash endpoints: google/gemini-omni-flash/text-to-video, google/gemini-omni-flash/reference-to-video, google/gemini-omni-flash/edit, google/gemini-omni-flash/1.1/image-to-video (newer).
เริ่มสร้าง
ส่งโมเดลนี้ผ่าน 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": "google/gemini-omni-flash/image-to-video",
"image": "https://static.sandbase.ai/examples/google/gemini-omni-flash/image-to-video/input_image_0.png",
"prompt": "The dog turns its head and wags its tail in warm sunlight.",
"duration": 8,
"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 และตั้งค่าไว้ในสภาพแวดล้อมฝั่งเซิร์ฟเวอร์ คำขอทั้งหมดใช้การยืนยันตัวตนแบบ Bearer
export SANDBASE_API_KEY="YOUR_API_KEY"เก็บ key ไว้บนเซิร์ฟเวอร์ อย่าเปิดเผยในโค้ดฝั่งเบราว์เซอร์หรือคอมมิตลง repository
POST ไปที่ /v1/run ด้วย model ID นี้และอินพุตของมัน ตัวอย่างคำขอด้านบนมีทั้งการส่งและการ polling
ใช้ run ID ที่ส่งกลับมาเพื่อ polling จนกว่าสถานะจะเป็น completed, failed หรือ timeout ให้อ่าน output หลังจาก completed เท่านั้น
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"ส่ง URL ไฟล์ที่เข้าถึงได้สาธารณะในช่อง image, video หรือ audio ของโมเดล รูปแบบและข้อจำกัดที่รองรับแสดงอยู่ข้างแต่ละอินพุตใน Playground
ใช้ตัวควบคุม upload หรือ replace ในช่องรูปภาพที่รองรับใน Playground ช่อง URL ของวิดีโอรองรับวิดีโอ driving ที่โฮสต์ไว้; ไม่ได้หมายความว่าสามารถอัปโหลดวิดีโอได้
imagestringจำเป็นURL of the input image to animate.
promptstringจำเป็นThe text prompt describing how the image should be animated.
durationintegerThe duration of the generated video, in seconds.
ค่าเริ่มต้น: 8
ขั้นต่ำ: 3
สูงสุด: 10
aspect_ratiostringThe aspect ratio of the generated video.
ค่าเริ่มต้น: "16:9"
ค่าที่เป็นไปได้: "16:9", "9:16"
{
"model": "google/gemini-omni-flash/image-to-video",
"image": "https://static.sandbase.ai/examples/google/gemini-omni-flash/image-to-video/input_image_0.png",
"prompt": "The dog turns its head and wags its tail in warm sunlight.",
"duration": 8,
"aspect_ratio": "16:9"
}run ที่เสร็จสมบูรณ์จะแสดงผลลัพธ์ใน output ต่อไปนี้เป็นตัวอย่างที่บันทึกไว้ของโมเดล ไม่ใช่การสร้างใหม่
[
{
"poster": "https://static.sandbase.ai/examples/posters/b21981b2d2a69c8ad625.jpg",
"source": "Self organization completed prediction",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/cfbc9108-0728-4751-a18f-2e8eb3e6a9ea/output/c6b06f65-b9c4-41a9-9e20-f17ddd128c65.mp4"
}
]