Wan 2.2 VACE Fun Inpainting (Image-to-Video)
A video generation model that combines a source image, mask, and reference video to produce prompted videos with precise source control.
Setup your API Key
If you don’t have an API key for the AI/ML API yet, feel free to use our Quickstart guide.
How to Make a Call
API Schemas
Video Generation
This endpoint creates and sends a video generation task to the server — and returns a generation ID.
URL to the source video file. Required for inpainting
URL to the source mask file. Required for inpainting
URL to the guiding mask file. If provided, the model will use this mask as a reference to create masked video using salient mask tracking. Will be ignored if mask_video_url is provided
The text description of the scene, subject, or action to generate in the video.
The description of elements to avoid in the generated video.
letterboxing, borders, black bars, bright colors, overexposed, static, blurred details, subtitles, style, artwork, painting, picture, still, overall gray, worst quality, low quality, JPEG compression residue, ugly, incomplete, extra fingers, poorly drawn hands, poorly drawn faces, deformed, disfigured, malformed limbs, fused fingers, still picture, cluttered background, three legs, many people in the background, walking backwardsNumber of frames to generate.
81Whether to match the input video's frames per second (FPS).
Frames per second of the generated video.
16Varying the seed integer is a way to get different results for the same other request parameters. Using the same value for an identical request will produce similar results. If unspecified, a random number is chosen.
An enumeration where the short side of the video frame determines the resolution.
autoPossible values: The aspect ratio of the generated video.
autoPossible values: Number of inference steps for sampling. Higher values give better quality but take longer.
30Classifier-free guidance scale. Controls prompt adherence / creativity.
5Noise schedule shift parameter. Affects temporal dynamics.
5Array of image URLs (2-4 images) for multi-image-to-video generation.
URL of the image to be used as the first frame of the video.
A direct link to an online image or a Base64-encoded local image to be used as the last frame of the video.
If set to true, the safety checker will be enabled.
Whether to enable prompt expansion.
Whether to preprocess the input video.
Acceleration to use for inference.
regularPossible values: The quality of the generated video.
highPossible values: The method used to write the video.
balancedPossible values: Number of frames to interpolate between the original frames.
Temporal downsample factor for the video.
The minimum frames per second to downsample the video to.
The minimum frames per second to downsample the video to.
15The model to use for interpolation. Rife, or film are available.
filmPossible values: The synchronization mode for audio and video. Loose or tight are available.
Successfully generated video
Successfully generated video
Fetch the video
After sending a request for video generation, this task is added to the queue. This endpoint lets you check the status of a video generation task using its id, obtained from the endpoint described above.
If the video generation task status is complete, the response will include the final result — with the generated video URL and additional metadata.
Successfully generated video
Successfully generated video
Full Example: Generating and Retrieving the Video From the Server
The code below creates a video generation task, then automatically polls the server every 10 seconds until it finally receives the video URL.
Last updated
Was this helpful?