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

# VEO 3.1 Official

> VEO 3.1 Official API 可根据文本或图片生成 4、6 或 8 秒的视频，可选输出无声视频。quality 模型可输出 4K；三张参考图片时时长固定为 8 秒。

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

通过 PoYo 的官方模型系列生成 VEO 3.1 视频。根据所选模型，生成模型支持文生视频、图生视频、首尾帧视频，以及由 `generation_type` 驱动的三图生成。

## 模型

* **veo3.1-fast-official** - 快速官方生成，时长可选 4、6 或 8 秒
* **veo3.1-lite-official** - 轻量官方生成
* **veo3.1-quality-official** - 更高质量的官方生成，支持 4K

## 输入模式

### 生成模型

* 不传 `image_urls`：文生视频
* 一张图片：图生视频
* 两张图片：首尾帧视频；`veo3.1-lite-official` 仅在 8 秒时支持此模式
* 三张图片：`generation_type: "reference"`，时长固定为 8 秒
* `veo3.1-lite-official` 最多支持两张图片，不支持 `generation_type: "reference"`

## 必填参数

* **prompt**：必填的文本提示词

## 可选参数

* **image\_urls**：生成模型可选的图片 URL 数组
* **generation\_type**：可选，`frame` 或 `reference`；如果省略，PoYo 会根据 `image_urls` 推断模式；`veo3.1-lite-official` 传两张图片时仍需 `duration: 8`
* **duration**：生成模型支持 `4`、`6` 或 `8`；`generation_type: "reference"` 搭配三个 `image_urls` 时仅支持 `8`；`veo3.1-lite-official` 搭配两个 `image_urls` 时仅支持 `8`；`veo3.1-lite-official` 搭配 `resolution: "1080p"` 时仅支持 `8`
* **aspect\_ratio**：`16:9` 或 `9:16`；图生视频和首尾帧生成还支持 `auto`
* **resolution**：在支持的模型上可选 `720p`、`1080p` 或 `4k`；`veo3.1-lite-official` 不支持 `4k`
* **sound**：默认为 `true`；设为 `false` 输出无声视频


## OpenAPI

