> ## 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 Video Generation

> - Hailuo 02 (MiniMax-Hailuo-02) supports T2V (Text-to-Video), I2V (Image-to-Video) and FLF (First-Last-Frame) modes
- Auto mode detection: 0 images=T2V, 1 image=I2V, 2 images=FLF
- Full-featured model, supports 512P resolution (I2V mode only)
- Supports 15 camera motion commands like `[Pan left]`, `[Push in]`, `[Static shot]`
- Async processing, use returned task ID to [query status](/en/api-manual/task-management/get-task-detail)
- Generated video links are valid for 24 hours, please save promptly



## OpenAPI

````yaml /en/api-manual/video-series/hailuo/hailuo-02-video-generate.json POST /v1/videos/generations
openapi: 3.1.0
info:
  title: Hailuo 02 API
  description: >-
    Create video generation tasks using MiniMax Hailuo 02 model, supporting T2V,
    I2V and FLF modes
  license:
    name: MIT
  version: 1.0.0
servers:
  - url: https://api.evolink.ai
    description: Production
security:
  - bearerAuth: []
tags:
  - name: Video Generation
    description: AI video generation APIs
paths:
  /v1/videos/generations:
    post:
      tags:
        - Video Generation
      summary: Hailuo 02 API
      description: >-
        - Hailuo 02 (MiniMax-Hailuo-02) supports T2V (Text-to-Video), I2V
        (Image-to-Video) and FLF (First-Last-Frame) modes

        - Auto mode detection: 0 images=T2V, 1 image=I2V, 2 images=FLF

        - Full-featured model, supports 512P resolution (I2V mode only)

        - Supports 15 camera motion commands like `[Pan left]`, `[Push in]`,
        `[Static shot]`

        - Async processing, use returned task ID to [query
        status](/en/api-manual/task-management/get-task-detail)

        - Generated video links are valid for 24 hours, please save promptly
      operationId: createVideoGeneration
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/VideoGenerationRequest'
            examples:
              text_to_video:
                summary: Text-to-Video (T2V)
                value:
                  model: MiniMax-Hailuo-02
                  prompt: A beautiful sunset over the ocean [Static shot]
      responses:
        '200':
          description: Video generation task created successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/VideoGenerationResponse'
        '400':
          description: Invalid request parameters
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: invalid_request
                  message: Invalid request parameters
                  type: invalid_request_error
        '401':
          description: Unauthenticated, invalid or expired token
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorResponse'
              example:
                error:
                  code: unauthorized
                  message: Invalid or expired token
                  type: authentication_error
        '402':
          description: Insufficient quota, recharge required
          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: Access denied
          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: Rate limit exceeded
          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: Internal server error
          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: Video generation model name
          default: MiniMax-Hailuo-02
          example: MiniMax-Hailuo-02
        prompt:
          type: string
          description: >-
            Prompt describing video content and camera motion. Required for T2V,
            optional for I2V/FLF. Max 2000 characters


            **15 Camera Commands:**

            - Truck: `[Truck left]`, `[Truck right]`

            - Pan: `[Pan left]`, `[Pan right]`

            - Dolly: `[Push in]`, `[Pull out]`

            - Pedestal: `[Pedestal up]`, `[Pedestal down]`

            - Tilt: `[Tilt up]`, `[Tilt down]`

            - Zoom: `[Zoom in]`, `[Zoom out]`

            - Special: `[Shake]`

            - Follow: `[Tracking shot]`

            - Static: `[Static shot]`


            **Usage:**

            - Combined: Multiple commands in one `[]` execute simultaneously,
            e.g. `[Pan left,Pedestal up]`, max 3 recommended

            - Sequential: Commands execute in text order, e.g. `...slowly [Push
            in], then quickly [Pull out]`
          example: A young girl gradually grows into an adult woman
          maxLength: 2000
        image_urls:
          type: array
          description: >-
            Reference image URLs for I2V and FLF modes


            **Mode Detection:**

            - 0 images = T2V (Text-to-Video)

            - 1 image = I2V (Image-to-Video)

            - 2 images = FLF (First-Last-Frame transition)


            **Requirements:**

            - Image size: max 20MB

            - Formats: JPG, JPEG, PNG, WebP

            - Aspect ratio: 2:5 to 5:2

            - Short edge > 300px


            **FLF Note:** Video resolution follows first frame, last frame will
            be cropped to match
          items:
            type: string
            format: uri
          maxItems: 2
          example:
            - https://example.com/first.jpg
            - https://example.com/last.jpg
        quality:
          type: string
          description: |-
            Video resolution

            **Supported by mode:**
            - I2V: 512p, 768p, 1080p
            - T2V: 768p, 1080p
            - FLF: 768p, 1080p

            **Duration & Resolution:**
            - 512p: 6s, 10s
            - 768p: 6s, 10s
            - 1080p: 6s only

            Note: 512p only available in I2V mode
          enum:
            - 512p
            - 768p
            - 1080p
          default: 768p
          example: 768p
        duration:
          type: integer
          description: |-
            Video duration (seconds)
            - 6 seconds (default)
            - 10 seconds (not available for 1080p)
          enum:
            - 6
            - 10
          default: 6
          example: 6
        model_params:
          type: object
          description: Model-specific parameters
          properties:
            prompt_optimizer:
              type: boolean
              description: Auto-optimize prompt. Set false for precise control
              default: true
              example: true
            fast_pretreatment:
              type: boolean
              description: Enable fast preprocessing to reduce optimization time
              default: false
              example: true
        callback_url:
          type: string
          description: >-
            HTTPS callback URL for task completion


            **Callback Timing:**

            - Triggered when task is completed, failed, or cancelled

            - Sent after billing confirmation


            **Security Restrictions:**

            - HTTPS protocol only

            - Internal IP addresses are prohibited (127.0.0.1, 10.x.x.x,
            172.16-31.x.x, 192.168.x.x, etc.)

            - URL length must not exceed `2048` characters


            **Callback Mechanism:**

            - Timeout: `10` seconds

            - Maximum `3` retries after failure (at `1`/`2`/`4` seconds after
            failure)

            - Callback response format is consistent with task query API

            - 2xx status code is considered successful, other codes trigger
            retry
          format: uri
          example: https://your-domain.com/webhooks/video-task-completed
    VideoGenerationResponse:
      type: object
      properties:
        created:
          type: integer
          description: Task creation timestamp
          example: 1757169743
        id:
          type: string
          description: Task ID
          example: task-unified-1757169743-7cvnl5zw
        model:
          type: string
          description: Model name used
          example: MiniMax-Hailuo-02
        object:
          type: string
          enum:
            - video.generation.task
          description: Task type
        progress:
          type: integer
          description: Task progress (0-100)
          minimum: 0
          maximum: 100
          example: 0
        status:
          type: string
          description: Task status
          enum:
            - pending
            - processing
            - completed
            - failed
          example: pending
    ErrorResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              description: Error code identifier
            message:
              type: string
              description: Error description
            type:
              type: string
              description: Error type
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: >-
        ##All APIs require Bearer Token authentication##


        **Get API Key:**


        Visit [API Key Management Page](https://evolink.ai/dashboard/keys) to
        get your API Key


        **Add to request header:**

        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````