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

# H3 Max

> 根据文本、关键帧或多模态参考创建视频

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

## 模型

* **h3-max** — H3 Max

## 输入模式

| 模式 | 输入 |
| - | - |
| 文生视频 | 只提供提示词，不提供媒体。 |
| 图生视频 | 提供 `image_urls`，包含起始帧，可选再加结束帧。 |
| 参考生视频 | 提供 `reference_image_urls`；可选再加参考视频和音频。 |

起始帧和结束帧不能与任何参考素材同时使用。参考视频和音频始终需要至少一张参考图片。空数组不会选择任何模式。

## 必填参数

* `prompt` 为必填，最多 50,000 个字符。

## 可选参数

* `duration` 为 5 到 15 秒的整数；默认为 5。
* `resolution` 为 `480p`、`768p` 或 `1080p`；默认为 `768p`。
* `enable_safety_checker` (boolean) 为 `true` 时启用安全检查。所有模式下默认为 `true`；设为 `false` 可关闭。
* `image_urls` 最多接受 2 张图片，按起始帧、结束帧顺序排列。
* `reference_image_urls` 最多接受 9 张图片。
* `reference_video_urls` 最多接受 3 个片段。每个片段必须为 2–15 秒，总时长不得超过 15 秒。
* `reference_audio_urls` 最多接受 3 个片段，同样每个 2–15 秒，总时长最多 15 秒。
* 参考图片、视频和音频合计最多 12 个文件。
* 文本模式支持 `21:9`、`16:9`、`4:3`、`1:1`、`3:4` 和 `9:16`，默认为 `16:9`。
* 参考模式支持相同的比例，另加 `adaptive`，且 `adaptive` 为其默认值。
* 图片模式跟随起始图片；不要传 `aspect_ratio`。

媒体 URL 必须是可公开访问的 HTTP(S) 下载链接。在提示词中按各列表顺序以 `Image 1`、`Video 1` 和 `Audio 1` 引用参考素材。

服务端会在提交前检查参考素材的元数据。如果无法可靠判断参考素材的用法，请求会被拒绝。

参考图片目前支持 `1:1`、`4:3`、`3:4`、`16:9`、`9:16`、`5:2` 和 `2:5` 形状。参考视频必须使用恒定 24 fps、方形像素、无旋转元数据，且形状为 `16:9` 或 `9:16`。将计入的帧数限制在请求的输出时长内后，帧数必须为 48、120、240 或 360。参考音频必须为 32 kHz，解码后的采样数能被 800 整除，且每个片段不得超过请求的输出时长。其他媒体格式或时长模式会被拒绝。

## 示例

```json Text to video theme={"dark"}
{
  "model": "h3-max",
  "input": {"prompt": "A cinematic aerial view of a coastal city at sunrise"}
}
```

```json Starting and ending frames theme={"dark"}
{
  "model": "h3-max",
  "input": {
    "prompt": "The camera glides forward as daylight turns into sunset",
    "duration": 8,
    "resolution": "1080p",
    "image_urls": ["https://example.com/start.jpg", "https://example.com/end.jpg"]
  }
}
```

```json Multimodal references theme={"dark"}
{
  "model": "h3-max",
  "callback_url": "https://your-domain.com/callback",
  "input": {
    "prompt": "Image 1 follows the movement in Video 1 with the atmosphere of Audio 1",
    "duration": 10,
    "resolution": "768p",
    "reference_image_urls": ["https://example.com/subject.jpg"],
    "reference_video_urls": ["https://example.com/motion.mp4"],
    "reference_audio_urls": ["https://example.com/atmosphere.wav"]
  }
}
```


## OpenAPI

