curl --request POST \
--url https://api.goenhance.ai/api/v1/videos/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-omni-1-2-flash",
"prompt": "The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier",
"image_url": "https://your-cdn.com/harbor-dawn.jpg",
"image_end_url": "https://your-cdn.com/harbor-morning.jpg",
"duration": 8,
"resolution": "1080p",
"ratio": "16:9"
}
'import requests
url = "https://api.goenhance.ai/api/v1/videos/generations"
payload = {
"model": "gemini-omni-1-2-flash",
"prompt": "The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier",
"image_url": "https://your-cdn.com/harbor-dawn.jpg",
"image_end_url": "https://your-cdn.com/harbor-morning.jpg",
"duration": 8,
"resolution": "1080p",
"ratio": "16:9"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gemini-omni-1-2-flash',
prompt: 'The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier',
image_url: 'https://your-cdn.com/harbor-dawn.jpg',
image_end_url: 'https://your-cdn.com/harbor-morning.jpg',
duration: 8,
resolution: '1080p',
ratio: '16:9'
})
};
fetch('https://api.goenhance.ai/api/v1/videos/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goenhance.ai/api/v1/videos/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gemini-omni-1-2-flash',
'prompt' => 'The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier',
'image_url' => 'https://your-cdn.com/harbor-dawn.jpg',
'image_end_url' => 'https://your-cdn.com/harbor-morning.jpg',
'duration' => 8,
'resolution' => '1080p',
'ratio' => '16:9'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.goenhance.ai/api/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"gemini-omni-1-2-flash\",\n \"prompt\": \"The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier\",\n \"image_url\": \"https://your-cdn.com/harbor-dawn.jpg\",\n \"image_end_url\": \"https://your-cdn.com/harbor-morning.jpg\",\n \"duration\": 8,\n \"resolution\": \"1080p\",\n \"ratio\": \"16:9\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.goenhance.ai/api/v1/videos/generations")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gemini-omni-1-2-flash\",\n \"prompt\": \"The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier\",\n \"image_url\": \"https://your-cdn.com/harbor-dawn.jpg\",\n \"image_end_url\": \"https://your-cdn.com/harbor-morning.jpg\",\n \"duration\": 8,\n \"resolution\": \"1080p\",\n \"ratio\": \"16:9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goenhance.ai/api/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"gemini-omni-1-2-flash\",\n \"prompt\": \"The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier\",\n \"image_url\": \"https://your-cdn.com/harbor-dawn.jpg\",\n \"image_end_url\": \"https://your-cdn.com/harbor-morning.jpg\",\n \"duration\": 8,\n \"resolution\": \"1080p\",\n \"ratio\": \"16:9\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 5.82
}
}Gemini Omni 1.2 Flash
Gemini Omni 1.2 Flash, Google’s multimodal video model. Text-to-video, image-to-video from a first frame, first & last frame interpolation, and generation guided by up to 10 reference images. Clips run 3-15 seconds at 24fps.
Audio — every generated video comes with a native audio track (dialogue, music or sound effects, described in the prompt). It is always on: the model has no switch for it, so turning sound / generate_audio off is rejected.
Pricing — per second of generated video, in tokens (USD at $0.02/token). Text-to-video, image-to-video and reference images cost the same; frames and reference images are not charged:
| resolution | tokens/s | USD/s |
|---|---|---|
| 360p | 1.3 | $0.026 |
| 720p | 3.9 | $0.078 |
| 1080p | 5.876 | $0.11752 |
| 4k | 11.752 | $0.23504 |
Example: a 10-second video at 720p costs 39 tokens.
1080p and 4k are upscaled by the model.
Returns an img_uuid; poll GET /api/v1/jobs/detail (or use custom_callback_url) to get the generated video.
Not accepted by this model (rejected before any tokens are charged): turning audio off, negative_prompt (describe what to avoid in prompt), seed, middle keyframes, combining first / last frames with image_urls, and video input (editing or extending a video is not available yet).
curl --request POST \
--url https://api.goenhance.ai/api/v1/videos/generations \
--header 'Content-Type: application/json' \
--data '
{
"model": "gemini-omni-1-2-flash",
"prompt": "The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier",
"image_url": "https://your-cdn.com/harbor-dawn.jpg",
"image_end_url": "https://your-cdn.com/harbor-morning.jpg",
"duration": 8,
"resolution": "1080p",
"ratio": "16:9"
}
'import requests
url = "https://api.goenhance.ai/api/v1/videos/generations"
payload = {
"model": "gemini-omni-1-2-flash",
"prompt": "The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier",
"image_url": "https://your-cdn.com/harbor-dawn.jpg",
"image_end_url": "https://your-cdn.com/harbor-morning.jpg",
"duration": 8,
"resolution": "1080p",
"ratio": "16:9"
}
headers = {"Content-Type": "application/json"}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
model: 'gemini-omni-1-2-flash',
prompt: 'The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier',
image_url: 'https://your-cdn.com/harbor-dawn.jpg',
image_end_url: 'https://your-cdn.com/harbor-morning.jpg',
duration: 8,
resolution: '1080p',
ratio: '16:9'
})
};
fetch('https://api.goenhance.ai/api/v1/videos/generations', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.goenhance.ai/api/v1/videos/generations",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'model' => 'gemini-omni-1-2-flash',
'prompt' => 'The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier',
'image_url' => 'https://your-cdn.com/harbor-dawn.jpg',
'image_end_url' => 'https://your-cdn.com/harbor-morning.jpg',
'duration' => 8,
'resolution' => '1080p',
'ratio' => '16:9'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.goenhance.ai/api/v1/videos/generations"
payload := strings.NewReader("{\n \"model\": \"gemini-omni-1-2-flash\",\n \"prompt\": \"The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier\",\n \"image_url\": \"https://your-cdn.com/harbor-dawn.jpg\",\n \"image_end_url\": \"https://your-cdn.com/harbor-morning.jpg\",\n \"duration\": 8,\n \"resolution\": \"1080p\",\n \"ratio\": \"16:9\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.goenhance.ai/api/v1/videos/generations")
.header("Content-Type", "application/json")
.body("{\n \"model\": \"gemini-omni-1-2-flash\",\n \"prompt\": \"The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier\",\n \"image_url\": \"https://your-cdn.com/harbor-dawn.jpg\",\n \"image_end_url\": \"https://your-cdn.com/harbor-morning.jpg\",\n \"duration\": 8,\n \"resolution\": \"1080p\",\n \"ratio\": \"16:9\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.goenhance.ai/api/v1/videos/generations")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"model\": \"gemini-omni-1-2-flash\",\n \"prompt\": \"The sun rises over a quiet harbor, fishing boats drift out to sea, gulls call and waves lap against the pier\",\n \"image_url\": \"https://your-cdn.com/harbor-dawn.jpg\",\n \"image_end_url\": \"https://your-cdn.com/harbor-morning.jpg\",\n \"duration\": 8,\n \"resolution\": \"1080p\",\n \"ratio\": \"16:9\"\n}"
response = http.request(request)
puts response.read_body{
"code": 0,
"msg": "Success",
"data": {
"img_uuid": "c12b656c-747a-44fd-9c80-add79b0c52d5",
"cost": 5.82
}
}Headers
Body
Gemini Omni 1.2 Flash text-to-video, image-to-video (first frame, optional last frame) and reference-image video.
Pricing — per second of generated video:
- 360p — 1.3 tokens ($0.026)
- 720p — 3.9 tokens ($0.078)
- 1080p — 5.876 tokens ($0.11752)
- 4k — 11.752 tokens ($0.23504)
Model name. Must be gemini-omni-1-2-flash on this page.
gemini-omni-1-2-flash Text prompt describing the scene, motion, camera and sound. Required (also when images are provided), up to 3000 characters. With image_urls, describe how the references should be used.
3000Optional first-frame image URL. If provided, the video starts from this image. Cannot be combined with image_urls.
Optional last-frame image URL; the model interpolates from the first frame to this one. Requires image_url. With a last frame, duration can be at most 10.
Optional reference image URLs (1-10), e.g. characters, products or style. They guide the video but are not used as exact frames. Order is kept. Cannot be combined with image_url / image_end_url.
10Video duration in seconds, any integer from 3 to 15. At most 10 when image_end_url is provided.
3 <= x <= 15Output resolution. 1080p and 4k are upscaled; 2160p is accepted as 4k. quality is accepted as a compatible alias.
360p, 720p, 1080p, 4k Aspect ratio. aspect_ratio is accepted as a compatible alias.
16:9, 9:16 Optional. A publicly accessible HTTPS URL. When the task status changes (processing / success / failed), GoEnhance sends a POST request to this URL. The request body is identical to the response of GET /api/v1/jobs/detail. If your server does not respond with HTTP 200, the notification is retried up to 3 times, with a 3-second timeout per attempt.
"https://your-server.com/goenhance/callback"
