Wan 2.2 14B Animate Replace API

wan/v2.2-14b/animate/replace
Wan 2.2 14B Animate Replace delivers state-of-the-art character replacement in videos.
Output
$0.04 / sec
Released
Nov 24, 2025

Overview

Wan 2.2 14B Animate Replace is an advanced AI video generation model designed for precise character replacement in existing videos. The model maintains the original video's scene, background, camera angles, and timing, while replacing the person in the video with a new character based on a reference photo. Replacement can be limited to the face or include the full body, preserving body poses and synchronized lip movements.

‍

Technical Specifications

  • Model Size: 14 billion parameters in the generation backbone.
  • Architecture: Diffusion transformer video generator with mixture-of-experts design for enhanced capacity at efficient compute cost.
  • Latent Space Processing: Uses a custom 3D causal variational autoencoder (VAE) (~127M parameters) for spatio-temporal latent video compression.
  • Causality: Temporal causality ensures future frames don't influence past frames, enabling stable and coherent motion generation.
  • Attention Mechanism: Pooled spatio-temporal self-attention across frames and pixels.
  • Conditioning: Cross-attention to text features via a T5 encoder for optional text-driven control.
  • Input: Single reference image (identity) + reference video (motion).
  • Output: Video with replaced character, 720p resolution at 24 fps.

‍

Performance Benchmarks

  • Video Quality: High-fidelity character replacement with smooth motion and natural facial expressions.
  • Resolution and Frame Rate: Supports 720p resolution at 24 frames per second.
  • Latency: Local generation speed depends on GPU; H100 GPUs yield significantly faster inference than consumer GPUs.
  • Resource Efficiency: Mixture-of-experts architecture enhances model capacity without proportional increase in compute cost.

‍

Key Features

  • Character Replacement: Swap the original person in a video with a new one from a single reference image.
  • Full or Partial Replacement: Choose between just face replacement or full body substitution.
  • Pose and Expression Preservation: Maintain the original body pose, head movements, and lip synchronization for natural animation.
  • Scene Consistency: Keeps background, camera angles, lighting, and timing intact.
  • High Realism: Uses skeleton-based motion tracking and fine facial encoding for smooth, realistic animations.
  • Local Deployment: Can run locally with appropriate hardware setups, supporting high-quality output.

‍

API Prising

  • 480p: $0.052;
  • 580p: $0.078;
  • 720p: $0.104

‍

‍

Code Sample

‍

Comparison with Other Models

vs Stable Diffusion Video: Wan 2.2 emphasizes end-to-end character replacement in videos with holistic expression and motion transfer, surpassing Stable Diffusion extensions which mainly support short clip generation and less consistent temporal control. Wan 2.2 can handle longer videos (up to several minutes) compared to typically shorter outputs from Stable Diffusion video models.

vs Imagen Video (Google): Imagen Video focuses largely on video generation from text prompts with high visual quality but lacks specific character replacement features. Wan 2.2’s unique selling point is unifying animation and replacement modes with detailed control over expressions and motion, catering to character-centric workflows.

vs Meta Make-A-Video: Wan 2.2 specializes in character replacement with precise synchronization of pose and lips in existing videos, whereas Make-A-Video generates short video clips from text without targeted character substitution. Make-A-Video focuses on general scene creation, making Wan 2.2 more practical for post-production and video editing.

API Integration

Accessible via AI/ML API. Documentation: available here.

Use cases

  • Video character replacement for advertising and marketing content
  • Virtual influencer and avatar creation with real-time expression mimicking
  • Film and video pre-visualization and reshoots without new filming
  • Personalized user-generated content with custom characters
  • Animation of photos for social media and entertainment
  • Educational and training video customization
  • Privacy-preserving content creation by replacing faces in existing footage
  • Digital effects and deepfake production with ethical controls

‍

How to use Wan 2.2 14B Animate Replace API

Install any OpenAI-compatible SDK, point it at api.aimlapi.com/v1, and set the model to wan/v2.2-14b/animate/replace.
import requests, time

headers = {"Authorization": "Bearer " + AIMLAPI_KEY}
job = requests.post(
    "https://api.aimlapi.com/v2/video/generations",
    headers=headers,
    json={
      "model": "wan/v2.2-14b/animate/replace",
      "prompt": "A serene timelapse of clouds over a mountain range"
    },
).json()
gid = job["id"]

while True:
    res = requests.get(f"https://api.aimlapi.com/v2/video/generations?generation_id={gid}", headers=headers).json()
    if res.get("status") in ("completed", "error"):
        break
    time.sleep(5)
print(res["video"]["url"])
const headers = {
  Authorization: `Bearer ${process.env.AIMLAPI_KEY}`,
  "Content-Type": "application/json",
};
const job = await (await fetch("https://api.aimlapi.com/v2/video/generations", {
  method: "POST",
  headers,
  body: JSON.stringify({
    "model": "wan/v2.2-14b/animate/replace",
    "prompt": "A serene timelapse of clouds over a mountain range"
  }),
})).json();

let res;
do {
  await new Promise((r) => setTimeout(r, 5000));
  res = await (await fetch(`https://api.aimlapi.com/v2/video/generations?generation_id=${job.id}`, { headers })).json();
} while (!["completed", "error"].includes(res.status));
console.log(res.video.url);
# submit the generation — the response contains the job "id"
curl -X POST https://api.aimlapi.com/v2/video/generations \
  -H "Authorization: Bearer $AIMLAPI_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"wan/v2.2-14b/animate/replace","prompt":"A serene timelapse of clouds over a mountain range"}'

# then poll until status is "completed" — video.url holds the result
curl "https://api.aimlapi.com/v2/video/generations?generation_id={id}" -H "Authorization: Bearer $AIMLAPI_KEY"

OpenAI-compatible — swap the base URL and it works with your existing SDK.

Wan 2.2 14B Animate Replace API Pricing

TypePrice
Output
$0.04 / sec

Wan 2.2 14B Animate Replace vs other models

ModelInputOutputContextBest for
$0.04 / sec
Video generation
$0.2 / sec (variable)
Video generation
$1.95 / 1M tokens
$0.10136 / sec
Video generation
$0.0711 / sec
Cinematic video + native audio

Frequently asked questions

Wan 2.2 14B Animate Replace takes image, video as input and returns video.

Wan 2.2 14B Animate Replace is priced at $0.052 / gen.

Wan 2.2 14B Animate Replace is billed per generation — a fixed charge per output rather than by prompt length.

Yes, Wan 2.2 14B Animate Replace accepts image input as well as a text prompt.

Wan 2.2 14B Animate Replace was built by Alibaba Cloud.

Send a request to v2/video/generations with wan/v2.2-14b/animate/replace as the model id.

Yes. Wan 2.2 14B Animate Replace is served through AI/ML API, so the same key and endpoint format used for other models applies.

Start building with Wan 2.2 14B Animate Replace

Get API Key
1000+ models, one API.