ryla_generate_video_swap
Swap a character into an existing video. Pro plan and the account 18+ confirmation required. videoUrl must be a video you already uploaded to your RYLA account; use ryla_list_characters to find a characterId and ryla_video_swap_cost for the price first. Returns a jobId; poll with ryla_video_swap_status.
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": {
"characterId": "<characterId>",
"videoUrl": "<videoUrl>"
},
"name": "ryla_generate_video_swap"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | preserve (default) keeps the clip and swaps the person; recreate regenerates the shot | |
| trim | No | Trim range [startSeconds, endSeconds] | |
| voice | No | Voice track for the output. Omit or source "original" keeps the clip audio (free). source "character": the influencer speaks `text` in her saved voice (needs a voice set on the character). source "tts": the ElevenLabs `voiceId` speaks `text`. tts and character ADD credits by text length (voice-note tiers); quote it with ryla_video_swap_cost (pass voice and characterId). source "upload": your own audio via `audioKey` with rightsConfirmed true; only when enabled for the account. Other sources are not available yet. A voice needs the fast openjutsu engine (short keep-the-original clips, no background change) and is refused otherwise; it is never silently dropped. | |
| target | No | Which person to swap in a clip with several people: the centre of their face at frameS seconds, x and y as 0..1 of the frame (x right, y down). Get it from ryla_video_swap_people (box centre = x + w/2, y + h/2). Omit for a one-person clip. Needs the fast keep-the-original swap (short clip, no background change), no custom voice, and is only available when enabled for the account; otherwise it is refused before any charge. If the person is not found or the result does not match them, the job fails with a refund. | |
| videoUrl | Yes | URL of the source video (must be a RYLA-hosted storage URL you own) | |
| resolution | No | Output resolution | |
| sourceType | No | Source type (default upload) | |
| characterId | Yes | Character UUID whose face is swapped into the video | |
| audioSetting | No | origin keeps the source audio, auto generates new audio | |
| outfitPrompt | No | Outfit description, used only when outfitEnabled is true | |
| outfitEnabled | No | Change the outfit | |
| backgroundPrompt | No | Background description, used only when backgroundEnabled is true | |
| backgroundEnabled | No | Change the background | |
| seedanceResolution | No | Recreate mode output resolution | |
| recreateDescription | No | Recreate mode only: the scene to restage the clip as |