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

# Omni Flash

> Omni Flash API 可根据文本、一张图片、恰好三张参考图片或一个输入视频，生成 4–10 秒、16:9 或 9:16、720p、1080p 或 4K 的视频。

> [!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)接口获取结果。

`omni-flash` 可根据文本提示词、可选的参考图片或可选的参考视频生成短视频。

## 模型

* **omni-flash** - 文生视频、图生视频、参考图片融合和视频输入生成

## 输入模式

* **文生视频**：只传 `prompt`，可选再加 `resolution`、`duration` 和 `aspect_ratio`
* **图生视频**：传 `prompt`，并在 `image_urls` 中传恰好一张图片
* **参考图片融合**：传 `prompt`，并在 `image_urls` 中传恰好三张图片
* **视频输入**：传 `prompt`，并在 `video_urls` 中传一个视频；不要传 `duration`

## 必填参数

* **prompt**：描述场景、运动、风格、镜头行为及其他生成指令的文本提示词

## 可选参数

* **image\_urls**：图片 URL 数组。允许的数量为 `0`、`1` 或 `3`
* **video\_urls**：视频 URL 数组。最多允许 `1` 个视频
* **resolution**：`720p`、`1080p` 或 `4k`。默认为 `720p`
* **duration**：`4`、`6`、`8` 或 `10` 秒。默认为 `6`。提供 `video_urls` 时不要传此字段
* **aspect\_ratio**：`16:9` 或 `9:16`。`16:9` 为横屏，`9:16` 为竖屏。默认为 `16:9`
* **callback\_url**：可选的 Webhook URL，用于接收完成通知

## 示例

### 文生视频

```json theme={"dark"}
{
  "model": "omni-flash",
  "callback_url": "https://your-domain.com/callback",
  "input": {
    "prompt": "A cinematic macro shot of a glass marble rolling across a wet reflective table, realistic physics, slow camera push-in",
    "resolution": "720p",
    "duration": 6,
    "aspect_ratio": "16:9"
  }
}
```

### 图生视频

```json theme={"dark"}
{
  "model": "omni-flash",
  "input": {
    "prompt": "Animate this product photo with a slow turntable motion, soft studio highlights, and subtle background parallax",
    "image_urls": ["https://example.com/source-image.webp"],
    "resolution": "720p",
    "duration": 6,
    "aspect_ratio": "16:9"
  }
}
```

### 三图参考融合

```json theme={"dark"}
{
  "model": "omni-flash",
  "input": {
    "prompt": "Combine the character, outfit, and set references into a single fashion campaign clip with gentle camera drift",
    "image_urls": [
      "https://example.com/character.webp",
      "https://example.com/outfit.webp",
      "https://example.com/set.webp"
    ],
    "resolution": "720p",
    "duration": 8,
    "aspect_ratio": "9:16"
  }
}
```

### 视频输入

```json theme={"dark"}
{
  "model": "omni-flash",
  "input": {
    "prompt": "Use the reference motion as the timing guide and transform the final look into a clean cinematic product reveal",
    "video_urls": ["https://example.com/reference-video.mp4"],
    "resolution": "720p",
    "aspect_ratio": "16:9"
  }
}
```

## 注意事项

* 使用公开的 HTTPS 图片和视频 URL，或在提交前通过 Playground 上传文件
* 不支持在 `image_urls` 中传两张图片
* `video_urls` 最多支持一个视频
* 提供 `video_urls` 时必须省略 `duration`
* 响应会返回 `task_id`；查询任务状态以获取生成的视频文件


## OpenAPI

````yaml zh/api-manual/video-series/omni-flash.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - Omni Flash API
  description: >-
    Omni Flash API 可根据文本、一张图像、恰好三张参考图像或一个输入视频，生成 4–10 秒、16:9 或 9:16、720p、1080p 或
    4K 的视频。
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Omni Flash
      summary: 提交 Omni Flash 任务
      description: 根据提示词、可选图像或可选参考视频生成视频
      operationId: submitOmniFlashTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              text-to-video:
                summary: 文生视频
                value:
                  model: omni-flash
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A cinematic macro shot of a glass marble rolling across a
                      wet reflective table, realistic physics, slow camera
                      push-in
                    resolution: 720p
                    duration: 6
                    aspect_ratio: '16:9'
              image-to-video:
                summary: 图生视频
                value:
                  model: omni-flash
                  input:
                    prompt: >-
                      Animate this product photo with a slow turntable motion,
                      soft studio highlights, and subtle background parallax
                    image_urls:
                      - https://example.com/source-image.webp
                    resolution: 720p
                    duration: 6
                    aspect_ratio: '16:9'
              reference-fusion:
                summary: 三图参考融合
                value:
                  model: omni-flash
                  input:
                    prompt: >-
                      Combine the character, outfit, and set references into a
                      single fashion campaign clip with gentle camera drift
                    image_urls:
                      - https://example.com/character.webp
                      - https://example.com/outfit.webp
                      - https://example.com/set.webp
                    resolution: 720p
                    duration: 8
                    aspect_ratio: '9:16'
              video-input:
                summary: 视频输入生成
                value:
                  model: omni-flash
                  input:
                    prompt: >-
                      Use the reference motion as the timing guide and transform
                      the final look into a clean cinematic product reveal
                    video_urls:
                      - https://example.com/reference-video.mp4
                    resolution: 720p
                    aspect_ratio: '16:9'
      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: Omni Flash 模型标识
          enum:
            - omni-flash
        callback_url:
          type: string
          format: uri
          description: 接收结果通知的 Webhook 回调 URL
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          properties:
            prompt:
              type: string
              description: 视频生成的文本提示词。最大长度为 20,000 个字符。
              maxLength: 20000
              example: >-
                A cinematic macro shot of a glass marble rolling across a wet
                reflective table
            image_urls:
              type: array
              description: 可选的源图像。允许的数量为 0、1 或 3。
              minItems: 0
              maxItems: 3
              items:
                type: string
                format: uri
              example:
                - https://example.com/source-image.webp
            video_urls:
              type: array
              description: 可选的源视频。最多支持一个视频。
              minItems: 0
              maxItems: 1
              items:
                type: string
                format: uri
              example:
                - https://example.com/reference-video.mp4
            resolution:
              type: string
              description: 生成视频的分辨率。可选值为 720p、1080p 和 4k。
              enum:
                - 720p
                - 1080p
                - 4k
              default: 720p
              example: 720p
            duration:
              type: integer
              description: 输出时长（秒）。提供 video_urls 时省略。
              enum:
                - 4
                - 6
                - 8
                - 10
              default: 6
              example: 6
            aspect_ratio:
              type: string
              description: 生成视频的宽高比。16:9 为横屏，9:16 为竖屏。
              enum:
                - '16:9'
                - '9:16'
              default: '16:9'
              example: '16:9'
    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)。
        message:
          type: string
          example: success
        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-06-03T10: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.