videostringobrigatório
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.
Testar o modelo
O que você gostaria de fazer em seguida?
Selecione um exemplo para carregar as entradas e o resultado no 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).
Comece a construir
Envie este modelo pela 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/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"Crie uma chave da API SandBase e defina-a no ambiente do seu servidor. Todas as requisições usam autenticação Bearer.
export SANDBASE_API_KEY="YOUR_API_KEY"Mantenha a chave no servidor. Não a exponha em código do navegador nem a comite em um repositório.
Faça POST para /v1/run com este ID de modelo e suas entradas. O exemplo de requisição acima inclui envio e polling.
Use o ID de execução retornado para fazer polling até que o status seja completed, failed ou timeout. Leia a saída somente após completed.
curl "https://api.sandbase.ai/v1/run/$RUN_ID" \
-H "Authorization: Bearer $SANDBASE_API_KEY"Passe uma URL de arquivo acessível publicamente no campo de imagem, vídeo ou áudio do modelo. Os formatos e limites suportados são mostrados ao lado de cada entrada do Playground.
Use o controle de upload ou substituição nos campos de imagem suportados no Playground. Campos de URL de vídeo aceitam um vídeo de condução hospedado; isso não implica suporte a upload de vídeo.
videostringobrigatórioURL 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.
promptstringobrigatórioA 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."
}Uma execução concluída expõe seu resultado em output. O texto a seguir é o exemplo salvo do modelo, não uma nova geração.
[
{
"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"
}
]