# gemini-omni-flash-preview 视频生成

> 视频生成

提交视频生成请求。支持文生视频、图生视频、参考生视频和视频编辑四种任务类型。

**多轮对话**：支持多轮对话模式，可以将上一轮返回的 steps 数组加上本轮的新输入一起作为整个 input。
例如视频编辑时，input 包含上一轮返回的 steps 数组和一个新的 user_input 对象：
```json
{
  "type": "user_input",
  "content": [{
    "type": "text",
    "text": "把里面的猫变成黑白色"
  }]
}
```

**请求示例**

**1. 文生视频请求**

```bash
curl -X POST "https://api.modelverse.cn/v1beta/models/interactions" \
  -H "Authorization: Bearer $MODELVERSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-omni-flash-preview",
    "input": "介绍一下故宫的历史",
    "generation_config": {
      "video_config": {
        "task": "text_to_video"
      }
    },
    "response_format": {
      "type": "video",
      "aspect_ratio": "9:16"
    }
  }'
```

**2. 图生视频请求**

```bash
curl -X POST "https://api.modelverse.cn/v1beta/models/interactions" \
  -H "Authorization: Bearer $MODELVERSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-omni-flash-preview",
    "input": [
      {
        "type": "image",
        "data": "图片base64数据",
        "mime_type": "image/png"
      },
      {
        "type": "text",
        "text": "turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video"
      }
    ],
    "generation_config": {
      "video_config": {
        "task": "image_to_video"
      }
    },
    "response_format": {
      "type": "video",
      "aspect_ratio": "16:9"
    }
  }'
```

**3. 参考生视频请求**

```bash
curl -X POST "https://api.modelverse.cn/v1beta/models/interactions" \
  -H "Authorization: Bearer $MODELVERSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-omni-flash-preview",
    "input": [
      {
        "type": "image",
        "data": "图片1的base64数据",
        "mime_type": "image/png"
      },
      {
        "type": "image",
        "data": "图片2的base64数据",
        "mime_type": "image/png"
      },
      {
        "type": "text",
        "text": "A cat playfully batting at a ball of yarn."
      }
    ],
    "generation_config": {
      "video_config": {
        "task": "reference_to_video"
      }
    },
    "response_format": {
      "type": "video",
      "aspect_ratio": "16:9"
    }
  }'
```

**4. 视频编辑请求**

```bash
curl -X POST "https://api.modelverse.cn/v1beta/models/interactions" \
  -H "Authorization: Bearer $MODELVERSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-omni-flash-preview",
    "input": [
      {
        "type": "video",
        "data": "待编辑的mp4视频的base64数据",
        "mime_type": "video/mp4"
      },
      {
        "type": "text",
        "text": "把视频中的猫变成一只英国短毛猫"
      }
    ],
    "generation_config": {
      "video_config": {
        "task": "edit"
      }
    }
  }'
```

**5. 多轮对话视频编辑请求**

```bash
curl -X POST "https://api.modelverse.cn/v1beta/models/interactions" \
  -H "Authorization: Bearer $MODELVERSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-omni-flash-preview",
    "input": [
      {
        "signature": "signature",
        "summary": [
          {
            "text": "**Planning a Playful Video**\n\nI will create a 10-second vertical video...",
            "type": "text"
          }
        ],
        "type": "thought"
      },
      {
        "content": [
          {
            "mime_type": "video/mp4",
            "data": "视频mp4的base64数据",
            "type": "video"
          }
        ],
        "type": "model_output"
      },
      {
        "type": "user_input",
        "content": [
          {
            "type": "text",
            "text": "把里面的猫变成黑白色"
          }
        ]
      }
    ],
    "generation_config": {
      "video_config": {
        "task": "edit"
      }
    }
  }'
```

**6. 异步文生视频请求**

```bash
curl -X POST "https://api.modelverse.cn/v1beta/models/interactions" \
  -H "Authorization: Bearer $MODELVERSE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "gemini-omni-flash-preview",
    "input": "介绍一下故宫的历史",
    "generation_config": {
      "video_config": {
        "task": "text_to_video"
      }
    },
    "response_format": {
      "type": "video",
      "aspect_ratio": "9:16"
    },
    "background": true
  }'
```

**响应示例**

**1. 同步执行成功响应**

