Wan Animate Replace API

alibaba/wan/v2.2-14b/animate/replace

Wan Animate Replace transforms the existing actor in a source video into a new subject from a reference image, delivering photorealistic character swapping, natural boundary blending, and multi-tier resolution options. It preserves original camera motion, scene lighting, and environmental interactions while accurately transferring the replacement character's facial likeness and attire.

Input

Drag and drop files, paste from clipboard, or provide a URL. One image. Playground uploads: JPG, PNG or WebP, up to 10 MiB. The API requires an HTTP(S) URL array.

1/1 files added

Drag and drop files, paste from clipboard, or provide a URL. One video. Playground uploads: MP4, MOV or MKV, up to 100 MiB. Billing uses source duration rounded up to seconds.

1/1 files added

OutputReady
Estimate: 480p · 3 seconds × 7 credits = 21 credits ($0.105)

Examples

Greenhouse Walk

Wood Stove Toss

Coast Kayak Stroke

Wan Animate Replace

Wan Animate Replace is an advanced video-to-video AI character substitution model developed by Alibaba. Given a source video and a single target character portrait, the model identifies the original actor and seamlessly replaces them with the new subject. Leveraging a 14B parameter multimodal backbone with spatio-temporal attention, it adapts the new character to existing camera trajectories, dynamic illumination, and physical environmental interactions without rotoscoping or green screens.

Why Choose Wan Animate Replace?

  • Photorealistic Actor & Subject SwappingReplace human actors with digital personas, illustrated figures, or alternative subjects while preserving natural motion continuity.

  • Camera Motion & Background RetentionLocks the source video's camera panning, tilting, focal changes, and background scenery completely in place without jitter or displacement.

  • Adaptive Environmental Lighting & OcclusionBlends the replacement character naturally into scene highlights, casts accurate shadows, and respects physical foreground occlusions.

  • Flexible Multi-Tier ResolutionsSupports 480p for fast composition checks, 580p for social media workflows, and 720p for broadcast-quality video rendering.

Parameters

ParameterRequirementDescription
image_urlsRequired

Exactly one public HTTP(S) image URL in an array. Bare strings and Base64 are rejected.

video_urlRequired

Required public HTTP(S) source video URL. Vidgo inspects files up to 100 MiB. Duration must be positive; do not send a duration field.

resolutionOptional

480p, 580p or 720p. Defaults to 480p only when omitted. Null, empty strings, aliases and surrounding whitespace are rejected.

Default480p580p720p

How to Use Wan Animate Replace

  1. Upload Source Video & Replacement ImageProvide a publicly reachable source video URL containing the actor to replace (up to 100 MiB) and one target character portrait image (JPG, PNG, or WebP up to 10 MiB).

  2. Configure Target ResolutionSelect 480p (default), 580p, or 720p based on your fidelity and bandwidth requirements.

  3. Submit the Replacement JobSend a POST request to /api/generate/submit with your API key, or click Run in the interactive playground.

  4. Poll Status & Download Final CutMonitor the task using task_id until finished, then access the rendered video from data.files[].file_url.

Pricing

Estimated credits = ceil(source video seconds) × the resolution rate. Vidgo measures duration on the server. For example, 5.1 seconds at 480p costs 42 credits ($0.210). Media inspection errors are rejected before deduction; failed tasks are refunded.

UsageRateDetails
Replace 480p7 credits/sec · $0.035/secBilled per started second of source video.
Replace 580p12 credits/sec · $0.060/secBilled per started second of source video.
Replace 720p15 credits/sec · $0.075/secBilled per started second of source video.

Best Use Cases

  • Localized Video Commercials & AdsSwap actors across different regional versions of a promotional video while retaining the original set design, lighting, and camera movement.

  • Film & Series Virtual CastingAudition digital doubles, stunt replacements, or historical lookalikes directly inside existing production footage before filming.

  • Gaming & IP Character Cross-Over VideosSeamlessly insert game protagonists, mascot characters, or VTubers into real-world video scenes interacting with physical surroundings.

  • Personalized Marketing & Fan EngagementGenerate customized short-form clips where customers or brand ambassadors star in cinematic narratives without reshooting.

