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

> Advanced video generation with Hailuo 02

<Tip>
  1. After submission, a `task_id` will be returned. If you provided a `callback_url`, when the task status becomes `finished` or `failed`, a POST request will be sent to the `callback_url`.
  2. Regardless of whether `callback_url` is provided, you can retrieve the response result through the unified [Query Task Status](/api-manual/task-management/status) endpoint.
</Tip>

# Hailuo 02 Video Generation

Generate high-quality videos using Hailuo 02 models. Create professional content with text-to-video and image-to-video capabilities.

## Available Models

* **hailuo-02** - Standard video generation (768P/512P, up to 10 seconds)
* **hailuo-02-pro** - Professional video generation (1080P, 6 seconds)

## Key Features

* **Flexible Modes**: Text-to-video and image-to-video
* **Multiple Resolutions**: 512P, 768P (Standard) and 1080P (Pro)
* **Duration Options**: 6 or 10 seconds (Standard only)
* **Prompt Optimizer**: Optional AI-powered prompt enhancement
* **End Frame Control**: Specify ending frame for image-to-video (optional)


## OpenAPI

````yaml /api-manual/video-series/hailuo-02.json POST /api/generate/submit
openapi: 3.0.0
info:
  title: Vidgo API - Hailuo 02 API
  description: Advanced Video Generation with Hailuo 02
  version: 1.0.0
servers:
  - url: https://api.vidgo.ai
    description: Production server
security:
  - BearerAuth: []
paths:
  /api/generate/submit:
    post:
      tags:
        - Hailuo 02
      summary: Submit Hailuo 02 Video Generation Task
      description: Generate high-quality videos using Hailuo 02 models
      operationId: submitHailuo02Task
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/SubmitRequest'
            examples:
              hailuo-02-text-to-video:
                summary: Hailuo 02 Text-to-Video
                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 Image-to-Video
                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://example.com/image.png
                    end_image_url: https://example.com/end_image.png
                    duration: 10
                    resolution: 768P
                    prompt_optimizer: true
              hailuo-02-pro-text-to-video:
                summary: Hailuo 02 Pro Text-to-Video
                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 Image-to-Video
                value:
                  model: hailuo-02-pro
                  callback_url: https://your-domain.com/callback
                  input:
                    prompt: The camera slowly pans across the landscape
                    image_urls:
                      - https://example.com/image.png
                    end_image_url: https://example.com/end_image.png
                    prompt_optimizer: true
      responses:
        '200':
          description: Task submitted successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/SubmitResponse'
components:
  schemas:
    SubmitRequest:
      type: object
      required:
        - model
      properties:
        model:
          type: string
          description: Hailuo 02 model identifier
          enum:
            - hailuo-02
            - hailuo-02-pro
        callback_url:
          type: string
          format: uri
          description: Webhook callback URL for result notifications
          example: https://your-domain.com/callback
        input:
          type: object
          required:
            - prompt
          description: Input parameters for generation
          properties:
            prompt:
              type: string
              description: Generation prompt describing the desired video
              maxLength: 1500
              example: A cinematic video scene
            image_urls:
              type: array
              items:
                type: string
                format: uri
              maxItems: 1
              description: >-
                Reference image URLs for image-to-video generation (required for
                image-to-video)
              example: []
            end_image_url:
              type: string
              format: uri
              description: >-
                Optional URL of the image to use as the last frame
                (image-to-video only)
              example: https://example.com/end_image.png
            duration:
              type: integer
              description: Video duration in seconds (hailuo-02 only)
              enum:
                - 6
                - 10
              example: 6
            resolution:
              type: string
              description: Output resolution (hailuo-02 image-to-video only)
              enum:
                - 512P
                - 768P
              example: 768P
            prompt_optimizer:
              type: boolean
              description: Enable AI-powered prompt optimization
              example: true
    SubmitResponse:
      type: object
      required:
        - code
        - data
      properties:
        code:
          type: integer
          example: 200
          description: HTTP status code
        data:
          type: object
          required:
            - task_id
            - status
            - created_time
          properties:
            task_id:
              type: string
              example: task-unified-1757165031-uyujaw3d
              description: Unique task identifier for status tracking
            status:
              type: string
              enum:
                - not_started
              example: not_started
              description: Initial task status
            created_time:
              type: string
              format: date-time
              example: '2025-11-12T10:30:00'
              description: ISO 8601 timestamp when the task was created
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: >-
        All API endpoints require Bearer Token authentication


        Get your API Key:


        Visit the [API Key Management
        Page](https://vidgo.ai/apis/dashboard/api-key) to get your API Key


        Add it to the request header:


        ```

        Authorization: Bearer YOUR_API_KEY

        ```

````