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

# Hailuo-2.3 视频生成

> - Hailuo 2.3 (MiniMax-Hailuo-2.3) 支持 T2V（文生视频）和 I2V（图生视频）模式
- 模式自动检测：0张图片=T2V，1张图片=I2V
- SOTA指令跟随，高质量输出
- 支持15种镜头运动指令，如 `[Pan left]`、`[Push in]`、`[Static shot]`
- 异步处理模式，使用返回的任务ID [进行查询](/cn/api-manual/task-management/get-task-detail)
- 生成的视频链接有效期为24小时，请尽快保存



## OpenAPI

````yaml cn/api-manual/video-series/hailuo/hailuo-2-3-video-generate.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: Hailuo 2.3 接口
  description: 使用 MiniMax Hailuo 2.3 模型创建视频生成任务，支持文生视频(T2V)和图生视频(I2V)模式
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 生产环境
security:
  - bearerAuth: []
tags:
  - name: 视频生成
    description: AI视频生成相关接口
paths:
  /v1/videos/generations:
    post:
      tags:
        - 视频生成
      summary: Hailuo 2.3 接口
      description: >-
        - Hailuo 2.3 (MiniMax-Hailuo-2.3) 支持 T2V（文生视频）和 I2V（图生视频）模式

        - 模式自动检测：0张图片=T2V，1张图片=I2V

        - SOTA指令跟随，高质量输出

        - 支持15种镜头运动指令，如 `[Pan left]`、`[Push in]`、`[Static shot]`

        - 异步处理模式，使用返回的任务ID
        [进行查询](/cn/api-manual/task-management/get-task-detail)

        - 生成的视频链接有效期为24小时，请尽快保存
      operationId: createVideoGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerationRequest'
            examples:
              text_to_video:
                summary: 文生视频 (T2V)
                value:
                  model: MiniMax-Hailuo-2.3
                  prompt: A beautiful sunset over the ocean [Static shot]
      responses:
        '200':
          description: 视频生成任务创建成功
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResponse'
        '400':
          description: 请求参数错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: 未认证、Token无效或过期
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: 配额不足、需要充值
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: insufficient_quota
                  message: Insufficient quota. Please top up your account.
                  type: insufficient_quota
        '403':
          description: 无权限访问
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: model_access_denied
                  message: 'Token does not have access to model: MiniMax-Hailuo-2.3'
                  type: invalid_request_error
        '429':
          description: 请求频率超限
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: rate_limit_exceeded
                  message: Too many requests, please try again later
                  type: rate_limit_error
        '500':
          description: 服务器内部错误
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: internal_error
                  message: Internal server error
                  type: api_error
components:
  schemas:
    VideoGenerationRequest:
      type: object
      required:
        - model
        - prompt
      properties:
        model:
          type: string
          description: 视频生成模型名称
          default: MiniMax-Hailuo-2.3
          example: MiniMax-Hailuo-2.3
        prompt:
          type: string
          description: |-
            描述视频内容和镜头运动的提示词。T2V模式必填，I2V模式可选。限制2000字符

            **支持15种镜头指令：**
            - 横移：`[Truck left]`、`[Truck right]`
            - 摇摄：`[Pan left]`、`[Pan right]`
            - 推拉：`[Push in]`、`[Pull out]`
            - 升降：`[Pedestal up]`、`[Pedestal down]`
            - 俯仰：`[Tilt up]`、`[Tilt down]`
            - 变焦：`[Zoom in]`、`[Zoom out]`
            - 特殊：`[Shake]`
            - 跟随：`[Tracking shot]`
            - 静态：`[Static shot]`

            **使用规则：**
            - 组合运动：多个指令放在同一个 `[]` 中同时生效，如 `[Pan left,Pedestal up]`，建议最多3个
            - 顺序运动：按文字顺序依次执行，如 `...slowly [Push in], then quickly [Pull out]`
          example: A beautiful sunset over the ocean [Static shot]
          maxLength: 2000
        image_urls:
          type: array
          description: |-
            I2V模式的参考图像URL，可选

            **模式检测：**
            - 0张图片 = T2V（文生视频）
            - 1张图片 = I2V（图生视频）

            **要求：**
            - 图像大小：不超过20MB
            - 支持格式：JPG、JPEG、PNG、WebP
            - 宽高比：2:5 到 5:2
            - 短边 > 300px
          items:
            type: string
            format: uri
          maxItems: 1
          example:
            - https://example.com/image.jpg
        quality:
          type: string
          description: |-
            视频分辨率

            **各模式支持的分辨率：**
            - I2V模式：768p、1080p
            - T2V模式：768p、1080p

            **时长与分辨率组合：**
            - 768p：支持6秒、10秒
            - 1080p：仅支持6秒
          enum:
            - 768p
            - 1080p
          default: 768p
          example: 768p
        duration:
          type: integer
          description: |-
            视频时长（秒）
            - 6秒（默认）
            - 10秒（1080p不可用）
          enum:
            - 6
            - 10
          default: 6
          example: 10
        model_params:
          type: object
          description: 模型特定参数
          properties:
            prompt_optimizer:
              type: boolean
              description: 是否自动优化提示词。设为false可获得更精确的控制
              default: true
              example: true
            fast_pretreatment:
              type: boolean
              description: 启用快速预处理以减少优化时间
              default: false
              example: false
        callback_url:
          type: string
          description: |-
            任务完成后的HTTPS回调地址

            **回调时机：**
            - 任务完成（completed）、失败（failed）或取消（cancelled）时触发
            - 在计费确认完成后发送

            **安全限制：**
            - 仅支持HTTPS协议
            - 禁止回调到内网IP地址（127.0.0.1、10.x.x.x、172.16-31.x.x、192.168.x.x等）
            - URL长度不超过`2048`字符

            **回调机制：**
            - 超时时间：`10`秒
            - 失败后最多重试`3`次（会分别在失败的`1`秒/`2`秒/`4`秒后进行重试）
            - 回调响应体格式与任务查询接口返回的格式一致
            - 回调地址若返回2xx状态码视为成功，其他状态码会触发重试
          format: uri
          example: https://your-domain.com/webhooks/video-task-completed
    VideoGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: 任务创建时间戳
          example: 1757169743
        id:
          type: string
          description: 任务ID
          example: task-unified-1757169743-7cvnl5zw
        model:
          type: string
          description: 实际使用的模型名称
          example: MiniMax-Hailuo-2.3
        object:
          type: string
          enum:
            - video.generation.task
          description: 任务类型
        progress:
          type: integer
          description: 任务进度百分比 (0-100)
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: 任务状态
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: 错误代码标识符
            message:
              type: string
              description: 错误描述信息
            type:
              type: string
              description: 错误类型
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: |-
        ##所有接口均需要使用Bearer Token进行认证##

        **获取 API Key：**

        访问 [API Key 管理页面](https://evolink.ai/dashboard/keys) 获取您的 API Key

        **使用时在请求头中添加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````