Skip to content

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.

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:

  1. Images (image_urls): Each image consumes 1 unit.
  2. Videos (video_list): Each video consumes 2 units.
    • Note: Maximum of 1 video per request.
  3. 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) ​

ParameterTypeRequiredDescription
modelstringYesThe 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。
callBackUrlstringNoThe 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。
inputobjectYesInput parameters for the multimodal video generation task.
  input.promptstringYesThe 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_urlsarray&lt;string&gt;NoAn 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_urlstringNoThe 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_urlstringNoThe 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_idsarray&lt;string&gt;NoAn 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_listarray&lt;object&gt;NoAn 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[].urlstringYesThe video URL. Each video file must not exceed 100MB, and the video duration must not exceed 30s.
    input.video_list[].startnumberYesThe start time, in seconds.
    input.video_list[].endsnumberYesThe 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_idsarray&lt;string&gt;NoAn 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.durationstringYesThe 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_ratiostringNoThe aspect ratio of the generated video. 16:9 is landscape, and 9:16 is portrait. Allowed values:16:9 / 9:16。 示例:16:9。
  input.resolutionstringNoThe resolution of the generated video. Valid values are 360p, 720p, 1080p, and 4k. Default:"720p"。 Allowed values:360p / 720p / 1080p / 4k。 示例:720p。
  input.seedintegerNoThe 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 ​

bash
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"
  }
}'
json
{
  "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 ​

参数类型必填说明
dataobject否—
  data.taskIdstring否Task ID, which can be used to query task status through the task detail endpoint. 示例:task_gemini_1765180586443。
json
{
  "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

参数类型必填说明
codeinteger是Unified callback code: 200 for success, 501 for failure. Allowed values:200 / 501。 示例:200。
msgstring是Unified callback message. Allowed values:Playground task completed successfully. / Playground task failed.。 示例:Playground task completed successfully.。
dataobject是—
  data.taskIdstring是The unique task identifier.
  data.modelstring是The model used for the task. Allowed values:google/gemini-omni-flash-1-1。 示例:google/gemini-omni-flash-1-1。
  data.statestring是Terminal task state. Allowed values:success / fail。 示例:success。
  data.paramstring是JSON string containing the submitted task parameters.
  data.resultJsonstring否JSON string containing resultUrls, firstFrameUrl, lastFrameUrl, or resultObject when successful. Present only when state is success.
  data.failCodestring否Failure code, a numeric string such as "400" or "500". Present only when state is fail.
  data.failMsgstring否Failure reason. Present only when state is fail.
  data.costTimeinteger否Processing time in seconds. Present on both success and failure callbacks.
  data.completeTimeinteger否Task completion timestamp.
  data.createTimeinteger否Task creation timestamp.
  data.updateTimeinteger否Use completeTime as the completion time; updateTime may equal createTime.
  data.creditsConsumednumber否Credits consumed by the task; 0 for failed tasks.

Task completed successfully

json
{
  "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

json
{
  "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
  }
}

ModelFold — one API for all the best AI models.