Sunlit marine documentary shot off a calm turquoise rocky cove: a wild sea otter floats leisurely on its back amid gently swaying golden kelp ribbons, tapping a small clam shell against a flat stone on its chest while clear ripples scatter bright afternoon sunlight across its wet fur. Smooth floating camera at water level, natural fluid physics, crisp 1080p detail. Audio: gentle lapping coastal water and soft shell taps. No text, no logos, no watermarks.
Gemini Omni 1.2 Flash API
google/gemini-omni-1.2-flash/text-to-videoGemini Omni 1.2 Flash Text to Video turns text prompts into 3–15 second videos across 360p, 720p, 1080p, and 4K in 16:9 or 9:16. With the Gemini Omni 1.2 Flash API, teams scale from low-cost 360p previews to crisp 4K masters cleanly.
Examples
REST API
Quick Start
Complete your first Gemini Omni 1.2 Flash Text to Video request in three steps across 360p to 4K resolutions.
Connect to the Vidgo API
Create an API key on your server and pass it as a Bearer token.
- Endpoint
- POST
https://api.vidgo.ai/api/generate/submit - Authentication
- Authorization: Bearer VIDGO_API_KEY
Submit one video task
POST the model ID and mode inputs to /api/generate/submit.
curl --request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data '{
"model": "google/gemini-omni-1.2-flash/text-to-video",
"input": {
"prompt": "Sunlit marine documentary shot off a calm turquoise rocky cove: a wild sea otter floats leisurely on its back amid gently swaying golden kelp ribbons, tapping a small clam shell against a flat stone on its chest while clear ripples scatter bright afternoon sunlight across its wet fur. Smooth floating camera at water level, natural fluid physics, crisp 1080p detail. Audio: gentle lapping coastal water and soft shell taps. No text, no logos, no watermarks.",
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9"
}
}'Wait for the result
Poll status until finished or failed, then read data.files[].file_url.
Track status
GET https://api.vidgo.ai/api/generate/status/{task_id}Poll while not_started or running; read data.files[].file_url when finished.
not_startedrunningfinishedfailed{
"code": 200,
"data": {
"task_id": "WQP14VSIQH4BAZCP",
"status": "not_started",
"created_time": "2026-11-25T11:17:26"
}
}{
"code": 200,
"data": {
"task_id": "WQP14VSIQH4BAZCP",
"status": "finished",
"files": [
{
"file_type": "video",
"file_url": "https://cdn.vidgo.ai/apis/models/google/gemini-omni-1.2-flash/text-to-video/v1/01/output.mp4"
}
],
"created_time": "2026-11-25T11:17:26",
"error_message": null,
"progress": 100
}
}Complete runnable example
End-to-end script with submission, polling, terminal checks, and output extraction.
set -euo pipefail
: "${VIDGO_API_KEY:?Set VIDGO_API_KEY in your environment}"
REQUEST_BODY=$(cat <<'JSON'
{
"model": "google/gemini-omni-1.2-flash/text-to-video",
"input": {
"prompt": "Sunlit marine documentary shot off a calm turquoise rocky cove: a wild sea otter floats leisurely on its back amid gently swaying golden kelp ribbons, tapping a small clam shell against a flat stone on its chest while clear ripples scatter bright afternoon sunlight across its wet fur. Smooth floating camera at water level, natural fluid physics, crisp 1080p detail. Audio: gentle lapping coastal water and soft shell taps. No text, no logos, no watermarks.",
"duration": 5,
"resolution": "1080p",
"aspect_ratio": "16:9"
}
}
JSON
)
SUBMIT_RESPONSE=$(curl --silent --show-error --fail-with-body \
--request POST \
--url "https://api.vidgo.ai/api/generate/submit" \
--header "Authorization: Bearer $VIDGO_API_KEY" \
--header "Content-Type: application/json" \
--data "$REQUEST_BODY")
TASK_ID=$(printf '%s' "$SUBMIT_RESPONSE" | jq -r '.data.task_id // .task_id // empty')
if [ -z "$TASK_ID" ]; then
printf 'Submit response did not include task_id:
%s
' "$SUBMIT_RESPONSE" >&2
exit 1
fi
while true; do
STATUS_RESPONSE=$(curl --silent --show-error --fail-with-body \
--url "https://api.vidgo.ai/api/generate/status/$TASK_ID" \
--header "Authorization: Bearer $VIDGO_API_KEY")
STATUS=$(printf '%s' "$STATUS_RESPONSE" | jq -r '.data.status // .status // empty')
case "$STATUS" in
finished)
printf '%s' "$STATUS_RESPONSE" | jq -r '(.data.files // .files // [])[]?.file_url'
break
;;
failed)
printf '%s' "$STATUS_RESPONSE" | jq -r '.data.error_message // .error_message // "Generation failed"' >&2
exit 1
;;
not_started|running)
sleep 2
;;
*)
printf 'Unexpected task status: %s
' "$STATUS" >&2
exit 1
;;
esac
doneRequest Parameters
Place model and optional callback_url at the root, and mode fields inside input.
| Field | Type | Required | Default | Description |
|---|---|---|---|---|
| model | string | Yes | — | Fixed to google/gemini-omni-1.2-flash/text-to-video. |
| callback_url | string (URL) | No | — | Public HTTP(S) URL for terminal task callbacks. |
| input.prompt | string | Yes | — | Scene, camera, lighting, and audio prompt (1–20,000 characters). |
| input.duration | integer | No | 8 | Whole seconds from 3 to 15. |
| input.resolution | string | No | 720p | 360p, 720p, 1080p, or 4k. |
| input.aspect_ratio | string | No | 16:9 | 16:9 or 9:16. |
Response Fields
Submit returns task_id immediately; status returns generated video files or error_message.
| Field | Type | Description |
|---|---|---|
| code | integer | Business code; 0 or 200 indicates success. |
| data.task_id | string | Unique task ID for status polling. |
| data.status | string | not_started | running | finished | failed |
| data.progress | number | Completion percentage (0–100). |
| data.files[].file_url | string | Direct URL of the generated video. |
| data.files[].file_type | string | Output media type (video). |
| data.error_message | string | null | Failure detail when status is failed. |
Task Lifecycle
Poll only while not_started or running; stop on finished or failed.
not_startedAccepted and queued.
runningGeneration in progress; continue polling.
finishedComplete; read video URL from data.files[].file_url.
failedFailed; inspect error_message and stop polling.
Polling and Errors
- Authentication401 means the Bearer API key is missing or invalid.
- Validation400 means a parameter, duration (3–15 s; ≤10 s with last frame), or input video length (≤15 s) is invalid.
- Polling intervalPoll every 5–10 seconds, or configure callback_url.
Model Specifications
| Specification | Value | Description |
|---|---|---|
| Model | google/gemini-omni-1.2-flash/text-to-video | Public model identifier for asynchronous video generation. |
| Resolution | 360p | 720p | 1080p | 4k | Defaults to 720p. |
| Duration | 3–15 s | Defaults to 8 s. |
| Aspect ratio | 16:9 | 9:16 | Defaults to 16:9. |
| Per-second rate | 5.46 / 16.38 / 24.58 / 49.14 credits/s | For 360p / 720p / 1080p / 4k ($0.0273 / $0.0819 / $0.1229 / $0.2457 per second). |
Related Models
Gemini Omni 1.2 Flash API FAQ
What is the Gemini Omni 1.2 Flash API?
Gemini Omni 1.2 Flash Text to Video is a Google video generation model supporting 3–15 second clips from 360p to 4K. The Gemini Omni 1.2 Flash API turns prompts up to 20,000 characters into 16:9 or 9:16 videos with linear per-second pricing starting at 5.46 credits per second. Flexible resolution tiers let teams prototype rapidly at 360p and ship final masters at 1080p or 4K without switching pipelines. You can call it programmatically or try it from the playground above.
What durations does the Gemini Omni 1.2 Flash API support?
Any integer duration from 3 to 15 seconds, defaulting to 5 seconds.
Which resolutions are available in the Gemini Omni 1.2 Flash API?
Four options: 360p, 720p (default), 1080p, and 4k.
How much does the Gemini Omni 1.2 Flash API cost per second?
It costs 5.46 credits/s at 360p, 16.38 credits/s at 720p, 24.58 credits/s at 1080p, and 49.14 credits/s at 4K.
Which aspect ratios work in Gemini Omni 1.2 Flash Text to Video?
16:9 (default) for landscape video and 9:16 for vertical video.
How long can a prompt be in Gemini Omni 1.2 Flash Text to Video?
Up to 20,000 characters after trimming.
What changed between Gemini Omni 1.1 Flash and Gemini Omni 1.2 Flash?
Gemini Omni 1.2 Flash expands duration from fixed 4–10 s presets to any integer from 3–15 s, updates billing to linear per-second rates, and adds reference video inputs in Reference to Video mode.



