Gemini Omni 1.1 Flash
This page is generated from the upstream official OpenAPI documentation. Endpoints, parameters and examples match the official docs; brand and API domain are replaced with ModelFold.
Endpoint
POST /jobs/createTask
Full URL: https://ai.modelfold.online/v1/jobs/createTask
Authentication: every request must include the
Authorization: Bearer <API_KEY>header.
Create Task
Use this endpoint to create a new multimodal video generation task.
- Get Task Details — After submission, use the unified query endpoint to check task progress and retrieve results
TIP
For production use, we recommend providing the callBackUrl parameter so your service can receive completion notifications instead of polling for task status.
Related Resources
- Model Marketplace — Explore all available models and capabilities
- Common API — Check account credits and usage
Total Quota Overview: The system utilizes a quota-based system for content uploads. The total available capacity is 7 units. Different parameters consume different amounts of this quota. Please ensure the sum of all consumed units does not exceed 7.
Quota Consumption Rules:
- Images (
image_urls): Each image consumes 1 unit. - Videos (
video_list): Each video consumes 2 units.- Note: Maximum of 1 video per request.
- Character IDs (
character_ids): Each ID consumes 1 unit.- Note: Maximum of 3 character IDs per request.
Constraint Formula:(Number of Images) + (Number of Videos × 2) + (Number of Character IDs) ≤ 7
Example Scenarios:
- If 1 video (2 units) and 3 Character IDs (3 units) are uploaded, you can upload a maximum of 2 additional images.
- If no video or Character IDs are provided, you can upload up to 7 images.
Note — first-frame mode: when first_frame_url is set, image_urls, video_list, character_ids and audio_ids cannot be used.
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-1 model. Default:"google/gemini-omni-flash-1-1"。 Allowed values:google/gemini-omni-flash-1-1。 示例:google/gemini-omni-flash-1-1。 |
callBackUrl | string | No | The callback URL for task completion notifications. This parameter is optional. If provided, the system will send a POST request to this URL when the task is completed, regardless of whether it succeeds or fails. If not provided, no callback notification will be sent. 示例:https://your-domain.com/api/callback。 |
input | object | Yes | Input parameters for the multimodal video generation task. |
input.prompt | string | Yes | The video prompt, used to describe the visual content, style, cinematography, or character actions of the target video. 示例:Generate a short video of a futuristic city at night, with the camera slowly pushing forward as a character emerges from a neon-lit street.。 |
input.image_urls | array<string> | No | An array of image URLs. Multiple reference images can be uploaded to provide references for characters, scenes, styles, or storyboards. Image limitations: - Each file must not exceed 20MB- Use publicly accessible image URLs - Maximum of 7 images - Note: This field is mutually exclusive with the first-frame image ( first_frame_url) and cannot be provided at the same time. |
input.first_frame_url | string | No | The URL of the first-frame image. Used to specify the starting frame of the generated video. Note: This field is mutually exclusive with image_urls, audio_ids, video_list, and character_ids and cannot be provided at the same time. 示例:https://example.com/assets/first-frame.png。 |
input.last_frame_url | string | No | The URL of the last-frame image. Used to specify the ending frame of the generated video. Note: The last-frame image cannot be used alone and must be provided together with the first-frame image (first_frame_url). 示例:https://example.com/assets/last-frame.png。 |
input.audio_ids | array<string> | No | An array of audio IDs generated by the gemini-omni-audio interface. Used to provide narration, dialogue, background music, or sound references for the video. Up to 3 items. Note: This field is mutually exclusive with the first-frame image (first_frame_url) and cannot be provided at the same time. |
input.video_list | array<object> | No | An array of video clips. Each element describes a video asset that can be used for generation and its trimming time range. Video limitations: - Each file must not exceed 100MB- Video duration must not exceed 30s- ends should be greater than start- The difference between the end and start times must not exceed 10s- Maximum of 1 item, occupying two image slots - Note: This field is mutually exclusive with the first-frame image ( first_frame_url) and cannot be provided at the same time. |
input.video_list[].url | string | Yes | The video URL. Each video file must not exceed 100MB, and the video duration must not exceed 30s. |
input.video_list[].start | number | Yes | The start time, in seconds. |
input.video_list[].ends | number | Yes | The end time, in seconds. It should be greater than start. The difference between the end and start times must not exceed 10 seconds. |
input.character_ids | array<string> | No | An array of character IDs generated by the gemini-omni-character interface. Used to provide character appearance, identity, or person references for the video. Up to 3 character IDs. Each uses 1 image slot (2 if created with portrait + body images). Total slots (images + videos × 2 + character slots) ≤ 7. Note: This field is mutually exclusive with the first-frame image (first_frame_url) and cannot be provided at the same time. |
input.duration | string | Yes | The duration of the generated video, in seconds. Valid values are 4, 6, 8, and 10. This parameter only takes effect when there is no video input. If video input is used, the output duration is determined by the model, and the duration parameter will be ignored. Note: When video input is provided, the output duration is automatically determined by the model. In this case, the duration parameter will not take effect. Allowed values:4 / 6 / 8 / 10。 示例:8。 |
input.aspect_ratio | string | No | The aspect ratio of the generated video. 16:9 is landscape, and 9:16 is portrait. Allowed values:16:9 / 9:16。 示例:16:9。 |
input.resolution | string | No | The resolution of the generated video. Valid values are 360p, 720p, 1080p, and 4k. Default:"720p"。 Allowed values:360p / 720p / 1080p / 4k。 示例:720p。 |
input.seed | integer | No | The random seed. Valid range: [0, 2147483647]. If not specified, the system will automatically generate a seed. A fixed seed can improve result reproducibility, but because the model itself is stochastic, results may still vary. |
Request Example
curl -X POST "https://ai.modelfold.online/v1/jobs/createTask" \
-H "Authorization: Bearer $MODELFOLD_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"model": "google/gemini-omni-flash-1-1",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"prompt": "Create a futuristic night city short film with a slow push-in shot as the character walks out from a neon-lit street.",
"image_urls": [
"https://example.com/assets/scene-1.png",
"https://example.com/assets/scene-2.png"
],
"audio_ids": [
"audio_01hx8p0demo"
],
"video_list": [
{
"url": "https://example.com/assets/source-video.mp4",
"start": 0,
"ends": 10
}
],
"duration": "4"
}
}'{
"model": "google/gemini-omni-flash-1-1",
"callBackUrl": "https://your-domain.com/api/callback",
"input": {
"prompt": "Create a futuristic night city short film with a slow push-in shot as the character walks out from a neon-lit street.",
"image_urls": [
"https://example.com/assets/scene-1.png",
"https://example.com/assets/scene-2.png"
],
"audio_ids": [
"audio_01hx8p0demo"
],
"video_list": [
{
"url": "https://example.com/assets/source-video.mp4",
"start": 0,
"ends": 10
}
],
"duration": "4"
}
}Response
200 — Request successful
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
data | object | 否 | — |
data.taskId | string | 否 | Task ID, which can be used to query task status through the task detail endpoint. 示例:task_gemini_1765180586443。 |
{
"code": 200,
"msg": "success",
"data": {
"taskId": "task_gemini_1765180586443"
}
}Callback
videoTaskCompleted
Callback URL: {request.body#/callBackUrl} (the callBackUrl in the request body).
The system sends this callback when the google/gemini-omni-flash-1-1 task succeeds or fails.
Callback body parameters
| 参数 | 类型 | 必填 | 说明 |
|---|---|---|---|
code | integer | 是 | Unified callback code: 200 for success, 501 for failure. Allowed values:200 / 501。 示例:200。 |
msg | string | 是 | Unified callback message. Allowed values:Playground task completed successfully. / Playground task failed.。 示例:Playground task completed successfully.。 |
data | object | 是 | — |
data.taskId | string | 是 | The unique task identifier. |
data.model | string | 是 | The model used for the task. Allowed values:google/gemini-omni-flash-1-1。 示例:google/gemini-omni-flash-1-1。 |
data.state | string | 是 | Terminal task state. Allowed values:success / fail。 示例:success。 |
data.param | string | 是 | JSON string containing the submitted task parameters. |
data.resultJson | string | 否 | JSON string containing resultUrls, firstFrameUrl, lastFrameUrl, or resultObject when successful. Present only when state is success. |
data.failCode | string | 否 | Failure code, a numeric string such as "400" or "500". Present only when state is fail. |
data.failMsg | string | 否 | Failure reason. Present only when state is fail. |
data.costTime | integer | 否 | Processing time in seconds. Present on both success and failure callbacks. |
data.completeTime | integer | 否 | Task completion timestamp. |
data.createTime | integer | 否 | Task creation timestamp. |
data.updateTime | integer | 否 | Use completeTime as the completion time; updateTime may equal createTime. |
data.creditsConsumed | number | 否 | Credits consumed by the task; 0 for failed tasks. |
Task completed successfully
{
"code": 200,
"msg": "Playground task completed successfully.",
"data": {
"taskId": "task_example_video_webhook_001",
"model": "google/gemini-omni-flash-1-1",
"state": "success",
"param": "{\"input\":\"{\\\"prompt\\\":\\\"Create a futuristic night city short film with a slow push-in shot as the character walks out from a neon-lit street.\\\",\\\"image_urls\\\":[\\\"https://example.com/input-image.jpg\\\"],\\\"audio_ids\\\":[\\\"audio_01hx8p0demo\\\"],\\\"video_list\\\":[{\\\"url\\\":\\\"https://example.com/input-video.mp4\\\",\\\"start\\\":0,\\\"ends\\\":10}],\\\"duration\\\":\\\"4\\\"}\",\"callBackUrl\":\"https://example.com/callback\",\"model\":\"google/gemini-omni-flash-1-1\"}",
"resultJson": "{\"resultUrls\":[\"https://example.com/generated-video.mp4\"]}",
"costTime": 12,
"completeTime": 1234567890,
"createTime": 1234560000,
"updateTime": 1234567890,
"creditsConsumed": 1.23
}
}Task failed
{
"code": 501,
"msg": "Playground task failed.",
"data": {
"taskId": "task_example_video_webhook_001",
"model": "google/gemini-omni-flash-1-1",
"state": "fail",
"param": "{\"input\":\"{\\\"prompt\\\":\\\"Create a futuristic night city short film with a slow push-in shot as the character walks out from a neon-lit street.\\\",\\\"image_urls\\\":[\\\"https://example.com/input-image.jpg\\\"],\\\"audio_ids\\\":[\\\"audio_01hx8p0demo\\\"],\\\"video_list\\\":[{\\\"url\\\":\\\"https://example.com/input-video.mp4\\\",\\\"start\\\":0,\\\"ends\\\":10}],\\\"duration\\\":\\\"4\\\"}\",\"callBackUrl\":\"https://example.com/callback\",\"model\":\"google/gemini-omni-flash-1-1\"}",
"failCode": "400",
"failMsg": "<error detail>",
"costTime": 12,
"creditsConsumed": 0
}
}