> ## 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-02 動画生成

> - Hailuo 02（MiniMax-Hailuo-02）はT2V（テキストから動画）、I2V（画像から動画）、FLF（最初と最後のフレーム）モードをサポート
- 自動モード検出: 画像0枚=T2V、画像1枚=I2V、画像2枚=FLF
- フル機能モデル、512P解像度をサポート（I2Vモードのみ）
- `[Pan left]`、`[Push in]`、`[Static shot]`など15種類のカメラモーションコマンドをサポート
- 非同期処理、返されたタスクIDを使用して[ステータスを照会](/ja/api-manual/task-management/get-task-detail)
- 生成された動画リンクは24時間有効です。速やかに保存してください



## OpenAPI

````yaml ja/api-manual/video-series/hailuo/hailuo-02-video-generate.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: Hailuo 02 API
  description: MiniMax Hailuo 02モデルを使用した動画生成タスクの作成、T2V、I2V、FLFモードをサポート
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: 本番環境
security:
  - bearerAuth: []
tags:
  - name: 動画生成
    description: AI動画生成API
paths:
  /v1/videos/generations:
    post:
      tags:
        - 動画生成
      summary: Hailuo 02 API
      description: >-
        - Hailuo
        02（MiniMax-Hailuo-02）はT2V（テキストから動画）、I2V（画像から動画）、FLF（最初と最後のフレーム）モードをサポート

        - 自動モード検出: 画像0枚=T2V、画像1枚=I2V、画像2枚=FLF

        - フル機能モデル、512P解像度をサポート（I2Vモードのみ）

        - `[Pan left]`、`[Push in]`、`[Static shot]`など15種類のカメラモーションコマンドをサポート

        -
        非同期処理、返されたタスクIDを使用して[ステータスを照会](/ja/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-02
                  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: 未認証、トークンが無効または期限切れです
          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-02'
                  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
      properties:
        model:
          type: string
          description: 動画生成モデル名
          default: MiniMax-Hailuo-02
          example: MiniMax-Hailuo-02
        prompt:
          type: string
          description: |-
            動画の内容とカメラモーションを説明するプロンプト。T2Vでは必須、I2V/FLFではオプション。最大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]`

            **使用方法:**
            - 組み合わせ: 1つの`[]`内に複数のコマンドを同時実行、例: `[Pan left,Pedestal up]`、最大3つ推奨
            - 順次: コマンドはテキスト順に実行、例: `...ゆっくり[Push in]、その後素早く[Pull out]`
          example: A young girl gradually grows into an adult woman
          maxLength: 2000
        image_urls:
          type: array
          description: |-
            I2VおよびFLFモード用の参照画像URL

            **モード検出:**
            - 画像0枚 = T2V（テキストから動画）
            - 画像1枚 = I2V（画像から動画）
            - 画像2枚 = FLF（最初と最後のフレーム遷移）

            **要件:**
            - 画像サイズ: 最大20MB
            - 形式: JPG, JPEG, PNG, WebP
            - アスペクト比: 2:5から5:2
            - 短辺 > 300px

            **FLF注意:** 動画の解像度は最初のフレームに従い、最後のフレームはそれに合わせてクロップされます
          items:
            type: string
            format: uri
          maxItems: 2
          example:
            - https://example.com/first.jpg
            - https://example.com/last.jpg
        quality:
          type: string
          description: |-
            動画解像度

            **モード別サポート:**
            - I2V: 512p, 768p, 1080p
            - T2V: 768p, 1080p
            - FLF: 768p, 1080p

            **長さと解像度:**
            - 512p: 6秒, 10秒
            - 768p: 6秒, 10秒
            - 1080p: 6秒のみ

            注意: 512pはI2Vモードでのみ利用可能
          enum:
            - 512p
            - 768p
            - 1080p
          default: 768p
          example: 768p
        duration:
          type: integer
          description: |-
            動画の長さ（秒）
            - 6秒（デフォルト）
            - 10秒（1080pでは利用不可）
          enum:
            - 6
            - 10
          default: 6
          example: 6
        model_params:
          type: object
          description: モデル固有のパラメータ
          properties:
            prompt_optimizer:
              type: boolean
              description: プロンプトの自動最適化。精密な制御にはfalseに設定
              default: true
              example: true
            fast_pretreatment:
              type: boolean
              description: 高速前処理を有効にして最適化時間を短縮
              default: false
              example: true
        callback_url:
          type: string
          description: |-
            タスク完了時のHTTPSコールバックURL

            **コールバックタイミング:**
            - タスクが完了、失敗、またはキャンセルされた時にトリガー
            - 課金確認後に送信

            **セキュリティ制限:**
            - 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`秒）
            - コールバックレスポンス形式はタスク照会APIと一致
            - 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-02
        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: |-
        ##すべてのAPIにBearer Token認証が必要です##

        **APIキーの取得：**

        [APIキー管理ページ](https://evolink.ai/dashboard/keys)にアクセスしてAPIキーを取得してください

        **リクエストヘッダーに追加：**
        ```
        Authorization: Bearer YOUR_API_KEY
        ```

````