PopNowDocs da API
Conteúdo principal

Referência da API do Gemini Omni 1.2 Flash

Vídeo com som de até 4K a partir de texto, imagens, referências ou do seu próprio clipe

Com uma única chave de API da PopNow você chama o Gemini Omni 1.2 Flash direto do seu código. Aqui estão os IDs de modelo a enviar, cada campo de entrada aceito, quanto custa cada requisição em USD e um exemplo que você cola no terminal e roda.

As descrições dos parâmetros vêm do schema de entrada do modelo e estão disponíveis só em inglês.

Resumo

Desenvolvedor
Google
Resultado
Vídeo
A partir de
$0.027 USD por segundo gerado

Os preços são exibidos em USD e os valores são descontados do seu saldo PopNow. Ao aceitar a tarefa, o valor máximo é reservado; ao concluir, o uso real é cobrado e o restante liberado. Tarefas com falha não são cobradas. Consulte POST /api/v1/jobs/quote para obter uma cotação exata antes de executar.

Criar vídeo

google/gemini-omni-1.2-flash/text-to-video

Preço

OpçãoUSD
360p$0.027 por segundo gerado
720p$0.079 por segundo gerado
1080p$0.118 por segundo gerado
4k$0.236 por segundo gerado

Parâmetros

CampoTipoPadrãoValores aceitosPara que serve
promptObrigatóriostring—até 20.000 caracteresDescribe the subject, the action, the camera and the sound. Say "in a single continuous shot" if you want no cuts.
aspect_ratioOpcionalstring16:916:9, 9:16Output aspect ratio: 16:9 or 9:16.
resolutionOpcionalstring720p360p, 720p, 1080p, 4kOutput resolution. 360p and 720p are native; 1080p and 4K are upscaled by Google. Sets the per-second rate.
duration_secondsOpcionalinteger83, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15Clip length in whole seconds, from 3 to 15. Billed per second at the rate of the chosen resolution.
seedOpcionalinteger—de 10000 a 99999Optional whole number from 10000 to 99999 for side-by-side comparisons; it does not guarantee identical frames.

Exemplo de requisição

Esta requisição roda do jeito que está; os campos que você omitir usam o valor padrão. Antes, coloque sua chave em POPNOW_API_KEY.

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "google/gemini-omni-1.2-flash/text-to-video",
  "input": {
    "prompt": "A paper boat drifts down a rain-soaked street at dusk, neon signs reflecting in the water, slow tracking shot at ground level",
    "duration_seconds": 8,
    "resolution": "720p"
  }
}'

A resposta já traz um taskId. Busque o resultado com GET /api/v1/jobs/recordInfo ou inclua callBackUrl para ser avisado.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Imagem para vídeo

google/gemini-omni-1.2-flash/image-to-video

Preço

OpçãoUSD
360p$0.027 por segundo gerado
720p$0.079 por segundo gerado
1080p$0.118 por segundo gerado
4k$0.236 por segundo gerado

Parâmetros

CampoTipoPadrãoValores aceitosPara que serve
promptObrigatóriostring—até 20.000 caracteresDescribe the motion, the camera and the sound.
image_urlObrigatóriostring (uri)——Opening frame of the clip.
last_image_urlOpcionalstring (uri)——Optional closing frame: the clip moves from the opening frame to this one. With a closing frame the clip can be 3 to 10 seconds long.
aspect_ratioOpcionalstring16:916:9, 9:16Output aspect ratio: 16:9 or 9:16.
resolutionOpcionalstring720p360p, 720p, 1080p, 4kOutput resolution. 360p and 720p are native; 1080p and 4K are upscaled by Google. Sets the per-second rate.
duration_secondsOpcionalinteger83, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15Clip length in whole seconds, from 3 to 15. Billed per second at the rate of the chosen resolution.
seedOpcionalinteger—de 10000 a 99999Optional whole number from 10000 to 99999 for side-by-side comparisons; it does not guarantee identical frames.

Exemplo de requisição

Esta requisição roda do jeito que está; os campos que você omitir usam o valor padrão. Antes, coloque sua chave em POPNOW_API_KEY.

O exemplo usa arquivos de amostra da PopNow em image_url. Troque pelos seus próprios links HTTPS públicos, uploads ou assets salvos.

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "google/gemini-omni-1.2-flash/image-to-video",
  "input": {
    "prompt": "He lands softly on the rooftop, laughs and turns toward the camera while the balloons sway in the evening breeze; slow push-in",
    "image_url": "https://media.popnow.ai/influencer/examples/marco.webp",
    "duration_seconds": 8,
    "resolution": "720p"
  }
}'

