> ## Documentation Index
> Fetch the complete documentation index at: https://docs.jimmyai.cn/llms.txt
> Use this file to discover all available pages before exploring further.

# 创建 Gemini Omni 视频

> 创建 Gemini Omni 视频生成任务。任务创建后，请使用通用视频任务查询接口获取生成状态和结果。

<Note>
  创建成功后会返回 `task_id`。请使用 [查询视频任务](/zh/api-reference/common/query) 接口轮询任务状态，任务完成后从 `result.video_url` 获取视频地址。
</Note>

## 支持的模型

| model          | 说明                                          |
| -------------- | ------------------------------------------- |
| `Gemini-Omini` | 标准 Gemini Omni，支持 4/6/8/10 秒与 720p/1080p/4k |
| `omni-10s`     | 固定 10 秒、720p，支持最多 7 张参考图（图片或视频 URL）         |

`Omni-Flash-Ext`、`gemini-omni` 等别名会归一化为 `Gemini-Omini`。

## 参考视频与生成模式

标准版 `Gemini-Omini` 支持以下高级参数以实现视频参考和不同的使用模式：

* `generation_type` (string)：生成类型，可选 `frame`（首帧模式，`image_urls` 只能传 1 张图片作为视频首帧）或 `reference`（参考模式，`image_urls` 可以传 1 张或 3 张图片作为参考图）。默认为 `reference`。
* `video_urls` (array)：参考视频 URL 列表（目前最多支持 1 个视频）。**注意：上传参考视频（使用 `video_urls`）时不需要传入 `duration`，且 `duration` 与 `video_urls` 不可以同时传入。**

## omni-10s 示例

```bash theme={null}
curl -X POST 'https://www.jimmyai.cn/api/open-api/v1/gemini/omni/videos' \
  -H 'Authorization: Bearer sk_xxx' \
  -H 'Content-Type: application/json' \
  -d '{
    "model": "omni-10s",
    "prompt": "参考素材中的角色在赛博朋克街头奔跑，电影感跟拍",
    "aspect_ratio": "16:9",
    "image_urls": ["https://example.com/ref1.jpg"]
  }'
```

`omni-10s` 会忽略请求中的 `duration` 与 `resolution`，统一按 10 秒、720p 计费（模型名 `omni-10s`）。


## OpenAPI

````yaml POST /api/open-api/v1/gemini/omni/videos
openapi: 3.1.0
info:
  title: Jimmy AI OpenAPI
  description: API for Jimmy AI video generation services
  version: 1.0.0
servers:
  - url: https://www.jimmyai.cn
    description: Production server
security:
  - bearerAuth: []
paths:
  /api/open-api/v1/gemini/omni/videos:
    post:
      summary: Create Gemini Omni Video Task
      description: >-
        Create a Gemini Omni video generation task. After the task is created,
        use the common video task query endpoint to retrieve status and results.
      operationId: createGeminiOmniVideo
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/GeminiOmniGenerationRequest'
      responses:
        '200':
          description: Task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResponse'
components:
  schemas:
    GeminiOmniGenerationRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          enum:
            - Gemini-Omini
            - Omni-Flash-Ext
            - gemini-omni
            - omni-10s
          description: >-
            Model name. Gemini-Omini, Omni-Flash-Ext, and gemini-omni normalize
            to Gemini-Omini; omni-10s is a fixed 10s model (720p, up to 7
            reference images).
        prompt:
          type: string
          description: Text prompt for video generation
        duration:
          type: integer
          default: 6
          description: >-
            Video duration in seconds. Default: 6. Only supports: 4, 6, 8, 10.
            Note: duration is not required when uploading a reference video, and
            duration and video_urls cannot be passed at the same time.
        resolution:
          type: string
          default: 720p
          enum:
            - 720p
            - 1080p
            - 4k
          description: Video resolution. Defaults to 720p.
        aspect_ratio:
          type: string
          description: >-
            Video aspect ratio, for example 16:9 or 9:16. Takes precedence over
            orientation.
        orientation:
          type: string
          enum:
            - landscape
            - portrait
          description: >-
            Video orientation. Used only when aspect_ratio is empty: landscape
            maps to 16:9, portrait maps to 9:16.
        image_urls:
          type: array
          items:
            type: string
          description: Reference image URL list. omni-10s supports up to 7 images.
        images:
          type: array
          items:
            type: string
          description: >-
            Compatibility field for common OpenAPI image inputs; used when
            image_urls is empty. omni-10s supports up to 7 images.
        generation_type:
          type: string
          default: reference
          enum:
            - frame
            - reference
          description: >-
            Generation type. frame: first frame mode (image_urls can only accept
            1 image as the first frame of the video); reference: reference mode
            (image_urls can accept 1 or 3 images as style/subject reference).
            Defaults to reference.
        video_urls:
          type: array
          items:
            type: string
          description: >-
            Reference video URL list (currently supports up to 1 video). Note:
            duration is not required when uploading a reference video, and
            duration and video_urls cannot be passed at the same time.
      example:
        model: Gemini-Omini
        prompt: >-
          A cat running through a neon rainy street, cinematic low-angle
          tracking shot
        duration: 6
        resolution: 720p
        aspect_ratio: '16:9'
        generation_type: reference
        image_urls: []
        video_urls: []
    VideoGenerationResponse:
      type: object
      properties:
        code:
          type: string
          example: '20000'
        msg:
          type: string
          example: ok
        data:
          type: object
          properties:
            task_id:
              type: string
            status:
              type: string
            model:
              type: string
            created_at:
              type: integer
              format: int64
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````