Skip to main content
POST
/
v1
/
videos
/
generations
curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini_omni_flash",
    "prompt": "A blue pump bottle slowly rotates in a clean white studio, commercial product video",
    "duration": 6,
    "aspect_ratio": "9:16",
    "resolution": "720P",
    "image_urls": ["https://example.com/reference.jpg"]
  }'
{
  "id": "video_01JZEXAMPLE",
  "object": "generation.task",
  "model": "gemini_omni_flash",
  "status": "queued",
  "created_at": 1779247407
}

Documentation Index

Fetch the complete documentation index at: https://docs.toapis.com/llms.txt

Use this file to discover all available pages before exploring further.

  • Use gemini_omni_flash in the model field
  • Supports text-to-video, single-image video generation, and 3-image reference fusion
  • Supports 4 / 6 / 10 second durations
  • Default resolution is 720P; 1080p is landscape 1080P and only supports 16:9
  • Async task API: submit a task, then query by task ID
Upload local images with the Upload Image API first, then pass the returned URLs in image_urls. Do not pass base64 image data directly.

Authorizations

Authorization
string
required
Use Bearer Token authentication:
Authorization: Bearer YOUR_API_KEY

Body

model
string
default:"gemini_omni_flash"
required
Model name. Use gemini_omni_flash.
prompt
string
required
Text prompt for video generation.
duration
integer
default:"6"
Video duration. Supported values: 4, 6, 10.
aspect_ratio
string
default:"16:9"
Video aspect ratio:
  • 16:9 landscape
  • 9:16 portrait
resolution
string
default:"720P"
Video resolution:
  • 720P default resolution
  • 1080p landscape 1080P, only supported with aspect_ratio: "16:9"
image_urls
string[]
Optional reference image URL array. Only these three cases are supported:
  • Omit the field or pass an empty array: text-to-video
  • 1 image: single-image video generation
  • 3 images: reference-image fusion
Passing 2 images is not supported.The backend normalizes image_urls into the upstream reference-image parameter.

Response

id
string
Task ID for status polling.
object
string
Object type, usually generation.task.
model
string
Model name used for the request.
status
string
Task status: queued, in_progress, completed, or failed.
created_at
integer
Task creation timestamp.
video_url
string
Generated video URL when the task completes.

Examples

curl --request POST \
  --url https://toapis.com/v1/videos/generations \
  --header 'Authorization: Bearer YOUR_API_KEY' \
  --header 'Content-Type: application/json' \
  --data '{
    "model": "gemini_omni_flash",
    "prompt": "A blue pump bottle slowly rotates in a clean white studio, commercial product video",
    "duration": 6,
    "aspect_ratio": "9:16",
    "resolution": "720P",
    "image_urls": ["https://example.com/reference.jpg"]
  }'
{
  "id": "video_01JZEXAMPLE",
  "object": "generation.task",
  "model": "gemini_omni_flash",
  "status": "queued",
  "created_at": 1779247407
}

Query Task

The generation endpoint returns a task ID. Use the common video task status endpoint to fetch status and results:
curl --request GET \
  --url https://toapis.com/v1/videos/generations/{task_id} \
  --header "Authorization: Bearer YOUR_API_KEY"