Swap Video Characters
swap_video_charactersSwap a person or character in an existing video for someone new from reference photos or saved Characters, keeping the original motion, camera, cuts and audio. The engine is Seedance 2.5 (Pro): pass video_model=video/seedance-2.5 or omit it. Lite (video/wan-3.0) and Kling 4.0 (video/kling-4.0-omni) are not supported for swaps; asking for them returns an error and nothing else is used in their place.
Supply video_url, a direct video file of at least 4 seconds; a clip longer than 30 seconds is cut to its first 30 seconds and the card tells the user. Sizes and frame rates the engine cannot take are fitted automatically. Social post links (TikTok, YouTube, Instagram, X and others) are not video files: import them first with upload_asset and pass the returned URL. Also supply image_urls or character_ids, up to 8 together. A reference photo can contain several replacement people. Use instructions to map each source person to the right person within each photo, for example the crowned king becomes the man on the left of Image 1 and the gnome becomes the man on its right. State who stays unchanged and which face, hair, clothing or visual details to change or preserve. Clear user instructions take precedence over default casting; extra photos do not require extra replacements.
Before any paid render, the swap picks three or six frames and shows the new character in each as image previews, free of charge (up to 60 preview images a day per account, and 12 free preview changes per swap). Resolution: 480p (default) renders a native draft; 720p or 1080p render that resolution directly. The price is per second of the (cut) source video.
Supports Review mode: the card shows the previews and the price and waits for the user to press Generate video; in Auto mode the render starts once all previews are ready. While a swap waits in Review, the result includes a review link (approvalUrl) to show the user when the card is unavailable; never open it or approve for the user. The result's session_id is the swap's ID: check progress with check_job using it as job_id (once; the card updates itself), and change one preview with update_video_workflow. Use only footage and photos the user has the right to use, of people who agreed to appear; never to impersonate, deceive or harass a real person. Starting again with the same inputs within 10 minutes returns the same swap instead of a new one, so a retry does not repeat the work or any charge. Do not call generate_video for the same swap.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "swap_video_characters"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| review | No | Pass true only when the user asks to check the previews before rendering: it keeps the Review step even if the account renders in Auto mode. Omit it otherwise; the account setting applies. | |
| video_url | No | Direct video file URL, at least 4 seconds. Up to 30 seconds is used; longer sources are cut. Import social post links with upload_asset first. | |
| image_urls | No | Reference photos. One photo may contain several replacement people; describe which person in each photo replaces which person in the source video. | |
| resolution | No | 480p (default) renders a native draft that can be rendered at 1080p later from the card; 720p or 1080p render that resolution directly. | |
| skills_used | No | Optional workflow analytics: names of the skills (or skill/reference paths) followed for this call. Stored with generation jobs only. Never include private data, local paths or media URLs. | |
| video_model | No | video/seedance-2.5 (default, Pro): up to 30 seconds of input video and 8 combined references. video/wan-3.0 and video/kling-4.0-omni are not supported for swaps and return an error. | |
| instructions | No | Describe the edit in your own words: who in the video becomes whom, including left/right or clothing descriptions within group photos, who stays unchanged, and any requested face, hair, clothing or other visual changes. Explicit instructions guide the previews and video; extra photos do not require extra replacements. | |
| character_ids | No | Saved Characters to swap in; their images count toward the 8 references. |