# Alibaba Wan 2.2 Animate Replace API

> Wan 2.2 Animate Replace replaces the person in the reference video with the character from the image.

Source: https://www.sandbase.ai/model/alibaba/wan/2.2/animate/replace
API reference: https://www.sandbase.ai/model/alibaba/wan/2.2/animate/replace/docs

## Facts

- Provider: Alibaba
- Type: Video model
- Model ID: `alibaba/wan/2.2/animate/replace`
- Price: From $0.75 per run
- Capabilities: video to video
- Billing: pay per use from one SandBase balance; no provider account or subscription needed

## Call it

- Unified Run API: `POST https://api.sandbase.ai/v1/run`

```bash
curl -X POST https://api.sandbase.ai/v1/run \
  -H "Authorization: Bearer $SANDBASE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan/2.2/animate/replace",
  "image": "https://static.sandbase.ai/examples/alibaba/wan/2.2/animate/replace/input_image_0.png",
  "video": "https://static.sandbase.ai/examples/alibaba/wan/2.2/animate/replace/input_video_1.mp4",
  "use_turbo": false,
  "resolution": "720p"
}'
```

The response returns a run id; poll `GET https://api.sandbase.ai/v1/run/{id}` until the status is `completed` or `failed`.

## FAQ

### How do I call Alibaba Wan 2.2 Animate Replace through SandBase?

Create a SandBase API key, then send requests with the model ID "alibaba/wan/2.2/animate/replace" to Unified Run API (/v1/run) at https://api.sandbase.ai. The request examples on this page show the exact payload.

### Do I need a separate Alibaba account?

No. One SandBase API key and balance gives you access to Alibaba Wan 2.2 Animate Replace and the other models in the catalog; you do not need to sign up with Alibaba separately.

## README

### Wan 2.2 Animate Replace

Swap the person in a reference `video` for the character in `image`. Motion, camera, and scene come from the video; the new character's look comes from the picture, relit to fit the scene.

#### Fields

| Field | Type | Default | Notes |
|---|---|---|---|
| `image` | image URL, required | — | Character image. JPEG, PNG, or WebP URL. |
| `video` | video URL, required | — | Reference video that supplies the motion. |
| `resolution` | `480p` / `580p` / `720p` | `720p` | Sets the rate. |
| `use_turbo` | boolean | false | Faster generation at some quality cost. |
| `seed` | integer 0–2147483647 | random | Fix it to compare prompt changes. |

#### Billing

Billing follows the upstream unit: output seconds counted at 16 frames per second, so a 30fps output bills about 1.9× its wall-clock length. Rates per counted second: $0.04 at 480p, $0.06 at 580p, $0.08 at 720p. The quote before submission assumes a 5-second, 30fps result; the final charge uses the measured output.

| Output | 480p | 580p | 720p |
|---|---|---|---|
| 5s at 30fps | $0.375 | $0.5625 | $0.75 |
| 10s at 30fps | $0.75 | $1.125 | $1.50 |
| 10s at 16fps | $0.40 | $0.60 | $0.80 |

Failed runs are not charged.

#### Prompting

- Match the character image's pose and framing to the person in the video where possible.
- Avoid videos with several people overlapping the subject.

#### Limits

- Output length follows the reference video.

#### Also on SandBase

Other Wan 2.2 endpoints: `alibaba/wan/2.2/animate/move`, `alibaba/wan/2.2/speech-to-video`.