Pro Tips for Wan Animate Replace

  • Ensure Consistent Character Orientation:Choose a reference image whose head angle and body posture reasonably align with the actor's primary orientation in the video.
  • Select Videos with Clear Subject Separation:Footage with sharp edge contrast between the actor and background ensures crisp matte boundaries and eliminates edge halos.
  • Start Rapid Validation at 480p:Use the 480p tier (7 credits/sec) to verify lighting blend and identity mapping before committing credits to final 720p HD rendering.
  • Provide High-Resolution Replacement Portraits:Clear, well-lit target portraits with detailed facial features prevent blurring when scaled across dynamic camera close-ups.

Notes & Operational Guidelines

  • Strict Array Image Parameter:The image_urls parameter requires an array containing exactly one public HTTP(S) URL. Multiple images, Base64 strings, or raw URLs are rejected.
  • Source Video Size and Inspection:The source video must be reachable via public HTTP(S) and under 100 MiB. Duration is measured on the server; requests with a duration field are rejected.
  • Per-Second Rounded Billing:Total charge equals ceil(source seconds) multiplied by the chosen resolution rate. For instance, 5.1 seconds at 480p is billed as 6 seconds (42 credits).
  • Automatic Failure Reimbursement:Credits are temporarily held upon submission and automatically refunded in full if media inspection or generation fails.

Related Models

Wan Animate Replace API Frequently Asked Questions

What is the Wan Animate Replace API?

Wan Animate Replace is an Alibaba model for video character replacement from reference images. It swaps the existing actor in a source video with a target character portrait while preserving camera motion, lighting interactions, and scene geometry across 480p, 580p, and 720p resolutions. Built on Wan2.2-Animate's 14B parameter multimodal architecture, it maintains original background composition while seamlessly mapping the new character's identity and clothing into the performance. You can call it programmatically or try it from the playground above.

How does Wan Animate Replace preserve the original background and camera motion?

Wan Animate Replace utilizes spatio-temporal diffusion attention that decouples actor segmentation masks from static and dynamic background elements. It tracks the original camera trajectory, zooming, and focal depth across all frames, ensuring only the target character region is transformed while the surrounding environment remains pixel-stable.

What inputs are required for Wan Animate Replace?

Wan Animate Replace requires two primary inputs: one source video URL (via video_url) containing the character to be replaced, and an image_urls array containing exactly one public HTTP(S) URL of the replacement subject portrait. Output resolution can optionally be set to 480p, 580p, or 720p.

How does Wan Animate Replace blend the new character into complex lighting?

The model incorporates ambient light adaptation that estimates direction, specular highlights, and color temperature from the driving footage. It realistically casts dynamic shadows from the new character onto nearby objects and reflects environmental hues onto the replacement character's skin and clothing.

How does Wan Animate Replace calculate credits?

Credits are calculated by measuring the source video duration on the server, rounding up to the nearest whole second, and multiplying by the chosen resolution rate: 7 credits/sec ($0.035/sec) for 480p, 12 credits/sec ($0.060/sec) for 580p, and 15 credits/sec ($0.075/sec) for 720p. Deducted credits are automatically refunded if generation fails.

What resolutions does Wan Animate Replace support?

Wan Animate Replace supports 480p (default), 580p, and 720p output resolutions. Use 480p for fast composition testing, 580p for social media formats, and 720p for final broadcast-ready high-definition deliverables.

When is Wan Animate Replace preferable to Wan Animate Move?

Wan Animate Replace is preferable when you already have a complete, polished scene and need to substitute an actor while preserving the complex environment, props, camera movements, and lighting. Wan Animate Move is designed to animate a standalone character portrait using extracted motion without retaining the reference video's background.