# Wan 2.2 Video Character Swap — Atlas Cloud API

> The Wan video character swap model replaces the main character in a video with a character from an image. This model preserves the scene, lighting, and tone of the original video to ensure a seamless result.

This is the machine-readable API reference for **Wan 2.2 Video Character Swap** on Atlas Cloud,
a unified API platform for 400+ AI models across text, image, video, audio and 3D.

- **Model ID**: `alibaba/wan-2.2/animate-mix`
- **Built by**: Alibaba
- **Modality**: Video
- **Model page**: https://www.atlascloud.ai/models/alibaba/wan-2.2/animate-mix
- **API key**: https://www.atlascloud.ai/console/api-keys
- **Docs**: https://www.atlascloud.ai/docs

## Pricing on Atlas Cloud

- $0.126 per second of generated video
- Pay-as-you-go. No minimum spend, no subscription required.

> **These are the authoritative Atlas Cloud rates for this model.** Any price that
> appears in the vendor description further down refers to a different platform or
> a different model variant and does not apply here.

## Use this model from an AI agent

Atlas Cloud ships three first-party integration surfaces. All three authenticate
with the same API key via the `ATLASCLOUD_API_KEY` environment variable.

### MCP server

The official MCP server (`atlascloud-mcp`) exposes this model to any
MCP-compatible host — Claude Code, OpenAI Codex, Cursor, Gemini CLI, Goose,
Claude Desktop. One-line install:

```bash
# Claude Code
claude mcp add atlascloud -- npx -y atlascloud-mcp

# OpenAI Codex CLI
codex mcp add atlascloud -- npx -y atlascloud-mcp

# Gemini CLI
gemini mcp add atlascloud -- npx -y atlascloud-mcp

export ATLASCLOUD_API_KEY="your-api-key"
```

Then ask in plain English; the agent calls `atlas_generate_video` with `model: "alibaba/wan-2.2/animate-mix"`.
The server fetches each model's schema and validates parameters before submitting,
so invalid requests fail fast without spending credits.

MCP docs: https://www.atlascloud.ai/docs/mcp-server

### Agent Skills

`atlas-cloud-skills` is a portable skill package (API reference, code templates in
Python / Node.js / cURL, model IDs with pricing) for Claude Code, Cursor, Codex and
12+ other agents:

```bash
npx skills add AtlasCloudAI/atlas-cloud-skills
export ATLASCLOUD_API_KEY="your-api-key"
```

Skills docs: https://www.atlascloud.ai/docs/skills

### CLI

The `atlas` binary runs Atlas Cloud from a terminal or CI script. Async media jobs
are polled and downloaded automatically (use `--no-download` when a script only
needs the output URLs):

```bash
# Install (Homebrew, npm, or shell installer)
brew install AtlasCloudAI/tap/atlascloud
# npm install -g atlascloud-cli
# curl -fsSL https://raw.githubusercontent.com/AtlasCloudAI/cli/main/install.sh | sh

atlas auth login
atlas generate video alibaba/wan-2.2/animate-mix -p "Your prompt here"
```

CLI docs: https://www.atlascloud.ai/docs/cli

## HTTP API reference

- **Submit endpoint (POST)**: `https://api.atlascloud.ai/api/v1/model/generateVideo` — start an async generation; returns a `prediction_id`
- **Poll endpoint (GET)**: `https://api.atlascloud.ai/api/v1/model/prediction/{prediction_id}` — poll this until the prediction finishes
- **Model ID**: `alibaba/wan-2.2/animate-mix`


## API Information

This model can be used via our HTTP API or more conveniently via our client libraries.
See the input and output schema below, as well as the usage examples.


### Input Schema

The API accepts the following input parameters:

- **`model`** (`string`, _required_):
  model name
  - Default: `"alibaba/wan-2.2/animate-mix"`

- **`image`** (`string`, _required_):
  The image for replacing the character in input video with. Format restrictions: JPG, JPEG, PNG, BMP, WEBP. Dimension restrictions: Image width and height must both be within the range of 200 to 4096 pixels, with an aspect ratio between 1: 3 and 3:1. Size restriction: No more than 5 MB.

- **`video`** (`string`, _required_):
  The video for generating the output. Recommendation: Increasing the resolution and frame rate of the reference video can significantly improve the quality of the generated output. Format restrictions: MP4, AVI, MOV. Dimension restrictions: Video width and height must both fall within the range of 200 to 2048 pixels, with an aspect ratio between 1:3 and 3:1. Size restriction: No more than 200 MB. Duration restriction: Not shorter than 2 seconds and not longer than 30 seconds.

