Replace a person in a video
replace_personReplace a person in a video with someone from a picture, keeping the scene, the camera and the moves: put the user into a trend clip, or swap two people for two others. The new video is as long as the video, in whole seconds, or as startSeconds to endSeconds of it: pass the part a clip plays, and only that part is charged. It answers at once with a Job ID and the media is made in the background: start every generation you need, keep working, then call wait_for_jobs with all their Job IDs to get each Asset ID for patch_film. Uses credits for each second of the video: about 0.11 credits a second at standard and about 0.15 credits a second at pro, so a 10-second clip uses 2 credits at standard.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"videoAssetId": "<videoAssetId>",
"startSeconds": "<startSeconds>",
"endSeconds": "<endSeconds>",
"references": "<references>",
"prompt": "<prompt>",
"quality": "<quality>",
"keepSound": "<keepSound>",
"projectId": "<projectId>"
},
"name": "replace_person"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| prompt | Yes | Who replaces whom. Call the video @Video1 and the pictures @Image1 to @Image4 in their order: "Replace the man on the left in @Video1 with the person in @Image1, and the woman on the right with the person in @Image2. Keep everything else the same." Up to 2000 characters. | |
| quality | Yes | standard for most videos. pro keeps faces, hands and fine detail sharper, and uses more credits. | |
| keepSound | Yes | null or true (the default) keeps the video's sound, such as the song of a dance trend. false makes the new video silent. | |
| projectId | Yes | The project this call runs on without changing the open project. null (or leaving it out) uses the open project. wait_for_jobs takes the projectId of the calls that started the jobs. | |
| endSeconds | Yes | Source second of videoAssetId where the part replace_person uses ends. null for both uses the whole video. | |
| references | Yes | 1 to 4 pictures of the people to put in, in this order, each in one of these forms: asset:ID, an image asset as it is; asset:ID#t=14.6, the frame of a video asset at 14.6 seconds; film:#t=3.2, the frame of the edit at 3.2 seconds. Use the IDs search_assets gives. A face and clothes come from the picture. | |
| startSeconds | Yes | Source second of videoAssetId where the part to use starts, with endSeconds: the part a clip plays (its offset to offset + duration). Only that part is sent and charged. null for both uses the whole video. | |
| videoAssetId | Yes | The video to recast: a ready video asset at least 720 pixels on each side. What is recast (the whole video, or startSeconds to endSeconds of it) is 3 to 10 seconds. |