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

# Hailuo 03

> 根据文本、关键帧或多模态参考生成 2K 视频

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

## 模型

* **hailuo-03** — Hailuo 03

## 功能

* **文生视频**：直接根据提示词生成视频。
* **图生视频**：通过 `image_urls` 提供一个起始帧和一个可选的结束帧。
* **参考生视频**：通过参考图片、视频和音频引导生成结果。
* **2K 输出**：当前输出分辨率固定为 `2K`。

## 输入模式

* 没有媒体输入时，请求使用文生视频模式。
* `image_urls` 会选择图生视频模式。它接受一个起始帧和一个可选的第二张结束帧。
* `reference_image_urls`、`reference_video_urls` 或 `reference_audio_urls` 中任意一个都会选择参考生视频模式。
* `image_urls` 不能与任何 `reference_*_urls` 字段同时使用。
* 参考图片、视频和音频可以在同一个参考生视频请求中组合使用。
* 参考音频不能作为唯一的参考输入。请至少包含一张参考图片或一段参考视频。

## 注意事项

* `prompt` 为必填，最多 2,000 个字符。
* `duration` 接受 `5` 到 `15` 秒的整数，默认为 `5`。
* `resolution` 当前只接受 `2K`。
* 文生视频支持 `21:9`、`16:9`、`4:3`、`1:1`、`3:4` 和 `9:16`。默认为 `16:9`。
* 参考生视频支持相同的固定宽高比，另加 `adaptive`。默认为 `adaptive`。
* 图生视频跟随第一张图片的宽高比，因此该模式不接受 `aspect_ratio`。
* `reference_image_urls` 最多接受 9 张图片。
* `reference_video_urls` 最多接受 3 个视频片段。每个片段应为 2–15 秒，总时长最多 15 秒。
* `reference_audio_urls` 最多接受 3 个音频片段。每个片段应为 2–15 秒，总时长最多 15 秒。
* 在提示词中按模态和顺序引用参考素材，例如 `Image 1`、`Video 1` 和 `Audio 1`。
* 所有媒体 URL 都必须可公开访问且可直接下载。


## OpenAPI

````yaml zh/api-manual/video-series/hailuo-03.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: PoYo AI - Hailuo 03 API
  description: 根据文本、关键帧或多模态参考生成 2K 视频
  version: 1.0.0
servers:
  - url: https://api.poyo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Hailuo 03
      summary: 提交 Hailuo 03 任务
      operationId: submitHailuo03Task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              text-to-video:
                summary: 文生视频
                value:
                  model: hailuo-03
                  input:
                    prompt: A cinematic aerial view of a coastal city at sunrise
                    duration: 5
                    resolution: 2K
                    aspect_ratio: '16:9'
              image-to-video:
                summary: 首尾帧
                value:
                  model: hailuo-03
                  input:
                    prompt: The camera glides forward as daylight turns into sunset
                    duration: 8
                    resolution: 2K
                    image_urls:
                      - https://storage.poyo.ai/examples/hailuo-03/start.jpg
                      - https://storage.poyo.ai/examples/hailuo-03/end.jpg
              reference-images:
                summary: 参考图像
                value:
                  model: hailuo-03
                  input:
                    prompt: Image 1 walks through the environment shown in Image 2
                    duration: 10
                    resolution: 2K
                    aspect_ratio: adaptive
                    reference_image_urls:
                      - https://storage.poyo.ai/examples/hailuo-03/subject.jpg
                      - https://storage.poyo.ai/examples/hailuo-03/style.jpg
              reference-video:
                summary: 参考视频
                value:
                  model: hailuo-03
                  input:
                    prompt: Use the motion from Video 1
                    duration: 5
                    resolution: 2K
                    reference_video_urls:
                      - https://storage.poyo.ai/examples/hailuo-03/motion.mp4
              multimodal-reference:
                summary: 图像、视频和音频组合参考
                value:
                  model: hailuo-03
                  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: 2K
                    aspect_ratio: '16:9'
                    reference_image_urls:
                      - https://storage.poyo.ai/examples/hailuo-03/character.jpg
                    reference_video_urls:
                      - https://storage.poyo.ai/examples/hailuo-03/motion.mp4
                    reference_audio_urls:
                      - >-
                        https://storage.poyo.ai/examples/hailuo-03/atmosphere.mp3
      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:
            - hailuo-03
          example: hailuo-03
        callback_url:
          type: string
          format: uri
          description: 可选的 Webhook 回调 URL。
        input:
          $ref: '#/components/schemas/Hailuo03Input'
    SubmitResponse:
      type: object
      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
          properties:
            task_id:
              type: string
              example: 8FDN1I7M7Q68DDG8
    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
    Hailuo03Input:
      type: object
      required:
        - prompt
      properties:
        prompt:
          type: string
          minLength: 1
          maxLength: 2000
          description: 文本提示词。按模态和顺序引用素材，例如 Image 1、Video 1 或 Audio 1。
        duration:
          type: integer
          minimum: 5
          maximum: 15
          default: 5
          description: 生成视频的时长，单位为秒。
        resolution:
          type: string
          enum:
            - 2K
          default: 2K
        aspect_ratio:
          type: string
          enum:
            - adaptive
            - '21:9'
            - '16:9'
            - '4:3'
            - '1:1'
            - '3:4'
            - '9:16'
          description: 适用于文生视频和参考生视频。图生视频以第一张图像为准。
        image_urls:
          type: array
          minItems: 1
          maxItems: 2
          items:
            type: string
            format: uri
          description: 起始帧和可选的结束帧。不能与参考字段同时使用。
        reference_image_urls:
          type: array
          maxItems: 9
          items:
            type: string
            format: uri
          description: 主体或风格参考图像。
        reference_video_urls:
          type: array
          maxItems: 3
          items:
            type: string
            format: uri
          description: 参考视频片段。每个片段必须为 2–15 秒，合计时长不得超过 15 秒。
        reference_audio_urls:
          type: array
          maxItems: 3
          items:
            type: string
            format: uri
          description: 参考音频片段。每个片段必须为 2–15 秒。使用音频时至少需要一张参考图像或一个参考视频。
  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.