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

# Wan Animate LoRA

> Character animation API using one source image and one motion reference video

## Overview

Wan Animate LoRA is an asynchronous character animation model. It uses one source image as the character reference and one motion video as the movement reference, then returns a generated MP4 video.

| Capability       | Value                                                                             |
| ---------------- | --------------------------------------------------------------------------------- |
| Model ID         | `wan-animate-LoRA`                                                                |
| Mode             | `animate` (required)                                                              |
| Source image     | Exactly 1 URL in `image_urls`                                                     |
| Motion video     | Exactly 1 public HTTPS video URL in `video_urls`                                  |
| Resolution       | `480p`, `720p`                                                                    |
| Billing duration | Detected from `video_urls[0]`, billed to 3 decimal places with a 5-second minimum |
| Seed             | Optional integer from `0` to `2147483647`                                         |

## Endpoint and authentication

Base URL:

```text theme={null}
https://api.apixo.ai/api/v1
```

| Method | Endpoint                                       | Purpose                               |
| ------ | ---------------------------------------------- | ------------------------------------- |
| `POST` | `/generateTask/wan-animate-LoRA`               | Submit an animation task              |
| `GET`  | `/statusTask/wan-animate-LoRA?taskId={taskId}` | Poll task status and retrieve results |

All requests require your APIXO API key:

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

Submit requests also require:

```http theme={null}
Content-Type: application/json
```

## Copy-paste async quickstart

```bash theme={null}
curl -X POST "https://api.apixo.ai/api/v1/generateTask/wan-animate-LoRA" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "async",
    "input": {
      "mode": "animate",
      "image_urls": [
        "https://example.com/character.png"
      ],
      "video_urls": [
        "https://example.com/motion.mp4"
      ],
      "prompt": "animate the character following the reference motion",
      "resolution": "720p",
      "seed": 12345
    }
  }'
```

The response contains a `taskId`. Save it and poll the status endpoint until `state` becomes `success` or `failed`.

## Request body

```json theme={null}
{
  "request_type": "async",
  "input": {
    "mode": "animate",
    "image_urls": [
      "https://example.com/character.png"
    ],
    "video_urls": [
      "https://example.com/motion.mp4"
    ],
    "prompt": "keep the face stable and follow the reference motion naturally",
    "resolution": "480p",
    "seed": 42
  }
}
```

## Parameters

<ParamField body="request_type" type="string" default="async">
  Result delivery mode. Use `async` for polling with `statusTask`, or `callback` for webhook delivery.
</ParamField>

<ParamField body="callback_url" type="string">
  Required when `request_type` is `callback`. Must be a public HTTPS URL that can receive the final task payload. See [Webhooks](/docs/api-reference/webhooks).
</ParamField>

<ParamField body="input" type="object" required>
  Wan Animate LoRA input parameters.

  <Expandable title="properties">
    <ParamField body="mode" type="string" required>
      Generation mode. The only supported value is `animate`.
    </ParamField>

    <ParamField body="image_urls" type="string[]" required>
      Source image URLs. Provide exactly 1 public HTTP/HTTPS image URL. The source image should be no larger than 50 MB.
    </ParamField>

    <ParamField body="video_urls" type="string[]" required>
      Motion reference video URLs. Provide exactly 1 public HTTPS video URL. The video should be no larger than 200 MB. APIXO probes `video_urls[0]` to detect billing duration before submitting the task.
    </ParamField>

    <ParamField body="prompt" type="string">
      Optional prompt guidance. If provided, it must be a non-empty string.
    </ParamField>

    <ParamField body="resolution" type="string" default="720p">
      Output resolution. Supported values: `480p`, `720p`.
    </ParamField>

    <ParamField body="seed" type="integer">
      Optional random seed from `0` through `2147483647`.
    </ParamField>
  </Expandable>
</ParamField>

## Poll for result

```bash theme={null}
curl -X GET "https://api.apixo.ai/api/v1/statusTask/wan-animate-LoRA?taskId=task_12345678" \
  -H "Authorization: Bearer YOUR_API_KEY"
```

Processing response:

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "processing"
  }
}
```

Success response:

```json theme={null}
{
  "code": 200,
  "message": "success",
  "data": {
    "taskId": "task_12345678",
    "state": "success",
    "resultJson": "{\"resultUrls\":[\"https://file.apixo.ai/video.mp4\"]}"
  }
}
```

After `state` becomes `success`, parse `resultJson` and read its `resultUrls` array.

## Webhook callback mode

Use callback mode when your backend should receive the final result automatically instead of polling.

```bash theme={null}
curl -X POST "https://api.apixo.ai/api/v1/generateTask/wan-animate-LoRA" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "request_type": "callback",
    "callback_url": "https://your-server.com/webhooks/apixo",
    "input": {
      "mode": "animate",
      "image_urls": [
        "https://example.com/character.png"
      ],
      "video_urls": [
        "https://example.com/motion.mp4"
      ],
      "prompt": "animate the character following the reference motion",
      "resolution": "720p"
    }
  }'
```

See [Webhooks](/docs/api-reference/webhooks) for delivery requirements and retry behavior.

## Billing

Wan Animate LoRA is billed per generated video second. The selected `resolution` determines the unit price, and billable duration is detected from `video_urls[0]`.

| Resolution | Billing input                                                                    | APIXO price       |
| ---------- | -------------------------------------------------------------------------------- | ----------------- |
| `480p`     | Detected reference video duration, minimum 5 seconds, billed to 3 decimal places | `$0.064 / second` |
| `720p`     | Detected reference video duration, minimum 5 seconds, billed to 3 decimal places | `$0.132 / second` |

If the reference video is shorter than 5 seconds, billing uses 5 seconds. Longer videos are billed by their detected duration.

For current route and market comparison pricing, see [Pricing](https://apixo.ai/pricing).

## Latency and polling

Actual latency may vary by reference video duration, resolution, queue load, and current route health.

| Request shape          | Typical generation time                             | Recommended first poll       | Poll interval |
| ---------------------- | --------------------------------------------------- | ---------------------------- | ------------- |
| Short `480p` animation | Varies with reference video duration and queue load | 60s after task creation      | 5s-10s        |
| Short `720p` animation | Varies with reference video duration and queue load | 60s after task creation      | 5s-10s        |
| Longer reference video | Varies with reference video duration and queue load | 60s-120s after task creation | 10s           |

<Tip>
  Video generation can take several minutes. For production workloads, use callback mode to avoid frequent polling.
</Tip>

## Errors and troubleshooting

| Cause                          | What to check                                                                  |
| ------------------------------ | ------------------------------------------------------------------------------ |
| Invalid mode                   | Use `mode: "animate"`                                                          |
| Invalid media shape            | Provide exactly 1 `image_urls` item and exactly 1 `video_urls` item            |
| Video URL cannot be probed     | Use a direct public HTTPS video URL that supports range reads or full download |
| Invalid resolution             | Use `480p` or `720p`                                                           |
| Invalid seed                   | Use an integer from `0` to `2147483647`                                        |
| Upstream rate limit or timeout | Retry with backoff or switch to callback mode                                  |

See [Error Codes](/docs/api-reference/errors) for the full error reference.

## Related links

* [Generation API Overview](/docs/models)
* [Generate Task](/docs/api-reference/generate-task)
* [Status Task](/docs/api-reference/status-task)
* [Webhooks](/docs/api-reference/webhooks)
* [Error Codes](/docs/api-reference/errors)
* [Parameter Specification](/docs/api-reference/parameters)
* [Pricing](https://apixo.ai/pricing)
