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

# Hailuo 2.3 Pro

Generate videos from a source image using the `hailuo/2-3-image-to-video-pro` model.

## Authentication

All API requests require a Bearer Token.

```http theme={null}
Authorization: Bearer YOUR_API_KEY
```

## Create a Video Generation Task

Submit an image-to-video generation task using the endpoint below.

```http theme={null}
POST /api/v1/jobs/createTask
```

### Request Body

| Field   | Type   | Required | Description                                     |
| ------- | ------ | -------- | ----------------------------------------------- |
| `model` | string | Yes      | The model used for video generation.            |
| `input` | object | Yes      | Input parameters for the video generation task. |

<ParamField body="model" type="string" required>
  Must be `hailuo/2-3-image-to-video-pro`.
</ParamField>

<ParamField body="input" type="object" required>
  ## Input Parameters

  The `input` object contains the parameters used to generate the video.

  <ParamField body="prompt" type="string" required>
    Use `prompt` to describe the desired video animation you want to generate.

    **Maximum length:** `5000` characters.
  </ParamField>

  <ParamField body="image_url" type="string" required>
    Use `image_url` for the video’s first frame.

    The `image_url` must contain the URL of an uploaded image. The value must be an uploaded file URL, not the file content itself.

    Supported formats:

    * `image/jpeg`
    * `image/png`
    * `image/webp`

    Maximum file size: `10 MB`
  </ParamField>

  <ParamField body="duration" default="6" type="string">
    Use `duration` to specify the length of the generated video in seconds.

    **Note:-** 10-second videos are not supported in 1080p resolution.

    Supported values:

    * `"6"`
    * `"10"`

    Default: `"6"`
  </ParamField>

  <ParamField body="resolution" default="768P" type="string">
    Specify the resolution of the generated video.

    Supported values:

    * `768P`
    * `1080P`

    **Default:** `768P`
  </ParamField>
</ParamField>

## Example Request

```json theme={null}
{
  "model": "hailuo/2-3-image-to-video-pro",
  "input": {
    "prompt": "At sunset, two armored medieval knights engage in a fierce cinematic duel across a dusty desert battlefield, their detailed metal armor glowing with warm golden light as their swords collide in a burst of sparks, captured with dynamic camera movement, shallow depth of field, dramatic slow motion, volumetric lighting, realistic reflections, and an epic atmosphere.",
    "image_url": "https://demo.com/example2.png",
    "duration": "6",
    "resolution": "768P",
  }
}
```

## Response

### Successful Response

<ResponseField name="code" type="number">
  Response status code.
</ResponseField>

<ResponseField name="msg" type="string">
  Response message. Contains the error description when the request fails.

  **Example:** `success`
</ResponseField>

<ResponseField name="data" type="object" required>
  The task data object containing task id.

  <ResponseField name="taskId" type="string" required>
    The unique identifier for this task.

    **Example:** `task_123456`
  </ResponseField>
</ResponseField>

## Query Task Status

After submitting a task, use the unified query endpoint to check the task progress and retrieve the generated results.

<Card title="Get Task Details" icon="search" href="/get-task-detail">
  Check task status, monitor generation progress, and retrieve results.
</Card>

### Error Response

```json theme={null}
{
  "code": 500,
  "msg": "Server Error - An unexpected error occurred while processing the request",
  "data": null
}
```

## Response Codes

|  Code | Meaning                                                                   |
| ----: | ------------------------------------------------------------------------- |
| `200` | Success — the request was successfully processed.                         |
| `401` | Unauthorized — authentication credentials are missing or invalid.         |
| `402` | Insufficient Credits — the account does not have enough credits.          |
| `404` | Not Found — the requested resource or interface does not exist.           |
| `408` | Upstream service issue — no result has been returned for over 10 minutes. |
| `422` | Validation Error — request parameters failed validation.                  |
| `429` | Rate Limited — request frequency limit has been exceeded.                 |
| `433` | Request Limit — sub-key usage exceeded the limit.                         |
| `455` | Service Unavailable — system is undergoing maintenance.                   |
| `500` | Server Error — an unexpected error occurred while processing the request. |
| `501` | Generation Failed — content generation failed.                            |
| `505` | Feature Disabled — the requested feature is disabled.                     |
