> ## 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.

# 创建视频

> 创建 Veo 3.1 视频任务。

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

**用例：** 文生视频 · 首帧 · 首尾帧 · 参考图（仅普通版）。

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



## OpenAPI

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

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

    **查询：** `GET /v1/videos/{task_id}` · 可选下载 `GET /v1/videos/{task_id}/content`

    模型： `veo-3.1-generate-preview`, `veo-3.1-fast-generate-preview`.

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

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

        **用例：** 文生视频 · 首帧 · 首尾帧 · 参考图（仅普通版）。

        鉴权：`Authorization: Bearer sk-...`
      operationId: veoCreateVideo
      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
                  example: veo-3.1-generate-preview
                prompt:
                  type: string
                seconds:
                  type: string
                  description: '`"4"` / `"6"` / `"8"`（默认 `"8"`）。'
                  example: '8'
                duration:
                  type: integer
                size:
                  type: string
                  description: 如 `1280x720`、`720x1280`。
                input_reference:
                  type: string
                  description: 首帧图。
                image:
                  type: string
                images:
                  type: array
                  items:
                    type: string
                metadata:
                  type: object
                  properties:
                    resolution:
                      type: string
                      example: 1080p
                    aspectRatio:
                      type: string
                      example: '16:9'
                    aspect_ratio:
                      type: string
                    last_frame:
                      type: string
                    last_frame_url:
                      type: string
                    mode:
                      type: string
                      description: 传 `reference` 启用参考图模式。
                    negativePrompt:
                      type: string
                    negative_prompt:
                      type: string
            examples:
              文生视频:
                summary: 文生视频
                value:
                  model: veo-3.1-generate-preview
                  prompt: 一只橘猫在雨夜的霓虹城市中行走，电影感镜头，镜头平滑推进，真实环境音，画面细腻
                  seconds: '8'
                  size: 1280x720
                  metadata:
                    resolution: 1080p
                    aspectRatio: '16:9'
                    negativePrompt: blurry, watermark, distorted, low quality
              首帧图生:
                summary: 首帧图生
                value:
                  model: veo-3.1-generate-preview
                  prompt: 人物开始向前行走
                  seconds: '8'
                  input_reference: https://example.com/first.png
                  metadata:
                    resolution: 720p
                    aspectRatio: '16:9'
              首尾帧:
                summary: 首尾帧
                value:
                  model: veo-3.1-generate-preview
                  prompt: 在两帧之间平滑过渡
                  seconds: '8'
                  input_reference: https://example.com/first.png
                  metadata:
                    last_frame: https://example.com/last.png
                    resolution: 720p
                    aspectRatio: '16:9'
              参考图:
                summary: 参考图
                value:
                  model: veo-3.1-generate-preview
                  prompt: 保持参考图中的角色一致性
                  seconds: '8'
                  images:
                    - https://example.com/ref1.png
                    - https://example.com/ref2.png
                  metadata:
                    mode: reference
                    resolution: 720p
                    aspectRatio: '16:9'
      responses:
        '200':
          description: 任务已受理
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoTask'
              example:
                id: task_xxxxxxxx
                task_id: task_xxxxxxxx
                object: video
                model: veo-3.1-generate-preview
                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

````

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