Skip to main content
POST

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>
required

Model name. Select the model ID that matches the input and task:

  • gemini-omni-1.2-flash-text-to-video: text-to-video
  • gemini-omni-1.2-flash-image-to-video: image-to-video (first frame or first/last frames)
  • gemini-omni-1.2-flash-reference-to-video: reference-to-video
  • gemini-omni-1.2-flash-video-edit: video editing
  • gemini-omni-1.2-flash-video-extend: video extension
  • gemini-omni-1.2-flash-video-upscale: video upscaling
Available options:
gemini-omni-1.2-flash-text-to-video,
gemini-omni-1.2-flash-image-to-video,
gemini-omni-1.2-flash-reference-to-video,
gemini-omni-1.2-flash-video-edit,
gemini-omni-1.2-flash-video-extend,
gemini-omni-1.2-flash-video-upscale
Example:

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

prompt
string

Text prompt describing the generation, editing, or continuation goal; supports Chinese and English. Required for every mode except video upscaling, which needs no prompt.

  • Describe the subject, action, scene, camera movement, and elements to preserve clearly.
  • Put negative requirements directly in the prompt, such as No dialogue or No text. There is no separate negative prompt parameter.

Video upscaling does not use prompt; any supplied prompt is ignored.

Example:

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

image_urls
string<uri>[]

Image input array.

  • Image-to-video: required; 1–2 images. One is the first frame; two are the first and last frames.
  • Reference-to-video: required; the published recommendation is at most 10 reference images.
  • Video editing: optional; up to 10 reference images.
  • Video extension: optional; up to 10 reference images.
  • Text-to-video and video upscaling: image input is not supported.

HTTP/HTTPS image URLs only; supported formats: png, jpeg, webp.

Required array length: 1 - 10 elements
Example:
video_urls
string<uri>[]

Video input array.

  • Reference-to-video: optional; the published recommendation is at most 3 videos. When duration exceeds 10 seconds, at most 1 is allowed.
  • Video editing: exactly 1 required, up to 15 seconds.
  • Video extension: exactly 1 required, up to 30 seconds.
  • Video upscaling: exactly 1 required, up to 15 seconds. Supported sizes: 640×360, 1280×720, 1920×1080, and their portrait equivalents.
  • Text-to-video and image-to-video: video input is not supported.

Each reference video must be no longer than 10 seconds.

Required array length: 1 - 3 elements
Example:
quality
enum<string>

Video resolution.

Options (landscape / portrait):

  • 360p: 640×360 / 360×640
  • 720p: 1280×720 / 720×1280
  • 1080p: 1920×1080 / 1080×1920
  • 4k: 3840×2160 / 2160×3840
  • auto: editing and extension only; follows the input resolution.

Defaults:

  • Text-to-video, image-to-video, reference-to-video: 720p.
  • Video editing and extension: auto.
  • Video upscaling: required target resolution, higher than the input. 360p → 720p or 1080p; 720p → 1080p or 4k; 1080p → 4k.

Billing: Text-to-video, image-to-video, reference-to-video, editing, and extension are billed separately for input tokens, video output tokens, and other output tokens (including thinking). Video upscaling is billed only for video output tokens, with no input or thinking token charges. The charge at submission is an estimate; final billing uses actual usage.

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

"720p"

duration

Video duration.

  • Text-to-video and reference-to-video: integer 3–15 seconds; default 3.
  • Image-to-video: 3–15 seconds with one first frame, or 3–10 seconds with first/last frames; default 3.
  • Video editing and upscaling: only auto, which is also the default. Output duration follows the input.
  • Video extension: integer 3–10 seconds; default 3. This is the duration to append.
Required range: 3 <= x <= 15
Example:

3

aspect_ratio
enum<string>
default:auto

Video aspect ratio; default auto.

  • 16:9: landscape.
  • 9:16: portrait.
  • auto: the model selects the ratio from the prompt and input; this is the default.

Editing, extension, and upscaling allow only auto and preserve the input video's aspect ratio.

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