videostringbắt buộc
URL of the video to edit.
google/gemini-omni-flash/1.1/editGemini Omni Flash 1.1 Edit by Google applies natural-language edits to an existing video of up to ten seconds, such as changing style, lighting, or objects, at 360p to 4K output.
Thử model
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.
{
"prompt": "Make this video look like a watercolor painting. Keep everything else the same.",
"resolution": "1080p",
"video": "https://static.sandbase.ai/examples/dc14a58a-ac90-45a2-8041-931e6bafb192/input/dc716dd9-2ff4-443f-ac62-0d7c64e7381e.mp4"
}Gemini Omni Flash 1.1 edit: change an existing clip of up to 10 seconds with an instruction, such as style, lighting, or objects, while the rest of the scene stays consistent.
| Field | Type | Default | Notes |
|---|---|---|---|
prompt | string, required | — | Up to 20,000 characters. |
video | video URL, required | — | Source clip, up to 10 seconds. |
resolution | 360p / 720p / 1080p / 4k | 720p | Sets the per-second rate. |
Billing counts the source and the output: $0.02 per source second plus the output rate ($0.04 at 360p, $0.12 at 720p, $0.18 at 1080p, $0.36 at 4K) for the same length, with a 3-second minimum on the output. The quote before submission assumes an 8-second source.
| Source clip | 360p | 720p | 1080p | 4k |
|---|---|---|---|---|
| 3s source | $0.18 | $0.42 | $0.60 | $1.14 |
| 5s source | $0.30 | $0.70 | $1.00 | $1.90 |
| 8s source | $0.48 | $1.12 | $1.60 | $3.04 |
| 10s source | $0.60 | $1.40 | $2.00 | $3.80 |
Failed runs are not charged.
Other Gemini Omni Flash 1.1 endpoints: google/gemini-omni-flash/1.1/text-to-video, google/gemini-omni-flash/1.1/image-to-video, google/gemini-omni-flash/1.1/reference-to-video, google/gemini-omni-flash/edit (previous version).
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": "google/gemini-omni-flash/1.1/edit",
"video": "https://static.sandbase.ai/examples/google/gemini-omni-flash/edit/input_video_0.mp4",
"prompt": "Make this video anime. Keep everything else the same.",
"resolution": "720p"
}
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.
videostringbắt buộcURL of the video to edit.
promptstringbắt buộcA simple instruction describing the edit.
resolutionstringThe resolution of the edited video.
Mặc định: "720p"
Giá trị có thể dùng: "360p", "720p", "1080p", "4k"
{
"model": "google/gemini-omni-flash/1.1/edit",
"video": "https://static.sandbase.ai/examples/google/gemini-omni-flash/edit/input_video_0.mp4",
"prompt": "Make this video anime. Keep everything else the same.",
"resolution": "720p"
}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/32fa6172b88089aa9558.jpg",
"source": "Self organization completed prediction",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/dc14a58a-ac90-45a2-8041-931e6bafb192/output/3969dbf9-5e53-4955-ab05-47c8c63007b9.mp4"
}
]