A resposta já traz um taskId. Busque o resultado com GET /api/v1/jobs/recordInfo ou inclua callBackUrl para ser avisado.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Referências para vídeo

google/gemini-omni-1.2-flash/reference-to-video

Preço

OpçãoUSD
360p$0.027 por segundo gerado
720p$0.079 por segundo gerado
1080p$0.118 por segundo gerado
4k$0.236 por segundo gerado

Parâmetros

CampoTipoPadrãoValores aceitosPara que serve
promptObrigatóriostring—até 20.000 caracteresSay in plain words what each reference is and how to use it, for example "the man in Image 1" or "move like Video 1".
reference_image_urlsOpcionalarray<string (uri)>—até 6 itensUp to six images of the people, products or places to keep, with up to three per character for two characters.
reference_video_urlsOpcionalarray<string (uri)>—até 3 itensUp to three reference clips of no more than 3 seconds each for look and motion; any sound in them is ignored. Google lists one clip for outputs of 11 to 15 seconds.
aspect_ratioOpcionalstring16:916:9, 9:16Output aspect ratio: 16:9 or 9:16.
resolutionOpcionalstring720p360p, 720p, 1080p, 4kOutput resolution. 360p and 720p are native; 1080p and 4K are upscaled by Google. Sets the per-second rate.
duration_secondsOpcionalinteger83, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15Clip length in whole seconds, from 3 to 15. Billed per second at the rate of the chosen resolution.
seedOpcionalinteger—de 10000 a 99999Optional whole number from 10000 to 99999 for side-by-side comparisons; it does not guarantee identical frames.

Exemplo de requisição

Esta requisição roda do jeito que está; os campos que você omitir usam o valor padrão. Antes, coloque sua chave em POPNOW_API_KEY.

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "google/gemini-omni-1.2-flash/reference-to-video",
  "input": {
    "prompt": "The man from the reference image jogs across a sunlit rooftop at golden hour and smiles at the camera; smooth tracking shot",
    "duration_seconds": 8,
    "resolution": "720p"
  }
}'

A resposta já traz um taskId. Busque o resultado com GET /api/v1/jobs/recordInfo ou inclua callBackUrl para ser avisado.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Editar vídeo

google/gemini-omni-1.2-flash/video-edit

Preço

OpçãoUSD
360p$0.054 por segundo gerado
720p$0.117 por segundo gerado
1080p$0.164 por segundo gerado
4k$0.305 por segundo gerado

Parâmetros

CampoTipoPadrãoValores aceitosPara que serve
promptObrigatóriostring—até 20.000 caracteresSay what to change in plain words and end with "Keep everything else the same."
video_urlObrigatóriostring (uri)——The clip to edit (MP4). Billed per second of the source clip, rounded up, with a 3 second minimum.
resolutionOpcionalstring720p360p, 720p, 1080p, 4kOutput resolution. 360p and 720p are native; 1080p and 4K are upscaled by Google. Sets the per-second rate.

Exemplo de requisição

Esta requisição roda do jeito que está; os campos que você omitir usam o valor padrão. Antes, coloque sua chave em POPNOW_API_KEY.

O exemplo usa arquivos de amostra da PopNow em video_url. Troque pelos seus próprios links HTTPS públicos, uploads ou assets salvos.

POST /api/v1/jobs/createTask
curl -X POST "https://api.popnow.ai/api/v1/jobs/createTask" \
  -H "Authorization: Bearer $POPNOW_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{
  "model": "google/gemini-omni-1.2-flash/video-edit",
  "input": {
    "prompt": "Recolor the flowers in soft pastel blue; keep the face and the motion unchanged",
    "video_url": "https://media.popnow.ai/effects/flower-bloom-1abd6efb.mp4",
    "resolution": "720p"
  }
}'

A resposta já traz um taskId. Busque o resultado com GET /api/v1/jobs/recordInfo ou inclua callBackUrl para ser avisado.

GET /api/v1/jobs/recordInfo
curl "https://api.popnow.ai/api/v1/jobs/recordInfo?taskId=TASK_ID_FROM_CREATE_TASK" \
  -H "Authorization: Bearer $POPNOW_API_KEY"

Próximos passos

Nesta página