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>
default:gemini-omni-1.2-flash-video-edit
required

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

Available options:
gemini-omni-1.2-flash-video-edit
Example:

"gemini-omni-1.2-flash-video-edit"

prompt
string
required

Text instruction describing the desired edit and what should remain unchanged.

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:

"Make the lighting warmer while keeping everything else unchanged."

video_urls
string<uri>[]
required

Video array to edit; exactly 1 video.

  • HTTP/HTTPS video URLs only.
  • Format: mp4.
  • Duration: up to 15 seconds, with no lower limit; short 1–2 second videos are also accepted.
Required array length: 1 element
Example:
image_urls
string<uri>[]

Optional reference image array, up to 10 images. It may be used with the input video to constrain subjects, style, or elements.

Input requirements:

  • HTTP/HTTPS image URLs only
  • Supported formats: png, jpeg, webp

Billing: Every reference image contributes input tokens.

Required array length: 1 - 10 elements
Example:
quality
enum<string>
default:auto

Output video resolution; default auto.

  • 360p: short edge 360.
  • 720p: short edge 720.
  • 1080p: short edge 1080.
  • 4k: short edge 2160.
  • auto: follows the input resolution; this is the default.

Choosing an explicit value can raise or lower output resolution.

Billing: Output video tokens increase with output resolution. Input video also contributes tokens; higher resolution costs more.

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

"auto"

duration
enum<string>
default:auto

Only auto is accepted and it is the default. Output duration follows the input video.

Available options:
auto
Example:

"auto"

aspect_ratio
enum<string>
default:auto

Only auto is accepted and it is the default. Output aspect ratio follows the input video.

Available options:
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-video-edit"

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