- **`mode`** (`string`, _required_):
  wan-std: Standard mode with faster generation speed and higher cost-effectiveness, suitable for quick previews and basic animation scenarios. wan-pro: Professional mode offering smoother animation and better overall results, though processing time and cost will increase accordingly.
  - Default: `"wan-pro"`
  - Options: "wan-std", "wan-pro"



**Required Parameters Example**:

```json
{
  "model": "alibaba/wan-2.2/animate-mix",
  "image": "",
  "video": "",
  "mode": "wan-pro"
}
```


**Full Example**:

```json
{
  "model": "alibaba/wan-2.2/animate-mix",
  "image": "",
  "video": "",
  "mode": "wan-pro"
}
```


### Output Schema

The API returns the following output format:


- **`created_at`** (`string`, _optional_):
  ISO timestamp of when the request was created (e.g., “2023-04-01T12:34:56.789Z”).

- **`id`** (`string`, _optional_):
  Unique identifier for the prediction, the ID of the prediction to get.

- **`model`** (`string`, _optional_):
  Model ID used for the prediction.

- **`outputs`** (`array[string]`, _optional_):
  Array of URLs to the generated content (empty when status is not completed).

- **`status`** (`string`, _optional_):
  Status of the task: created, processing, completed, or failed.

- **`urls`** (`object`, _optional_):
  Object containing related API endpoints.



**Example Response**:

```json
{
  "created_at": "",
  "id": "",
  "model": "",
  "outputs": [
    ""
  ],
  "status": "",
  "urls": {}
}
```


## Usage Examples

### cURL

```bash
# Step 1: Start generation (async)
curl -X POST "https://api.atlascloud.ai/api/v1/model/generateVideo" \
  -H "Authorization: Bearer $ATLASCLOUD_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "alibaba/wan-2.2/animate-mix",
  "image": "",
  "video": "",
  "mode": "wan-pro"
}'

# Response will contain: {"code": 200, "data": {"id": "prediction_id", "status": "processing"}}

# Step 2: Poll for result (replace {prediction_id} with the id returned above)
curl -X GET "https://api.atlascloud.ai/api/v1/model/prediction/{prediction_id}" \
  -H "Authorization: Bearer $ATLASCLOUD_API_KEY"

# Keep polling until status is "completed", "succeeded" or "failed"
# When completed, outputs will contain the generated content URL(s)
```

## Additional Resources

### Documentation

- [Model Playground](https://www.atlascloud.ai/models/alibaba/wan-2.2/animate-mix)

## About this model

_Vendor-supplied description. Any pricing or endpoint mentioned below refers to_
_other platforms — use the Atlas Cloud values above._

### Alibaba Wan 2.2 Animate Mix

An advanced, unified character animation and replacement model that transfers motion, expressions, and timing from a source clip while preserving the identity of a target character from a single reference image. Animate Mix is part of the Wan 2.2 Animate family and focuses on blending the target identity with source motion for coherent, high-quality video generation.

#### Overview
- Purpose: Motion transfer and identity preservation from one image to a full video
- Core capability: Mix mode fuses target appearance with source motion dynamics
- Foundation: Built atop Wan2.2 innovations (e.g., MoE-driven diffusion, improved data, high-compression video)
- Typical output: Smooth 24 fps video at up to 720p with holistic movement and expression replication
- Use cases: Character animation, avatar replacement, lip-sync, dynamic explainer clips, social content

#### Key Features

- One-image-to-video: Animate a character from a single, high-quality portrait or full-body image
- Motion mix-in: Transfer pose, body motion, facial expressions, and timing from a source video
- Identity retention: Preserve clothing, face, and hair of the target character while adopting motion
- Holistic dynamics: Handles subtle micro-expressions, head motion, and body kinematics
- Robustness: Works across varied camera motions and moderate occlusions with careful input selection
- **Motion + Identity Transfer:** Applies actions and facial expressions from a reference video while preserving the target character’s face, hair, and clothing.
- **Dual Modes:**
    - **Standard Mode (wan-std):** Optimized for speed and cost; ideal for previews and basic outputs.
    - **Professional Mode (wan-pro):** Smoother motion and higher fidelity for production use (higher time/cost).
- **Flexible Input Support:** Handles wide image/video resolutions and aspect ratios for diverse pipelines.
- **Long Duration:** Supports reference videos from 2 to 30 seconds.
- **Holistic Dynamic

_(Description truncated. Full text on the model page.)_

---

Atlas Cloud — one API for 400+ AI models. Model page: https://www.atlascloud.ai/models/alibaba/wan-2.2/animate-mix · Docs: https://www.atlascloud.ai/docs
