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

# Minimax Hailuo-02

Minimax Hailuo-02 is an AI video generation model supporting both text-to-video and image-to-video. It can generate 6-second videos at 768P or 1080P resolution, and 10-second videos at 768P resolution.

<Tip>
  This is an **async** API that only returns the task\_id of the async task. Use the task\_id to call the [Get Async Task Result API](/docs/models/reference-get-async-task-result) to retrieve the generated result.
</Tip>

## Request Headers

<ParamField header="Content-Type" type="string" required={true}>
  Enum: `application/json`
</ParamField>

<ParamField header="Authorization" type="string" required={true}>
  Bearer authentication format: Bearer \{\{API Key}}.
</ParamField>

## Request Body

<ParamField body="prompt" type="string" required={true}>
  Text prompt to guide the generation.

  Range: `1 <= x <= 2000`.
</ParamField>

<ParamField body="image" type="string" required={false}>
  First frame image for video generation. Supports public URLs or Base64 encoding (e.g., `data:image/jpeg;base64,...`).
</ParamField>

<ParamField body="end_image" type="string" required={false}>
  End frame image for video generation. Supports public URLs or Base64 encoding (e.g., `data:image/jpeg;base64,...`).
</ParamField>

<ParamField body="duration" type="integer" required={false}>
  Duration of the generated video (in seconds). Default: `6`<br />
  Possible values: `6`, `10`
</ParamField>

<ParamField body="resolution" type="string" required={false}>
  Resolution of the generated video. Default: `768P`

  * 6-second videos support: `768P`, `1080P`
  * 10-second videos only support: `768P`
</ParamField>

<ParamField body="enable_prompt_expansion" type="boolean" required={false}>
  Whether to enable prompt optimization.

  Default: `true`.
</ParamField>

<ParamField body="fast_pretreatment" type="boolean" required={false} default={false}>
  Whether to reduce the time spent on prompt optimization.

  Default: `false`.
</ParamField>

## Response

<ResponseField name="task_id" type="string" required={true}>
  The task\_id of the async task. Use the task\_id to call the [Get Async Task Result API](/docs/models/reference-get-async-task-result) to retrieve the generated result.
</ResponseField>
