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

# Hailuo 02

> 使用 Hailuo 02 进行高级视频生成

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

使用 Hailuo 02 模型生成高质量视频。借助文生视频和图生视频能力创作专业内容。

## 模型

* **hailuo-02** - 标准视频生成（768P/512P，最长 10 秒）
* **hailuo-02-pro** - Pro 档视频生成。`resolution` 可选 `512P` 或 `768P`（默认 `768P`）；不支持 `duration`。下方专用的 `minimax/hailuo-02/pro/*` 工作流 ID 规则相同

## 功能

* **灵活模式**：文生视频和图生视频
* **多种分辨率**：512P 和 768P（Standard；Pro 工作流 ID 同样支持 512P 和 768P）
* **时长选项**：6 或 10 秒（仅 Standard）
* **提示词优化**：可选的 AI 提示词增强
* **尾帧控制**：为图生视频指定尾帧（可选）

## 工作流程 ID

现有 ID 仍可继续使用。新接入可以选择专用的工作流程：

* [minimax/hailuo-02/standard/text-to-video](https://docs.vidgo.ai/zh/api-manual/video-series/minimax-hailuo-02-standard-text-to-video.md)
* [minimax/hailuo-02/standard/image-to-video](https://docs.vidgo.ai/zh/api-manual/video-series/minimax-hailuo-02-standard-image-to-video.md)
* [minimax/hailuo-02/pro/text-to-video](https://docs.vidgo.ai/zh/api-manual/video-series/minimax-hailuo-02-pro-text-to-video.md)
* [minimax/hailuo-02/pro/image-to-video](https://docs.vidgo.ai/zh/api-manual/video-series/minimax-hailuo-02-pro-image-to-video.md)


## OpenAPI

````yaml zh/api-manual/video-series/hailuo-02.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Hailuo 02 API
  description: 使用 Hailuo 02 进行高级视频生成
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: 生产环境
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Hailuo 02
      summary: 提交 Hailuo 02 视频生成任务
      description: 使用 Hailuo 02 模型生成高质量视频
      operationId: submitHailuo02Task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              hailuo-02-text-to-video:
                summary: Hailuo 02 文生视频
                value:
                  model: hailuo-02
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      A llama and a raccoon battle in an intense table tennis
                      match inside a roaring Olympic stadium
                    duration: 6
                    prompt_optimizer: true
              hailuo-02-image-to-video:
                summary: Hailuo 02 图生视频
                value:
                  model: hailuo-02
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      Epic aerial shot: samurai stands atop mountain peak as
                      storm of sakura petals sweeps across wind
                    image_urls:
                      - https://cdn.vidgo.ai/temp/image.png
                    end_image_url: https://cdn.vidgo.ai/temp/end_image.png
                    duration: 10
                    resolution: 768P
                    prompt_optimizer: true
              hailuo-02-pro-text-to-video:
                summary: Hailuo 02 Pro 文生视频
                value:
                  model: hailuo-02-pro
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: >-
                      High angle tracking shot flying over prehistoric landscape
                      with young boy in Superman pose
                    prompt_optimizer: true
              hailuo-02-pro-image-to-video:
                summary: Hailuo 02 Pro 图生视频
                value:
                  model: hailuo-02-pro
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: The camera slowly pans across the landscape
                    image_urls:
                      - https://cdn.vidgo.ai/temp/image.png
                    end_image_url: https://cdn.vidgo.ai/temp/end_image.png
                    prompt_optimizer: true
      responses:
        '200':
          description: 任务提交成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
      properties:
        model:
          type: string
          example: hailuo-02
        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: 1500
              example: A cinematic video scene
            image_urls:
              type: array
              items:
                type: string
                format: uri
              maxItems: 1
              description: 图生视频的参考图 URL（图生视频必填）
              example: []
            end_image_url:
              type: string
              format: uri
              description: 可选，用作尾帧的图像 URL（仅限图生视频）
              example: https://cdn.vidgo.ai/temp/end_image.png
            duration:
              type: integer
              description: 视频时长（秒，仅 hailuo-02）
              enum:
                - 6
                - 10
              example: 6
            resolution:
              type: string
              description: >-
                输出分辨率。hailuo-02 图生视频和 hailuo-02-pro 支持（默认 768P）；hailuo-02
                文生视频固定为 768P
              enum:
                - 512P
                - 768P
              example: 768P
            prompt_optimizer:
              type: boolean
              description: 启用 AI 提示词优化
              example: true
    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 格式
  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.