````yaml zh/api-manual/video-series/veo-3-1-official.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - VEO 3.1 Official API
  description: >-
    VEO 3.1 Official API 根据文本或图像生成 4、6 或 8 秒视频，可选无声输出。Quality 模型可输出
    4K；使用三张参考图时固定为 8 秒。
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - VEO 3.1 Official
      summary: 提交 VEO 3.1 Official 视频任务
      description: 提交 VEO 3.1 官方生成任务。根据所选模型，生成模型支持文本、图像、首尾帧以及由 generation_type 驱动的三图生成。
      operationId: submitVEO31OfficialTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              fast:
                summary: Fast 官方生成
                value:
                  model: veo3.1-fast-official
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A cinematic close-up of a paper boat drifting through a
                      neon-lit canal
                    duration: 6
                    aspect_ratio: '16:9'
                    resolution: 1080p
                    sound: true
              lite-image:
                summary: Lite 官方图生视频
                value:
                  model: veo3.1-lite-official
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: The product rotates slowly on a clean studio table
                    duration: 8
                    aspect_ratio: auto
                    resolution: 720p
                    sound: false
                    image_urls:
                      - https://example.com/product-start.jpg
              quality-reference:
                summary: Quality 官方 generation_type reference
                value:
                  model: veo3.1-quality-official
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A premium fashion campaign with consistent subject
                      appearance
                    duration: 8
                    aspect_ratio: '9:16'
                    resolution: 4k
                    sound: true
                    generation_type: reference
                    image_urls:
                      - https://example.com/reference-1.jpg
                      - https://example.com/reference-2.jpg
                      - https://example.com/reference-3.jpg
              lite-frame:
                summary: Lite 官方首尾帧生成
                value:
                  model: veo3.1-lite-official
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      The first frame shows a runner at the starting line, then
                      the video transitions naturally to the runner crossing the
                      finish line.
                    duration: 8
                    aspect_ratio: auto
                    resolution: 720p
                    sound: true
                    generation_type: frame
                    image_urls:
                      - https://example.com/first-frame.jpg
                      - https://example.com/last-frame.jpg
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
        '400':
          description: 请求参数无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
        '401':
          description: 未授权：API Key 无效
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
        - input
      properties:
        model:
          type: string
          description: VEO 3.1 官方模型标识符
          enum:
            - veo3.1-fast-official
            - veo3.1-lite-official
            - veo3.1-quality-official
        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: 描述期望输出的生成提示词
              example: A cinematic video scene
            image_urls:
              type: array
              items:
                type: string
                format: uri
              maxItems: 3
              description: |-
                生成模型使用的图像 URL。

                - 1 张图像：图生视频。

                - 2 张图像：首尾帧视频。`veo3.1-lite-official` 在此模式下仅支持时长 8。

                - 3 张图像：在受支持的模型上使用 `generation_type: "reference"`。此模式仅支持时长 8。

                - `veo3.1-lite-official` 最多支持 2 张图像。
              example: []
            generation_type:
              type: string
              description: >-
                图像引导生成的可选生成类型。


                - `frame`：需要恰好 2 个 `image_urls`。`veo3.1-lite-official` 的
                `duration` 必须为 8。


                - `reference`：需要恰好 3 个 `image_urls`，`veo3.1-lite-official` 不支持。


                省略时，PoYo 会根据 `image_urls` 数量推断模式；`veo3.1-lite-official`
                使用两张图像时仍需 `duration: 8`。
              enum:
                - frame
                - reference
              example: frame
            duration:
              type: integer
              description: >-
                生成时长，单位为秒。


                - 生成模型支持 4、6 或 8 秒。


                - `generation_type: "reference"` 搭配三个 `image_urls` 时仅支持 8 秒。


                - `veo3.1-lite-official` 搭配两个 `image_urls` 时仅支持 8 秒，即使省略
                `generation_type` 也是如此。


                - `veo3.1-lite-official` 搭配 `resolution: "1080p"` 时仅支持 8 秒。
              example: 8
            aspect_ratio:
              type: string
              description: 视频宽高比。图生视频和首尾帧生成支持 `auto`。
              enum:
                - auto
                - '16:9'
                - '9:16'
              example: '16:9'
            resolution:
              type: string
              description: 输出分辨率。受支持的生成模型可使用 4K。
              enum:
                - 720p
                - 1080p
                - 4k
              default: 720p
              example: 1080p
            sound:
              type: boolean
              description: 是否同时生成音频。默认为 `true`。
              default: true
              example: true
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
            status:
              type: string
              enum:
                - not_started
                - running
                - finished
                - failed
              example: not_started
              description: >-
                任务状态。提交后立即返回时始终为
                `not_started`。后续状态请通过[查询任务状态](/zh/api-manual/task-management/status)接口或
                `callback_url` 获取。


                - `not_started`：排队中，等待处理

                - `running`：生成中

                - `finished`：已完成，结果在 `files` 或 `output` 中

                - `failed`：失败，详情见 `error_message`
            created_time:
              type: string
              format: date-time
              example: '2026-05-18T10:30:00'
    ErrorResponse:
      type: object
      required:
        - code
        - error
      properties:
        code:
          type: integer
          example: 400
          enum:
            - 200
            - 400
            - 401
            - 402
            - 403
            - 404
            - 408
            - 429
            - 500
            - 502
            - 503
          description: >-
            业务状态码。`200` 表示成功，其他值都表示请求失败。请务必检查这个字段：部分参数校验错误会以 HTTP 200 返回，响应体里的
            `code` 为 `400`。


            - `200`：成功

            - `400`：请求参数无效

            - `401`：API Key 缺失或无效

            - `402`：积分不足

            - `403`：没有权限

            - `404`：资源不存在

            - `408`：请求超时

            - `429`：请求频率超限

            - `500`：服务器内部错误

            - `502`：上游服务错误

            - `503`：服务暂不可用


            详见[错误码](/zh/api-manual/error-codes)。
        error:
          type: object
          required:
            - message
            - type
          properties:
            message:
              type: string
              example: Invalid request parameters
            type:
              type: string
              example: invalid_request_error
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        所有 API 接口都需要 Bearer Token 认证。


        创建 API Key：登录 PoYo，进入 **仪表盘 → API
        密钥**（[poyo.ai/zh/dashboard/api-key](https://poyo.ai/zh/dashboard/api-key)），点击创建
        Key。


        在请求头中添加：


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````

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