```json
{
  "id": "video-ea2b5872-12eb-452f-96d5-d6abf1ee25da",
  "status": "completed",
  "usage": {
    "total_tokens": 58295,
    "total_input_tokens": 19,
    "input_tokens_by_modality": [
      {
        "modality": "text",
        "tokens": 19
      }
    ],
    "total_output_tokens": 57920,
    "output_tokens_by_modality": [
      {
        "modality": "video",
        "tokens": 57920
      }
    ],
    "total_tool_use_tokens": 0,
    "total_thought_tokens": 356
  },
  "role": "model",
  "steps": [
    {
      "type": "user_input",
      "content": [
        {
          "text": "用一个视频来介绍一下故宫的历史",
          "type": "text"
        }
      ]
    },
    {
      "signature": "signature",
      "summary": [
        {
          "text": "**Creating a Forbidden City Video**\n\nI will build a vertical video depicting the Forbidden City's history...",
          "type": "text"
        }
      ],
      "type": "thought"
    },
    {
      "content": [
        {
          "mime_type": "video/mp4",
          "data": "视频mp4的base64数据",
          "type": "video"
        }
      ],
      "type": "model_output"
    }
  ],
  "object": "interaction",
  "model": "gemini-omni-flash-preview"
}
```

**2. 异步任务提交成功响应**

```json
{
  "id": "video-088fa9f5-81bd-419c-95bb-4ee03b28fc5d",
  "status": "in_progress"
}
```

异步任务提交后，可通过 `GET /v1beta/models/interactions/{id}` 查询任务状态。

## 请求地址

`POST https://api.modelverse.cn/v1beta/models/interactions`

## 请求体

## 响应

- **200** — 视频生成成功（同步）或任务提交成功（异步）。
- **400** — 请求参数无效。
- **default** — 错误响应。

## OpenAPI 定义

