Gemini Omni 1.2 Flash
This reference documents the ModelFold gateway.
Endpoint
POST /videos/generations
Full URL: https://modelfold.ai/v1/videos/generations
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
Request Parameters
Body (application/json)
| Parameter | Type | Required | Description |
|---|---|---|---|
model | string | Yes | The model name used to generate the task. This field is required. This interface must use the google/gemini-omni-flash-1-2 model. Default:"google/gemini-omni-flash-1-2"。 Allowed values:google/gemini-omni-flash-1-2。 Example:google/gemini-omni-flash-1-2。 |
prompt | string | Yes | Prompt required by the ModelFold gateway; at most 20000 characters. Video prompt. Required and must be non-empty. Describe the scene, action, camera, and sound. minLength: 1. maxLength: 20000. Example:A cat plays piano in a jazz bar, one continuous shot, soft live jazz。 |
duration | integer | No | Duration of the generated video in seconds. Send an integer. - Text / reference images (no first frame, no video): required, 3–15 - First frame only: required, 3–15 - First and last frame: required, 3–10 - Video edit ( video_list set): do not send; output duration follows the input video ModelFold minimum: 3 seconds; -1 is not supported. minimum: 3. maximum: 15. Example:8。 |
aspect_ratio | string | No | Aspect ratio of the generated video. Allowed values: 16:9, 9:16, auto. Default 16:9. When no reference image is provided, auto is treated as 16:9. Default:"16:9"。 Allowed values:16:9 / 9:16 / auto。 Example:16:9。 |
resolution | string | No | Resolution of the generated video. Allowed values: 360p, 720p, 1080p, 4k. Default 720p. Default:"720p"。 Allowed values:360p / 720p / 1080p / 4k。 Example:720p。 |
seeds | integer | No | Random seed. Range: 10000–99999. Send a single integer. If omitted, the system generates one. minimum: 10000. maximum: 99999. Example:12345。 |
image_urls | array | No | Up to 6 publicly accessible reference image URLs, 20 MB each. They are style or content references, not first and last frames. Do not combine with first_frame_url or last_frame_url. Can be combined with video_list. |
first_frame_url | string | No | First-frame image URL. Sets the starting frame of the generated video. Use a publicly accessible image URL. - First frame only (no last frame): duration is required, integer 3–15- Together with last_frame_url: duration is required, integer 3–10- When this field is set, do not send image_urls or video_list- Do not send last_frame_url alone Example:https://example.com/first.png。 |
last_frame_url | string | No | Last-frame image URL. Sets the ending frame. Must be sent together with first_frame_url; cannot be used alone. duration is then required and must be 3–10. When first and last frames are set, do not send image_urls or video_list. Example:https://example.com/last.png。 |
video_list | array<string> | No | Video URL array, max 1. Sending this field selects video-edit mode. Do not send duration; output duration follows the input video. Can be combined with image_urls. Mutually exclusive with first_frame_url and last_frame_url. Use a publicly accessible video URL, MP4 recommended, no longer than 15 seconds. maxItems: 1. |
Request Example
bash
curl -X POST "https://modelfold.ai/v1/videos/generations" \
-H "Authorization: Bearer $MODELFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-omni-flash-1-2",
"prompt": "A cat plays piano in a jazz bar, one continuous shot, soft live jazz",
"aspect_ratio": "16:9",
"resolution": "360p",
"duration": 3
}'json
{
"model": "google/gemini-omni-flash-1-2",
"prompt": "A cat plays piano in a jazz bar, one continuous shot, soft live jazz",
"aspect_ratio": "16:9",
"resolution": "360p",
"duration": 3
}Response
json
{
"ok": true,
"created": 1792134000,
"data": [
{
"url": "https://modelfold.ai/uploads/outputs/result.mp4"
}
],
"usage": {}
}