videostring必須
URL of the video to edit. Must be at most 15 seconds long.
google/gemini-omni-flash/1.2/editGemini Omni Flash 1.2 Edit by Google applies natural-language edits to an existing video of up to 15 seconds, such as swapping objects, backgrounds, lighting, or style, at 360p to 4K output.
モデルを試す
出力はここに表示されます
入力を完了してから[実行]をクリックしてください。
Gemini Omni Flash 1.2 edit: change an existing clip of up to 15 seconds with an instruction, such as swapping a product or background, or changing lighting, weather, or style, 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 15 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.028 at 360p, $0.084 at 720p, $0.126 at 1080p, and $0.252 at 4K) for the same length, with a 3-second minimum on the output. Source length is rounded up to the next whole second. The quote before submission assumes an 8-second source.
| Source clip | 360p | 720p | 1080p | 4k |
|---|---|---|---|---|
| 3s source | $0.14 | $0.31 | $0.44 | $0.82 |
| 8s source | $0.38 | $0.83 | $1.17 | $2.18 |
| 10s source | $0.48 | $1.04 | $1.46 | $2.72 |
| 15s source | $0.72 | $1.56 | $2.19 | $4.08 |
Failed runs are not charged.
Other Gemini Omni Flash 1.2 endpoints: google/gemini-omni-flash/1.2/text-to-video, google/gemini-omni-flash/1.2/image-to-video, google/gemini-omni-flash/1.2/reference-to-video, google/gemini-omni-flash/1.1/edit (previous version).
開発を始める
このモデルを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.2/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"SandBaseのAPIキーを作成し、サーバー環境に設定してください。すべてのリクエストはBearer認証を使用します。
export SANDBASE_API_KEY="YOUR_API_KEY"キーはサーバー側で管理してください。ブラウザコードに公開したり、リポジトリにコミットしたりしないでください。
このモデルIDと入力を使って /v1/run にPOSTしてください。上のリクエスト例には送信とポーリングが含まれています。
返されたrun IDを使って、ステータスがcompleted、failed、timeoutになるまでポーリングしてください。出力はcompleted後にのみ読み取ってください。
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"モデルのimage、video、またはaudioフィールドに、公開アクセス可能なファイルURLを指定してください。対応形式と制限は各Playground入力の横に表示されます。
Playgroundの対応する画像フィールドでアップロードまたは置換を使用してください。video URLフィールドはホストされたドライビング動画を受け付けますが、動画アップロード対応を意味するものではありません。
videostring必須URL of the video to edit. Must be at most 15 seconds long.
promptstring必須A simple instruction describing the edit.
resolutionstringThe resolution of the edited video.
デフォルト: "720p"
指定可能な値: "360p", "720p", "1080p", "4k"
{
"model": "google/gemini-omni-flash/1.2/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"
}完了したrunの結果は出力に表示されます。以下はモデルに保存されたサンプルであり、新規生成ではありません。
まだ例の出力は公開されていません。完了したrunのレスポンスを確認するには、Playground → Result → JSON を使用してください。