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

# 创建视频

> 创建 Google Omni 视频任务。

**路径：** `POST https://api.omniall.ai/v1/videos`

**同一接口、不同用例：** 文生视频 · 参考图 · 首尾帧 · 视频参考（`omni-fast-v2v`）。

鉴权：`Authorization: Bearer sk-...`



## OpenAPI

````yaml zh-CN/openapi/google-omni-video.yaml POST /v1/videos
openapi: 3.1.0
info:
  title: Omniall AI — Google Omni视频
  version: 1.0.0
  description: >-
    通过 OpenAI Video 风格协议调用 Google Omni 视频。


    **创建：** `POST https://api.omniall.ai/v1/videos`


    **查询：** `GET /v1/videos/{task_id}`


    模型： `omni-fast` (text / image / first-last frame), `omni-fast-v2v` (video
    reference).


    鉴权：`Authorization: Bearer sk-...`
servers:
  - url: https://api.omniall.ai
security: []
paths:
  /v1/videos:
    post:
      tags:
        - Google Omni
      summary: 创建视频
      description: |-
        创建 Google Omni 视频任务。

        **路径：** `POST https://api.omniall.ai/v1/videos`

        **同一接口、不同用例：** 文生视频 · 参考图 · 首尾帧 · 视频参考（`omni-fast-v2v`）。

        鉴权：`Authorization: Bearer sk-...`
      operationId: googleOmniCreateVideo
      parameters:
        - name: Authorization
          in: header
          required: true
          schema:
            type: string
            example: Bearer sk-...
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              required:
                - model
                - prompt
              properties:
                model:
                  type: string
                  description: '`omni-fast` 或 `omni-fast-v2v`（视频参考）。'
                  example: omni-fast
                prompt:
                  type: string
                  description: 提示词（运动 / 镜头 / 主体）。
                first_image_url:
                  type: string
                  description: 首帧图 URL 或 base64；与 last_image_url 联用。
                last_image_url:
                  type: string
                  description: 尾帧图 URL 或 base64；必须同时提供 first_image_url。
                video:
                  type: string
                  description: 参考视频（MP4 URL 或 data URI）。别名：`video_url`、`input_video`。
                video_url:
                  type: string
                input_video:
                  type: string
                seconds:
                  type: string
                  description: 时长（秒），建议 4–30。示例 `"8"`。
                aspect_ratio:
                  type: string
                  description: 如 `16:9`、`9:16`。
                resolution:
                  type: string
                  description: 如 `720p`、`1080p`、`2k`、`4k`。
                images:
                  type: array
                  maxItems: 5
                  items:
                    type: string
                  description: 最多 5 张参考图（URL 或 base64）。
            examples:
              文生视频:
                summary: 文生视频
                value:
                  model: omni-fast
                  prompt: 金色时刻海浪轻拍沙滩，电影感，暖阳
                  seconds: '8'
                  aspect_ratio: '16:9'
                  resolution: 720p
              参考图生视频:
                summary: 参考图生视频
                value:
                  model: omni-fast
                  prompt: 保持角色外观，穿过霓虹小巷
                  images:
                    - https://example.com/character.jpg
                  seconds: '8'
                  aspect_ratio: '9:16'
                  resolution: 720p
              首尾帧生视频:
                summary: 首尾帧生视频
                value:
                  model: omni-fast
                  prompt: 同一风景从黎明到黄昏平滑过渡
                  first_image_url: https://example.com/first-frame.jpg
                  last_image_url: https://example.com/last-frame.jpg
                  seconds: '8'
                  aspect_ratio: '16:9'
                  resolution: 1080p
              视频参考（视频生视频）:
                summary: 视频参考（视频生视频）
                value:
                  model: omni-fast-v2v
                  prompt: 基于参考视频生成明显不同的新版本；保持主体，改变光影
                  video: https://example.com/source.mp4
                  seconds: '8'
                  aspect_ratio: '16:9'
                  resolution: 720p
      responses:
        '200':
          description: 任务已受理
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTask'
              example:
                id: task_xxxxxxxx
                task_id: task_xxxxxxxx
                object: video
                model: omni-fast
                status: queued
                progress: 0
                created_at: 1775025000
components:
  schemas:
    VideoTask:
      type: object
      properties:
        id:
          type: string
        task_id:
          type: string
        object:
          type: string
        model:
          type: string
        status:
          type: string
        progress:
          type: integer
        created_at:
          type: integer
        completed_at:
          type: integer
        video_url:
          type: string
        error:
          type: object

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.