POST
javascript
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 const axios = require('axios'); const fs = require('fs'); const path = require('path'); async function toB64(imgPath) { const data = fs.readFileSync(path.resolve(imgPath)); return Buffer.from(data).toString('base64'); } const api_key = "YOUR API-KEY"; const url = "https://api.segmind.com/v1/wan-animate"; const data = { "input_video": "https://segmind-resources.s3.amazonaws.com/input/e9f1b4cb-812d-43b4-9aaf-572bc01828d1-animate-1.mp4", "reference_image": "toB64('https://segmind-resources.s3.amazonaws.com/input/7af018fd-d18a-4688-9afd-52df7510fe69-MarkuryFLUX_03641_.png')", "resolution": "480p", "prompt": "woman posing for a selfie", "seed": 987778, "mode": "replace", "base64": false }; (async function() { try { const response = await axios.post(url, data, { headers: { 'x-api-key': api_key } }); console.log(response.data); } catch (error) { console.error('Error:', error.response.data); } })();
RESPONSE
image/jpeg
HTTP Response Codes
200 - OKImage Generated
401 - UnauthorizedUser authentication failed
404 - Not FoundThe requested URL does not exist
405 - Method Not AllowedThe requested HTTP method is not allowed
406 - Not AcceptableNot enough credits
500 - Server ErrorServer had some issue with processing

Attributes


input_videostr *

URL of the video to process. Use HD videos for high-quality outputs.


reference_imageimage *

URL for image reference. Use clear images for best rendering.


resolutionenum:str *

Output video resolution. Choose 720p for detail and 480p for speed.

Allowed values:


promptstr *

Text directing animation. Use vivid descriptions for creative animations.


seedint ( default: 987778 )

Set seed for repeatability. Random seeds give variety.


modeenum:str *

'Animation' for animating image; 'Replace' for replacing video subject. Choose based on task requirement.

Allowed values:


base64bool ( default: 1 )

Outputs video as base64 string for easy data transfer.

To keep track of your credit usage, you can inspect the response headers of each API call. The x-remaining-credits property will indicate the number of remaining credits in your account. Ensure you monitor this value to avoid any disruptions in your API usage.

Wan-Animate: Character Animation and Replacement Model

Edited by Segmind Team on October 9, 2025.

What is Wan-Animate?

Wan‑Animate is the latest AI model, built on the Wan Framework, that is designed to transform animation in videos with flawless substitution of the original subject. The model efficiently imitates the facial expressions and physical movements from the source video to produce smooth and natural animations. Wan-Animate is integrated with a powerful Relighting LoRA module that ensures the preservation of lighting and environmental details during the transformation process. It produces realistic, high-quality character animation and maintains consistency in subject replacement.

Key Features of Wan‑Animate

  • Unified animation and replacement capabilities: Wan-Animate supports these high-end capabilities within a single model to produce excellent animations.
  • Advanced facial expression and body motion replication: It supports the accurate replication of facial expressions and body movements.
  • Spatially-aligned skeleton signals: This feature ensures precise movement control for realistic character animations.
  • Implicit facial feature mapping: It enables the automatic mapping of facial features for natural expressions.
  • Environmental consistency preservation: The Relighting LoRA module maintains the lightning and environmental details to match the original video's tone.
  • Support for multiple video resolutions: The model works well with video resolutions ranging from 480p to 720p.
  • Open-source accessibility: The model is open source, enabling community collaborations and development.

Best Use Cases

  • Content Creation: It is an excellent option to generate character animations for digital content and social media.
  • Game Development: It can easily create realistic character movements and expressions.
  • Virtual Production: It can be utilized to replace actors or animate characters in a video.
  • Educational Content: It can be used to animate characters for interactive learning assets.
  • Marketing: It can create engaging animated content for advertisements and promotions.
  • Virtual Reality: It can seamlessly generate realistic character animations for an immersive VR experience.

Prompt Tips and Output Quality

  • Input Video Quality: Use high-definition videos for best results and crisp motion tracking.
  • Reference Image Selection: Select clear, well-lit reference images for better outputs and natural character rendering.
  • Resolution Selection:
    • Use 720p for detailed animations and professional output
    • Choose 480p for faster processing
  • Prompt Writing: Provide detailed and specific action descriptions with clear environmental context for precise animations.
  • Mode Selection: Based on your desired output, you can choose 'animation' for character animation or 'replace' for subject replacement.

FAQs

How is Wan-Animate different from other animation models?

Wan-Animate can combine character animation and replacement capabilities within a single model to provide advanced environmental consistency, making it an excellent option for realistic animations.

What type of reference videos work best?

It is recommended to use high-definition videos with clear movement and good lighting for supreme results. Furthermore, Wan-Animate performs exceptionally well when it is provided with source videos having distinct facial expressions and body movements.

Can I control the randomness of animations?

Yes, using the seed parameter gives reproducible results; setting a specific seed value ensures consistent outputs across multiple runs.

Is Wan-Animate open-source?

Yes, Wan-Animate is available as an open-source model; hence, the developers can access and modify the code to suit their specific needs.

What's the recommended way to achieve the best animation quality?

If you combine HD input videos with 720p resolution output, share clear reference images, and provide detailed prompts describing the desired animation, these aspects work synergistically and render the best animation.