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

# Veo 3.1

> 使用 Google VEO 3.1 快速生成高质量的 8 秒视频

> [!TIP]
>
> 1. 提交后会返回 `task_id`。如果提供了 `callback_url`，当任务状态变为 `finished` 或 `failed` 时，系统会向 `callback_url` 发送 POST 请求。
> 2. 无论是否提供 `callback_url`，都可以通过统一的[查询任务状态](https://docs.vidgo.ai/zh/api-manual/task-management/status.md)接口获取结果。

使用 Google VEO 3.1 模型快速生成或高质量生成 8 秒视频。支持文生视频和图生视频。

## 模型

* **veo3.1-fast** - 快速生成 8 秒视频
* **veo3.1-quality** - 高质量生成 8 秒视频

## 功能

* 异步处理，返回用于跟踪状态的 `task_id`
* 支持文生视频和图生视频
* 输出分辨率最高支持 4k
* 生成的视频 URL 有效期为 24 小时

## 时长选项

* **8 秒** - 所有生成均为固定时长

## 高级参数

### 生成类型

* `frame` - 首尾帧生成视频（两张图片）
* `reference` - 参考图生成视频（三张图片）
* 省略时根据 `image_urls` 数量推断：2 张图片为 `frame`，3 张图片为 `reference`

### 图片 URL

* 最多支持 3 张图片
* frame 模式：第一张图片为起始帧，第二张图片为结束帧
* 文件大小上限：10MB
* 支持格式：.jpeg、.jpg、.png、.webp

### 分辨率

* `720p`（默认）、`1080p` 或 `4k`


## OpenAPI

````yaml zh/api-manual/video-series/veo-3-1.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo - VEO 3.1 API
  description: 使用 Google VEO 3.1 快速生成高质量的 8 秒视频
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: 生产环境服务器
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - VEO 3.1
      summary: 提交 VEO 3.1 视频生成任务
      description: 使用 Google VEO 3.1 快速生成高质量的 8 秒视频
      operationId: submitVEO3Task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              veo3.1-fast:
                summary: VEO 3.1 Fast 视频生成
                value:
                  model: veo3.1-fast
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: Dolphins jumping in a bright blue ocean
                    duration: 8
                    aspect_ratio: '16:9'
              veo3.1-quality:
                summary: VEO 3.1 Quality 4k 生成
                value:
                  model: veo3.1-quality
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: A high-detail aerial view of a coastal city at dusk
                    duration: 8
                    aspect_ratio: '16:9'
                    resolution: 4k
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 400
                error:
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 未授权 - API Key 无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                code: 401
                error:
                  message: Unauthorized - Invalid API key
                  type: authentication_error
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
      properties:
        model:
          type: string
          example: veo3.1-fast
        callback_url:
          type: string
          format: uri
          description: 用于接收结果通知的 Webhook 回调 URL
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          description: 生成所需的输入参数
          properties:
            prompt:
              type: string
              description: 描述目标输出的生成提示词
              maxLength: 1000
              example: A cinematic video scene
            image_urls:
              type: array
              items:
                type: string
                format: uri
              maxItems: 3
              description: >-
                图生视频使用的参考图片 URL。支持公开的 http/https URL；最多 3 张图片；frame
                模式下第一张为起始帧，第二张为结束帧；单个文件最大 10MB；支持格式：.jpeg、.jpg、.png、.webp。
              example: []
            generation_type:
              type: string
              description: >-
                视频生成类型。`frame`（首尾帧生成视频，两张图片）或 `reference`（参考图生成视频，三张图片）。省略时根据
                `image_urls` 数量推断：2 张为 `frame`，3 张为 `reference`。
              enum:
                - frame
                - reference
              example: frame
            duration:
              type: integer
              description: 视频时长（秒），固定为 8。
              enum:
                - 8
              example: 8
            aspect_ratio:
              type: string
              description: 视频宽高比
              enum:
                - '16:9'
                - '9:16'
              example: '16:9'
            resolution:
              type: string
              description: 输出分辨率。`720p`（默认）、`1080p`（全高清）或 `4k`（超高清）。
              enum:
                - 720p
                - 1080p
                - 4k
              default: 720p
              example: 1080p
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          description: HTTP 状态码
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
              description: 用于跟踪状态的唯一任务标识
            status:
              type: string
              enum:
                - not_started
              example: not_started
              description: 任务初始状态
            created_time:
              type: string
              format: date-time
              example: '2025-11-12T10:30:00'
              description: 任务创建时间（ISO 8601 时间戳）
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
          description: HTTP 状态码
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
              description: 描述错误原因的错误信息
            type:
              type: string
              example: invalid_request_error
              description: 错误类型标识
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 接口都需要 Bearer Token 认证


        获取 API Key：


        进入 **仪表盘 → API 密钥**（[API Key
        管理页面](https://vidgo.ai/apis/dashboard/api-key)）获取你的 API Key


        在请求头中添加：


        ```

        Authorization: Bearer VIDGO_API_KEY

        ```

````

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