Skip to content

Gemini Omni: video generation API

Generate short videos with Gemini Omni in a single synchronous request: model, request parameters, response, errors, and billing.

Gemini Omni generates a short video in one synchronous request: the finished clip comes back as base64 MP4 in the response body, with no task ID and no polling.

ItemValue
Base URLhttps://api.hop-base.com/v1beta
Generate videoPOST /v1beta/interactions
Equivalent aliasesPOST /v1/interactions, POST /interactions
Tasks and pollingNone; the response is synchronous
Key group"Gemini Official Direct"

Available models

Model IDResolutionDurationOfficial price
gemini-omni-flash-preview720p3-10 seconds$1.50 / $9/ 1M tokens

gemini-omni-flash-preview is the only Gemini model that outputs video, and unlike every other video model on HopBase it is synchronous. It returns a 3-10 second 720p MP4 and is billed by token rather than by second. See the model card for full specs.

Omni video is served by the Gemini Official Direct group — the same group and the same key as Gemini chat and Gemini image generation. There is no separate video package to buy. Confirm availability with GET /v1/models and see your effective rates in the signed-in Model Plaza.

Request parameters

ParameterRequiredType & limitsDefaultDescription
modelRequiredgemini-omni-flash-preview only—Any other model is rejected with 400
inputRequiredstring, or the native step array; media as base64 data + mime_type or remote uri; input video ≤ 10 s—Text, image, and video input. The 10 s limit is checked by the model, not the gateway
streamOptionalbooleanfalsetrue gives no incremental stream; the whole result arrives at once
Other native fieldsOptionale.g. system_instruction, generation_config—Passed through unchanged

There is no duration, resolution, or fps parameter. State the length you want in the prompt.

Response

The request blocks until the clip is finished, so there is no queued or processing state. On success you get HTTP 200, and the clip sits in steps[].content[] on the step whose type is model_output.

FieldDescription
statuscompleted when done
steps[].typeThe step holding the clip is model_output
steps[].content[].typeThe video block is video
steps[].content[].mime_typevideo/mp4
steps[].content[].dataBase64-encoded MP4
usage.total_input_tokens / usage.total_output_tokensInput and output tokens
usage.output_tokens_by_modalityOutput tokens broken down by modality, for reference

Success

{
  "status": "completed",
  "model": "gemini-omni-flash-preview",
  "steps": [{
    "type": "model_output",
    "content": [{ "type": "video", "mime_type": "video/mp4", "data": "<base64-mp4>" }]
  }],
  "usage": {
    "total_input_tokens": 20,
    "total_output_tokens": 17819,
    "output_tokens_by_modality": [{ "modality": "video", "tokens": 17376 }]
  }
}

The numbers in usage.output_tokens_by_modality are already included in total_output_tokens, so do not add them again.

PropertyValue
Duration3-10 seconds
Resolution720p
Frame rate24 FPS
ContainerMP4, returned as base64
Context window1,048,576 tokens

The clip arrives inside the JSON body itself: there is no download link, so nothing expires. Responses are large as a result, so size your client buffers accordingly.

Failure

A failure takes one of three forms:

  • A gateway validation failure returns 400 in the {"error": {"message": …}} shape; see "Common errors" below.
  • Errors raised by the model itself come back in its native error body.
  • A 200 without a type: "video" block (the model answered with text only, or declined). This is still billed by tokens, so check for that block before treating the call as a success.

Minimal example

curl https://api.hop-base.com/v1beta/interactions \
  -H "Authorization: Bearer sk-your-key" \
  -H "Content-Type: application/json" \
  --max-time 600 \
  -d '{
    "model": "gemini-omni-flash-preview",
    "input": "3-second video: a red ball slowly rolling on a white background"
  }'

Notes

Chat Completions cannot return the video.

Sending gemini-omni-flash-preview to /v1/chat/completions works, but only the text part of the answer comes back — the video block is dropped. Use the Interactions endpoint whenever you want the clip.

Video generation is slow and this endpoint has no asynchronous mode — Prefer: respond-async works for Gemini image generation but not here.

  • The native Interactions endpoint has no gateway-side watchdog, so set a generous client timeout — five minutes is a reasonable floor.
  • Calling gemini-omni-flash-preview through /v1/chat/completions instead is capped at roughly 100 seconds per call, regardless of your client timeout; use the Interactions endpoint directly for anything that might run longer.
  • HopBase deliberately does not retry a 504 on this path. Replaying a request whose outcome is unknown would risk generating and paying for the clip twice.
  • The model ID carries preview. Capabilities and availability can change without notice.

The gateway currently has no uniform count or per-file byte validation for Omni image/video inputs. An unverified limit does not mean unlimited support. Do not copy GPT Image's 16-image limit or Seedance's media rules.

uri is a remote media address and data contains base64; do not use asset://, Seedance asset IDs, or local file paths. Structural acceptance does not guarantee media validation or content moderation success.

Common errors and fixes

The gateway rejects these with 400:

Interactions API only supports model gemini-omni-flash-preview
request body is missing input
missing model
request body must be JSON
Error or symptomFix
Interactions API only supports model gemini-omni-flash-previewSet model to gemini-omni-flash-preview
request body is missing inputAdd input
missing modelAdd model
request body must be JSONSend a JSON request body
402Your balance is zero or below; top up and call again
200 without a video blockThe model answered with text only or declined, and it is still billed; check steps[].content[] before treating it as a success
Only text via /v1/chat/completionsUse POST /v1beta/interactions instead
504HopBase does not retry it; a replay could generate and bill the clip twice

Billing

Billed by token, not by second. A 200 without a video block is still billed by tokens; a request that errors or times out is not billed.

No balance is reserved up front; a 402 comes back only when your balance is zero or below. Official list prices are on the pricing page, your own rate is the one shown in the signed-in Model Plaza, and each request's actual charge is on the Usage page in the console.

Next steps