videostringobligatoire
URL of the video to edit. Note: editing uploaded videos is not available for users in the European Economic Area (EEA), Switzerland, and the United Kingdom.
google/gemini-omni-flash/editGemini Omni Flash Edit by Google applies natural-language edits to an existing short video, such as changing style, lighting, or objects, while keeping the rest of the scene consistent.
Essayer le modèle
Que souhaitez-vous faire ensuite ?
Sélectionnez un exemple pour charger ses entrées et son résultat dans le playground.
{
"prompt": "Make this video look like a pencil sketch. Keep everything else the same.",
"video": "https://static.sandbase.ai/examples/8858006e-f268-46ec-9472-2987d3c14ed6/input/cd37fee6-abad-43a3-b5e0-55fb785ea7fd.mp4"
}Gemini Omni Flash 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. |
Billing counts the source and the output: $0.02 per source second plus $0.13 per output second for the same length, with a 3-second minimum on the output. The quote before submission assumes an 8-second source.
| Source clip | Price |
|---|---|
| 3s source | $0.45 |
| 5s source | $0.75 |
| 8s source | $1.20 |
| 10s source | $1.50 |
Failed runs are not charged.
Other Gemini Omni Flash endpoints: google/gemini-omni-flash/text-to-video, google/gemini-omni-flash/image-to-video, google/gemini-omni-flash/reference-to-video, google/gemini-omni-flash/1.1/edit (newer).
Commencer à construire
Soumettez ce modèle via l'API Unified Run de SandBase.
# 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/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."
}
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"Créez une clé API SandBase et définissez-la dans l'environnement de votre serveur. Toutes les requêtes utilisent l'authentification Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Conservez la clé sur votre serveur. Ne l'exposez pas dans le code du navigateur et ne la committez pas dans un dépôt.
Faites un POST sur /v1/run avec cet ID de modèle et ses entrées. L'exemple de requête ci-dessus inclut la soumission et le polling.
Utilisez l'ID d'exécution renvoyé pour interroger jusqu'à ce que le statut soit completed, failed ou timeout. Ne lisez la sortie qu'une fois completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Passez une URL de fichier accessible publiquement dans le champ image, video ou audio du modèle. Les formats pris en charge et les limites sont indiqués à côté de chaque entrée du Playground.
Utilisez le contrôle upload ou replace sur les champs image pris en charge dans le Playground. Les champs URL vidéo acceptent une vidéo de conduite hébergée ; cela n'implique pas la prise en charge de l'importation vidéo.
videostringobligatoireURL of the video to edit. Note: editing uploaded videos is not available for users in the European Economic Area (EEA), Switzerland, and the United Kingdom.
promptstringobligatoireA simple instruction describing the edit. Simple prompts work best; add "Keep everything else the same." to preserve the rest of the scene. Voice editing is not supported.
{
"model": "google/gemini-omni-flash/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."
}Une exécution terminée expose son résultat dans output. Ce qui suit est l'exemple enregistré du modèle, et non une nouvelle génération.
[
{
"poster": "https://static.sandbase.ai/examples/posters/778cfd74baba340a1837.jpg",
"source": "Self organization completed prediction",
"source_url": "https://www.sandbase.ai",
"url": "https://static.sandbase.ai/examples/8858006e-f268-46ec-9472-2987d3c14ed6/output/520452f3-f1d4-4029-807c-cb4d58616128.mp4"
}
]