````yaml zh/api-manual/video-series/h3-max.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - H3 Max API
  description: 根据文本、关键帧或以图像为主的多模态参考生成 5–15 秒的视频。
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - H3 Max
      summary: 提交 H3 Max 任务
      operationId: submitH3MaxTask
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              text-to-video:
                summary: 文生视频
                value:
                  model: h3-max
                  input:
                    prompt: A cinematic aerial view of a coastal city at sunrise
              image-to-video:
                summary: 图生视频
                value:
                  model: h3-max
                  input:
                    prompt: The camera moves forward as daylight turns into sunset
                    duration: 8
                    resolution: 1080p
                    image_urls:
                      - https://example.com/start.jpg
                      - https://example.com/end.jpg
              reference-to-video:
                summary: 参考生视频
                value:
                  model: h3-max
                  input:
                    prompt: >-
                      Image 1 follows the movement in Video 1 with the
                      atmosphere of Audio 1
                    duration: 10
                    resolution: 768p
                    aspect_ratio: adaptive
                    reference_image_urls:
                      - https://example.com/subject.jpg
                    reference_video_urls:
                      - https://example.com/motion.mp4
                    reference_audio_urls:
                      - https://example.com/atmosphere.wav
      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
          enum:
            - h3-max
          example: h3-max
        callback_url:
          type: string
          format: uri
          description: 可选的 Webhook 回调 URL。
        input:
          $ref: '#/components/schemas/H3MaxInput'
    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-1790245800-h3max01
            status:
              type: string
              example: not_started
              enum:
                - not_started
                - running
                - finished
                - failed
              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-09-24T10:30:00Z'
              description: 任务创建时间，ISO 8601 格式。
      example:
        code: 200
        data:
          task_id: task-unified-1790245800-h3max01
          status: not_started
          created_time: '2026-09-24T10:30:00Z'
    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
    H3MaxInput:
      type: object
      additionalProperties: false
      required:
        - prompt
      description: 参考素材总数最多 12 个。所有媒体 URL 必须使用 HTTP(S)。参考视频和参考音频都需要同时提供参考图像。媒体元数据由服务端计算。
      properties:
        prompt:
          type: string
          minLength: 1
          maxLength: 50000
          description: 描述视频内容。提示词不能只包含空白字符。以 Image 1、Video 1 或 Audio 1 引用素材。
        duration:
          type: integer
          minimum: 5
          maximum: 15
          default: 5
        resolution:
          type: string
          enum:
            - 480p
            - 768p
            - 1080p
          default: 768p
        enable_safety_checker:
          type: boolean
          default: true
          description: 设为 true 时启用安全检查器。默认为 true。
        aspect_ratio:
          type: string
          enum:
            - '21:9'
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
            - adaptive
          description: >-
            文本模式默认为 16:9，且不接受 adaptive。参考模式默认为 adaptive。与 image_urls
            同时提供时不接受此字段。
        image_urls:
          type: array
          maxItems: 2
          items:
            type: string
            format: uri
          description: 起始帧和可选的结束帧；与所有参考字段互斥。
        reference_image_urls:
          type: array
          maxItems: 9
          items:
            type: string
            format: uri
          description: 主体或风格图像；提供参考视频或音频时必填。支持的比例：1:1、4:3、3:4、16:9、9:16、5:2、2:5。
        reference_video_urls:
          type: array
          maxItems: 3
          items:
            type: string
            format: uri
          description: >-
            每个片段必须为 2–15 秒；视频合计时长不得超过 15 秒。要求恒定 24 fps、方形像素、无旋转元数据，且为 16:9 或
            9:16。按请求的输出时长截取帧后，计入的帧数必须为 48、120、240 或 360。
        reference_audio_urls:
          type: array
          maxItems: 3
          items:
            type: string
            format: uri
          description: >-
            每个片段必须为 2–15 秒；音频合计时长不得超过 15 秒。要求 32 kHz，且解码后的采样数能被 800
            整除。每个片段不得超过请求的输出时长。
      allOf:
        - not:
            required:
              - image_urls
            properties:
              image_urls:
                minItems: 1
            not:
              not:
                required:
                  - aspect_ratio
              properties:
                reference_image_urls:
                  maxItems: 0
                reference_video_urls:
                  maxItems: 0
                reference_audio_urls:
                  maxItems: 0
        - not:
            required:
              - aspect_ratio
            properties:
              aspect_ratio:
                enum:
                  - adaptive
              reference_image_urls:
                maxItems: 0
              reference_video_urls:
                maxItems: 0
              reference_audio_urls:
                maxItems: 0
        - not:
            required:
              - reference_video_urls
            properties:
              reference_video_urls:
                minItems: 1
            not:
              required:
                - reference_image_urls
              properties:
                reference_image_urls:
                  minItems: 1
        - not:
            required:
              - reference_audio_urls
            properties:
              reference_audio_urls:
                minItems: 1
            not:
              required:
                - reference_image_urls
              properties:
                reference_image_urls:
                  minItems: 1
  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.