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
  • 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://ai.odkkk.com/apiv1 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'
    '401':
      description: Unauthorized, invalid or expired token
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'
    '402':
      description: Insufficient quota, recharge required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/ErrorResponse'

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
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: integer
          description: HTTP error code
        message:
          type: string
          description: Error description
        type:
          type: string
          description: Error type
        param:
          type: string
          description: Related parameter
        fallback_suggestion:
          type: string
          description: Suggested solution

securitySchemes: bearerAuth: type: http scheme: bearer description: >- ##All APIs require Bearer Token authentication##

    **Get API Key:**


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


    **Add to request header:**

    ```

    Authorization: Bearer YOUR_API_KEY

    ```

````


To find navigation and other pages in this documentation, fetch the llms.txt file at: https://ai.odkkk.com/apiv1/docs/llms.txt