```json
{
  "openapi": "3.1.0",
  "x-language": "zh-CN",
  "info": {
    "title": "gemini-omni-flash-preview 接口文档",
    "version": "1.0.0",
    "description": "这是 ModelVerse 上 `gemini-omni-flash-preview` 的视频生成接口文档，支持文生视频、图生视频、参考生视频和视频编辑功能。\n接口路径为 `POST /v1beta/models/interactions`。\n"
  },
  "servers": [
    {
      "url": "https://api.modelverse.cn",
      "description": "该模型文档中使用的 ModelVerse API 端点。"
    }
  ],
  "tags": [
    {
      "name": "gemini-omni-flash-preview",
      "description": "gemini-omni-flash-preview 视频生成接口。"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/v1beta/models/interactions": {
      "post": {
        "tags": [
          "gemini-omni-flash-preview"
        ],
        "operationId": "generateVideo",
        "summary": "gemini-omni-flash-preview 视频生成",
        "description": "提交视频生成请求。支持文生视频、图生视频、参考生视频和视频编辑四种任务类型。\n\n**多轮对话**：支持多轮对话模式，可以将上一轮返回的 steps 数组加上本轮的新输入一起作为整个 input。\n例如视频编辑时，input 包含上一轮返回的 steps 数组和一个新的 user_input 对象：\n```json\n{\n  \"type\": \"user_input\",\n  \"content\": [{\n    \"type\": \"text\",\n    \"text\": \"把里面的猫变成黑白色\"\n  }]\n}\n```\n\n**请求示例**\n\n**1. 文生视频请求**\n\n```bash\ncurl -X POST \"https://api.modelverse.cn/v1beta/models/interactions\" \\\n  -H \"Authorization: Bearer $MODELVERSE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-omni-flash-preview\",\n    \"input\": \"介绍一下故宫的历史\",\n    \"generation_config\": {\n      \"video_config\": {\n        \"task\": \"text_to_video\"\n      }\n    },\n    \"response_format\": {\n      \"type\": \"video\",\n      \"aspect_ratio\": \"9:16\"\n    }\n  }'\n```\n\n**2. 图生视频请求**\n\n```bash\ncurl -X POST \"https://api.modelverse.cn/v1beta/models/interactions\" \\\n  -H \"Authorization: Bearer $MODELVERSE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-omni-flash-preview\",\n    \"input\": [\n      {\n        \"type\": \"image\",\n        \"data\": \"图片base64数据\",\n        \"mime_type\": \"image/png\"\n      },\n      {\n        \"type\": \"text\",\n        \"text\": \"turn this into realistic footage, using the drawing only as a guide for movement, do not show the drawing in the final video\"\n      }\n    ],\n    \"generation_config\": {\n      \"video_config\": {\n        \"task\": \"image_to_video\"\n      }\n    },\n    \"response_format\": {\n      \"type\": \"video\",\n      \"aspect_ratio\": \"16:9\"\n    }\n  }'\n```\n\n**3. 参考生视频请求**\n\n```bash\ncurl -X POST \"https://api.modelverse.cn/v1beta/models/interactions\" \\\n  -H \"Authorization: Bearer $MODELVERSE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-omni-flash-preview\",\n    \"input\": [\n      {\n        \"type\": \"image\",\n        \"data\": \"图片1的base64数据\",\n        \"mime_type\": \"image/png\"\n      },\n      {\n        \"type\": \"image\",\n        \"data\": \"图片2的base64数据\",\n        \"mime_type\": \"image/png\"\n      },\n      {\n        \"type\": \"text\",\n        \"text\": \"A cat playfully batting at a ball of yarn.\"\n      }\n    ],\n    \"generation_config\": {\n      \"video_config\": {\n        \"task\": \"reference_to_video\"\n      }\n    },\n    \"response_format\": {\n      \"type\": \"video\",\n      \"aspect_ratio\": \"16:9\"\n    }\n  }'\n```\n\n**4. 视频编辑请求**\n\n```bash\ncurl -X POST \"https://api.modelverse.cn/v1beta/models/interactions\" \\\n  -H \"Authorization: Bearer $MODELVERSE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-omni-flash-preview\",\n    \"input\": [\n      {\n        \"type\": \"video\",\n        \"data\": \"待编辑的mp4视频的base64数据\",\n        \"mime_type\": \"video/mp4\"\n      },\n      {\n        \"type\": \"text\",\n        \"text\": \"把视频中的猫变成一只英国短毛猫\"\n      }\n    ],\n    \"generation_config\": {\n      \"video_config\": {\n        \"task\": \"edit\"\n      }\n    }\n  }'\n```\n\n**5. 多轮对话视频编辑请求**\n\n```bash\ncurl -X POST \"https://api.modelverse.cn/v1beta/models/interactions\" \\\n  -H \"Authorization: Bearer $MODELVERSE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-omni-flash-preview\",\n    \"input\": [\n      {\n        \"signature\": \"signature\",\n        \"summary\": [\n          {\n            \"text\": \"**Planning a Playful Video**\\n\\nI will create a 10-second vertical video...\",\n            \"type\": \"text\"\n          }\n        ],\n        \"type\": \"thought\"\n      },\n      {\n        \"content\": [\n          {\n            \"mime_type\": \"video/mp4\",\n            \"data\": \"视频mp4的base64数据\",\n            \"type\": \"video\"\n          }\n        ],\n        \"type\": \"model_output\"\n      },\n      {\n        \"type\": \"user_input\",\n        \"content\": [\n          {\n            \"type\": \"text\",\n            \"text\": \"把里面的猫变成黑白色\"\n          }\n        ]\n      }\n    ],\n    \"generation_config\": {\n      \"video_config\": {\n        \"task\": \"edit\"\n      }\n    }\n  }'\n```\n\n**6. 异步文生视频请求**\n\n```bash\ncurl -X POST \"https://api.modelverse.cn/v1beta/models/interactions\" \\\n  -H \"Authorization: Bearer $MODELVERSE_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\n    \"model\": \"gemini-omni-flash-preview\",\n    \"input\": \"介绍一下故宫的历史\",\n    \"generation_config\": {\n      \"video_config\": {\n        \"task\": \"text_to_video\"\n      }\n    },\n    \"response_format\": {\n      \"type\": \"video\",\n      \"aspect_ratio\": \"9:16\"\n    },\n    \"background\": true\n  }'\n```\n\n**响应示例**\n\n**1. 同步执行成功响应**\n\n```json\n{\n  \"id\": \"video-ea2b5872-12eb-452f-96d5-d6abf1ee25da\",\n  \"status\": \"completed\",\n  \"usage\": {\n    \"total_tokens\": 58295,\n    \"total_input_tokens\": 19,\n    \"input_tokens_by_modality\": [\n      {\n        \"modality\": \"text\",\n        \"tokens\": 19\n      }\n    ],\n    \"total_output_tokens\": 57920,\n    \"output_tokens_by_modality\": [\n      {\n        \"modality\": \"video\",\n        \"tokens\": 57920\n      }\n    ],\n    \"total_tool_use_tokens\": 0,\n    \"total_thought_tokens\": 356\n  },\n  \"role\": \"model\",\n  \"steps\": [\n    {\n      \"type\": \"user_input\",\n      \"content\": [\n        {\n          \"text\": \"用一个视频来介绍一下故宫的历史\",\n          \"type\": \"text\"\n        }\n      ]\n    },\n    {\n      \"signature\": \"signature\",\n      \"summary\": [\n        {\n          \"text\": \"**Creating a Forbidden City Video**\\n\\nI will build a vertical video depicting the Forbidden City's history...\",\n          \"type\": \"text\"\n        }\n      ],\n      \"type\": \"thought\"\n    },\n    {\n      \"content\": [\n        {\n          \"mime_type\": \"video/mp4\",\n          \"data\": \"视频mp4的base64数据\",\n          \"type\": \"video\"\n        }\n      ],\n      \"type\": \"model_output\"\n    }\n  ],\n  \"object\": \"interaction\",\n  \"model\": \"gemini-omni-flash-preview\"\n}\n```\n\n**2. 异步任务提交成功响应**\n\n```json\n{\n  \"id\": \"video-088fa9f5-81bd-419c-95bb-4ee03b28fc5d\",\n  \"status\": \"in_progress\"\n}\n```\n\n异步任务提交后，可通过 `GET /v1beta/models/interactions/{id}` 查询任务状态。\n",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/VideoGenerateRequest"
              },
              "examples": {
                "textToVideo": {
                  "summary": "文生视频请求",
                  "value": {
                    "model": "gemini-omni-flash-preview",
                    "input": "介绍一下故宫的历史",
                    "generation_config": {
                      "video_config": {
                        "task": "text_to_video"
                      }
                    },
                    "response_format": {
                      "type": "video",
                      "aspect_ratio": "9:16"
                    }
                  }
                },
                "imageToVideo": {
                  "summary": "图生视频请求",
                  "value": {
                    "model": "gemini-omni-flash-preview",
                    "input": [
                      {
                        "type": "image",
                        "data": "图片base64数据",
                        "mime_type": "image/png"
                      },
                      {
                        "type": "text",
                        "text": "turn this into realistic footage"
                      }
                    ],
                    "generation_config": {
                      "video_config": {
                        "task": "image_to_video"
                      }
                    },
                    "response_format": {
                      "type": "video",
                      "aspect_ratio": "16:9"
                    }
                  }
                },
                "referenceToVideo": {
                  "summary": "参考生视频请求",
                  "value": {
                    "model": "gemini-omni-flash-preview",
                    "input": [
                      {
                        "type": "image",
                        "data": "图片1的base64数据",
                        "mime_type": "image/png"
                      },
                      {
                        "type": "image",
                        "data": "图片2的base64数据",
                        "mime_type": "image/png"
                      },
                      {
                        "type": "text",
                        "text": "A cat playfully batting at a ball of yarn."
                      }
                    ],
                    "generation_config": {
                      "video_config": {
                        "task": "reference_to_video"
                      }
                    },
                    "response_format": {
                      "type": "video",
                      "aspect_ratio": "16:9"
                    }
                  }
                },
                "videoEdit": {
                  "summary": "视频编辑请求",
                  "value": {
                    "model": "gemini-omni-flash-preview",
                    "input": [
                      {
                        "type": "video",
                        "data": "待编辑的mp4视频的base64数据",
                        "mime_type": "video/mp4"
                      },
                      {
                        "type": "text",
                        "text": "把视频中的猫变成一只英国短毛猫"
                      }
                    ],
                    "generation_config": {
                      "video_config": {
                        "task": "edit"
                      }
                    }
                  }
                },
                "multiTurnEdit": {
                  "summary": "多轮对话视频编辑请求",
                  "value": {
                    "model": "gemini-omni-flash-preview",
                    "input": [
                      {
                        "signature": "signature",
                        "summary": [
                          {
                            "text": "Planning a Playful Video",
                            "type": "text"
                          }
                        ],
                        "type": "thought"
                      },
                      {
                        "content": [
                          {
                            "mime_type": "video/mp4",
                            "data": "视频mp4的base64数据",
                            "type": "video"
                          }
                        ],
                        "type": "model_output"
                      },
                      {
                        "type": "user_input",
                        "content": [
                          {
                            "type": "text",
                            "text": "把里面的猫变成黑白色"
                          }
                        ]
                      }
                    ],
                    "generation_config": {
                      "video_config": {
                        "task": "edit"
                      }
                    }
                  }
                },
                "asyncTextToVideo": {
                  "summary": "异步文生视频请求",
                  "value": {
                    "model": "gemini-omni-flash-preview",
                    "input": "介绍一下故宫的历史",
                    "generation_config": {
                      "video_config": {
                        "task": "text_to_video"
                      }
                    },
                    "response_format": {
                      "type": "video",
                      "aspect_ratio": "9:16"
                    },
                    "background": true
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "视频生成成功（同步）或任务提交成功（异步）。",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "$ref": "#/components/schemas/VideoGenerateResponse"
                    },
                    {
                      "$ref": "#/components/schemas/AsyncTaskSubmittedResponse"
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "description": "请求参数无效。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          },
          "default": {
            "description": "错误响应。",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/ErrorResponse"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "bearerFormat": "API key",
        "description": "API Key 认证，在请求头中携带 `Authorization: Bearer {API_KEY}`。"
      }
    },
    "schemas": {
      "VideoGenerateRequest": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "model",
          "input",
          "generation_config"
        ],
        "properties": {
          "model": {
            "type": "string",
            "const": "gemini-omni-flash-preview",
            "description": "模型名称。固定为 `gemini-omni-flash-preview`。"
          },
          "input": {
            "oneOf": [
              {
                "type": "string",
                "description": "文生视频时的文本提示词。",
                "title": "string"
              },
              {
                "type": "array",
                "description": "图生视频、参考生视频或视频编辑时的多模态输入列表。",
                "items": {
                  "$ref": "#/components/schemas/InputPart"
                },
                "title": "array"
              }
            ]
          },
          "generation_config": {
            "$ref": "#/components/schemas/GenerationConfig"
          },
          "response_format": {
            "$ref": "#/components/schemas/ResponseFormat"
          },
          "background": {
            "type": "boolean",
            "default": false,
            "description": "是否异步执行。默认为 `false`（同步执行）。\n- `false`：同步执行，直接返回完整的生成结果\n- `true`：异步执行，返回任务 ID 和状态，后续通过 `GET /v1beta/models/interactions/{id}` 查询结果\n"
          }
        }
      },
      "InputPart": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "type"
        ],
        "properties": {
          "type": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "video"
            ],
            "description": "输入内容类型。支持的模态：\n- `text`: 文本（输入）\n- `image`: 图片（输入）\n- `video`: 视频（输入）\n"
          },
          "text": {
            "type": "string",
            "description": "当 type 为 text 时的文本内容。"
          },
          "data": {
            "type": "string",
            "description": "当 type 为 image 或 video 时的 base64 编码数据。\n\n**图片限制**：\n- 每个提示的图片数量上限：10 张\n- 每个文件大小上限：20 GiB\n- 支持的宽高比：16:9、9:16\n- 支持的分辨率：720p\n- 支持的 MIME 类型：image/png、image/jpeg、image/webp、image/heic、image/heif\n\n**视频限制**：\n- 视频时长上限（包含音频）：10 秒\n- 视频时长上限（不含音频）：10 秒\n- 每个提示的视频数量上限：3 个\n- 支持的 MIME 类型：video/x-flv、video/quicktime、video/mpeg、video/mpegs、video/mpg、video/mp4、video/webm、video/wmv、video/3gpp\n"
          },
          "mime_type": {
            "type": "string",
            "description": "当 type 为 image 或 video 时的 MIME 类型。",
            "examples": [
              "image/png",
              "image/jpeg",
              "video/mp4"
            ]
          }
        }
      },
      "GenerationConfig": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "video_config"
        ],
        "properties": {
          "video_config": {
            "$ref": "#/components/schemas/VideoConfig"
          }
        }
      },
      "VideoConfig": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "task"
        ],
        "properties": {
          "task": {
            "type": "string",
            "enum": [
              "text_to_video",
              "image_to_video",
              "reference_to_video",
              "edit"
            ],
            "description": "视频生成任务类型：\n- `text_to_video`: 文生视频\n- `image_to_video`: 图生视频\n- `reference_to_video`: 参考生视频\n- `edit`: 视频编辑（视频编辑任务不需要配置 response_format）\n"
          }
        }
      },
      "ResponseFormat": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "type": {
            "type": "string",
            "const": "video",
            "description": "响应类型。固定为 video。"
          },
          "aspect_ratio": {
            "type": "string",
            "enum": [
              "16:9",
              "9:16"
            ],
            "default": "16:9",
            "description": "生成视频的画幅比例，默认横向 (16:9)。"
          }
        }
      },
      "VideoGenerateResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "status",
          "role",
          "created",
          "updated",
          "object",
          "model"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "交互唯一标识符。"
          },
          "status": {
            "type": "string",
            "enum": [
              "completed",
              "failed",
              "processing"
            ],
            "description": "任务状态。"
          },
          "usage": {
            "$ref": "#/components/schemas/Usage"
          },
          "role": {
            "type": "string",
            "const": "model",
            "description": "角色。固定为 model。"
          },
          "created": {
            "type": "string",
            "format": "date-time",
            "description": "创建时间（ISO 8601 格式）。"
          },
          "updated": {
            "type": "string",
            "format": "date-time",
            "description": "更新时间（ISO 8601 格式）。"
          },
          "steps": {
            "type": "array",
            "description": "生成步骤列表。",
            "items": {
              "$ref": "#/components/schemas/Step"
            }
          },
          "object": {
            "type": "string",
            "const": "interaction",
            "description": "对象类型。固定为 interaction。"
          },
          "model": {
            "type": "string",
            "const": "gemini-omni-flash-preview",
            "description": "模型名称。"
          }
        }
      },
      "Usage": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "total_tokens": {
            "type": "integer",
            "description": "总 token 数。"
          },
          "total_input_tokens": {
            "type": "integer",
            "description": "输入 token 总数。"
          },
          "input_tokens_by_modality": {
            "type": "array",
            "description": "按模态分类的输入 token 数。",
            "items": {
              "$ref": "#/components/schemas/InputModalityTokens"
            }
          },
          "total_output_tokens": {
            "type": "integer",
            "description": "输出 token 总数。"
          },
          "output_tokens_by_modality": {
            "type": "array",
            "description": "按模态分类的输出 token 数。",
            "items": {
              "$ref": "#/components/schemas/OutputModalityTokens"
            }
          },
          "total_tool_use_tokens": {
            "type": "integer",
            "description": "工具使用 token 数。"
          },
          "total_thought_tokens": {
            "type": "integer",
            "description": "思考 token 数。"
          }
        }
      },
      "InputModalityTokens": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "modality": {
            "type": "string",
            "enum": [
              "text",
              "image",
              "video"
            ],
            "description": "输入模态类型。"
          },
          "tokens": {
            "type": "integer",
            "description": "token 数量。"
          }
        }
      },
      "OutputModalityTokens": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "modality": {
            "type": "string",
            "enum": [
              "text",
              "video"
            ],
            "description": "输出模态类型。"
          },
          "tokens": {
            "type": "integer",
            "description": "token 数量。"
          }
        }
      },
      "Step": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "signature": {
            "type": "string",
            "description": "签名。"
          },
          "summary": {
            "type": "array",
            "description": "摘要列表。",
            "items": {
              "$ref": "#/components/schemas/SummaryItem"
            }
          },
          "type": {
            "type": "string",
            "enum": [
              "thought",
              "model_output"
            ],
            "description": "步骤类型。"
          },
          "content": {
            "type": "array",
            "description": "输出内容列表（当 type 为 model_output 时）。",
            "items": {
              "$ref": "#/components/schemas/OutputContent"
            }
          }
        }
      },
      "SummaryItem": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "text": {
            "type": "string",
            "description": "摘要文本。"
          },
          "type": {
            "type": "string",
            "const": "text",
            "description": "内容类型。"
          }
        }
      },
      "OutputContent": {
        "type": "object",
        "additionalProperties": false,
        "properties": {
          "mime_type": {
            "type": "string",
            "description": "MIME 类型。",
            "examples": [
              "video/mp4"
            ]
          },
          "data": {
            "type": "string",
            "description": "base64 编码的视频数据。"
          },
          "type": {
            "type": "string",
            "enum": [
              "text",
              "video"
            ],
            "description": "输出内容类型。支持的模态：\n- `text`: 文本（输出）\n- `video`: 视频（输出）\n"
          }
        }
      },
      "ErrorResponse": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "$ref": "#/components/schemas/ErrorObject"
          }
        }
      },
      "AsyncTaskSubmittedResponse": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "id",
          "status"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "任务唯一标识符。"
          },
          "status": {
            "type": "string",
            "const": "in_progress",
            "description": "任务状态。固定为 in_progress。"
          }
        }
      },
      "ErrorObject": {
        "type": "object",
        "additionalProperties": true,
        "required": [
          "message",
          "type"
        ],
        "properties": {
          "message": {
            "type": "string",
            "description": "错误信息。"
          },
          "type": {
            "type": "string",
            "description": "错误类型。"
          },
          "code": {
            "type": "string",
            "description": "错误代码。"
          },
          "param": {
            "type": "string",
            "description": "相关请求参数。"
          }
        }
      }
    }
  }
}
```
