Skip to main content
POST
Gemini Omni 1.2 Flash Text-to-Video

Authorizations

Authorization
string
header
required

##All endpoints require authentication using a Bearer Token##

Get your API Key:

Visit the API Key management page to obtain your API Key

Add it to the request header:

Body

application/json
model
enum<string>
default:gemini-omni-1.2-flash-text-to-video
required

Model name, fixed to gemini-omni-1.2-flash-text-to-video

Available options:
gemini-omni-1.2-flash-text-to-video
Example:

"gemini-omni-1.2-flash-text-to-video"

prompt
string
required

Text prompt describing the subject, action, scene, and camera movement. Write negative requirements directly in the prompt.

Supports Chinese and English. For more stable results, describe the desired action and changes clearly. Write negative requirements directly in prompt, such as No dialogue or No text; there is no separate negative prompt parameter.

The prompt is required and must not be empty or contain only whitespace.

Minimum string length: 1
Pattern: \S
Example:

"A glass marble rolls quickly along a wooden track, then falls into water with a splash."

quality
enum<string>
default:720p

Video resolution; default 720p.

Supported values:

  • 360p: landscape 640×360 / portrait 360×640
  • 720p: landscape 1280×720 / portrait 720×1280; default
  • 1080p: landscape 1920×1080 / portrait 1080×1920
  • 4k: landscape 3840×2160 / portrait 2160×3840

Orientation is controlled by aspect_ratio: 16:9 produces landscape and 9:16 produces portrait.

Billing: Video output is billed by output tokens, which scale linearly with resolution. Relative to 720p, 360p uses about one third, 1080p about 1.5×, and 4k about 3×. Actual charges are based on generated usage.

Available options:
360p,
720p,
1080p,
4k
Example:

"720p"

duration
integer
default:3

Video duration in seconds; default 3. Accepts any integer from 3 to 15. Duration directly affects billing.

Required range: 3 <= x <= 15
Example:

3

aspect_ratio
enum<string>
default:auto

Aspect ratio: 16:9, 9:16, or auto; default auto.

Available options:
16:9,
9:16,
auto
Example:

"auto"

seed
integer

Random seed; random by default.

  • Range: 0–4294967295.
  • Fixing the seed reduces variation from parameter changes when tuning prompts and improves reproducibility.
Required range: 0 <= x <= 4294967295
Example:

42

callback_url
string<uri>

HTTPS callback URL to notify when the task completes

Callback timing:

  • Triggered when the task completes (completed), fails (failed), or is cancelled (cancelled)
  • Sent after billing is confirmed

Security restrictions:

  • HTTPS protocol only
  • Callbacks to internal IP addresses are forbidden (127.0.0.1, 10.x.x.x, 172.16-31.x.x, 192.168.x.x, etc.)
  • URL length must not exceed 2048 characters

Callback mechanism:

  • Timeout: 10 seconds
  • Up to 3 retries on failure (retried 1s / 2s / 4s after each failure respectively)
  • The callback body format matches the response of the task query endpoint
  • A 2xx status code from the callback URL is treated as success; other status codes trigger a retry
Example:

"https://your-domain.com/webhooks/video-task-completed"

Response

Video task created successfully

created
integer

Task creation timestamp

Example:

1757169743

id
string

Task ID

Example:

"task-unified-1757169743-7cvnl5zw"

model
string

The model name actually used

Example:

"gemini-omni-1.2-flash-text-to-video"

object
enum<string>

The specific type of the task

Available options:
video.generation.task
progress
integer

Task progress percentage (0-100)

Required range: 0 <= x <= 100
Example:

0

status
enum<string>

Task status. The create endpoint always returns processing; the internal pending state is also exposed to clients as processing.

Available options:
pending,
processing,
completed,
failed
Example:

"processing"

task_info
object

Detailed video task information

type
enum<string>

The output type of the task

Available options:
text,
image,
audio,
video
Example:

"video"

usage
object

Usage and billing information