Skip to content
Models

Character Swap API: Put Your Character in Any Clip

A character swap API: turn the people in a clip into your own characters, outfit included, with the motion and sound kept. Requests, limits and cost.

Updated 4 min read

A character swap API turns the people in a clip into characters you choose: their face and their outfit, on the moves, the lips, the scene and the sound of the original. On Frameport it is one request to Frameport Replace 1 with "keep_outfit": false, for up to four people per clip, from $0.12 per second of clip, charged only if the edit succeeds.

This page explains how a character swap differs from a face swap, makes a character with an image model, swaps it into a clip in curl, Python and Node, puts several characters in one shot, and lists the limits and the cost.

Character swap vs face swap

Both are the same edit on POST /v1/videos/edits; one field tells them apart:

Face swapCharacter swap
keep_outfittrue, the defaultfalse
The faceFrom your pictureFrom your picture
The clothesThe clip'sAs in your picture
Moves, lips, scene, soundKeptKept
PricePer second of clipThe same

A face swap puts a new face on the person in the clip and leaves them dressed as they were. A character swap dresses each person as in their picture too, so the character arrives whole: a costume, a uniform, a look. The face swap video API guide covers the face-only edit in detail.

Make the character first

The character is a picture: a photo you have the right to use, or one you generate. Frameport Image 3 is our image model for clean, photoreal characters, at $0.025 an image. Since a character swap takes the outfit from the picture, show the clothes as well as the face: a three-quarter or full-length shot, facing the camera, in even light.

POST /v1/images/generations
{
  "model": "fp-image-3",
  "prompt": "Full-length photo of a woman in a red mountaineering jacket and black trousers, standing facing the camera, plain grey studio background, soft even light",
  "n": 4,
  "aspect_ratio": "3:4"
}

Four takes cost $0.10. Keep the one you like: its file_… id goes straight into the swap, with nothing to download or upload.

Swap it into a clip with the character swap API

One request: the clip, the character's picture in faces, and "keep_outfit": false. This example generates the character, then swaps it into a clip hosted at a public URL:

# 1. Generate the character, then poll GET /v1/images/generations/{id}
curl https://frameport.ai/v1/images/generations \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "fp-image-3",
    "prompt": "Full-length photo of a woman in a red mountaineering jacket and black trousers, standing facing the camera, plain grey studio background, soft even light",
    "aspect_ratio": "3:4"
  }'

# 2. Swap her into the clip with the image's file id
curl https://frameport.ai/v1/videos/edits \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "model": "fp-replace-1",
    "video": "https://example.com/hike.mp4",
    "faces": ["file_8Hc2RkQw5ZpT1mVb7nXe3L"],
    "keep_outfit": false
  }'

# 3. Poll until "status" is "succeeded", then download outputs[0].url
curl https://frameport.ai/v1/videos/edits/$GENERATION_ID \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY"
202 Accepted, for an 8-second clip
{
  "id": "gen_6Pq3WnT8vXc1Lm5Rk9YbZs",
  "object": "generation",
  "type": "video",
  "model": "fp-replace-1",
  "status": "queued",
  "input": {
    "video": "url",
    "resolution": "768p",
    "faces": 1,
    "keep_outfit": false,
    "duration": 8
  },
  "reserved_usd": 0.96,
  "cost_usd": null,
  "outputs": [{ "id": "file_3Vb8KqW2nTx7Lc5Rm1YdPs", "status": "queued" }],
  "error": null,
  "created_at": "2026-11-28T10:00:00.000Z",
  "completed_at": null
}

A clip on your disk goes up through uploads first, and a clip you generated on Frameport goes in by its file id. Without resolution, the result is 768p; add "resolution": "1080p" for 1080p.

Several characters in one shot

Up to four people in a clip can each become a character. Send one picture per person, left to right, and say in targets who each one replaces, in the same order:

POST /v1/videos/edits
{
  "model": "fp-replace-1",
  "video": "https://example.com/two-dancers.mp4",
  "faces": ["file_8Hc2RkQw5ZpT1mVb7nXe3L", "file_2Tn7XcQ9vLm4Ra8Ws1KbZd"],
  "targets": ["the dancer on the left", "the dancer on the right"],
  "keep_outfit": false,
  "resolution": "1080p"
}

targets is required with two pictures or more: one short description per picture, up to 200 characters each, of the person as the clip shows them. keep_outfit applies to everyone in the edit. An optional prompt, up to 500 characters, adds a note on the edit. The price stays the clip's seconds, whatever the number of characters.

Limits and what gets refused

  • The clip: 2 to 10 seconds, MP4 or MOV, up to 64 MB, at 24 fps. A public https URL, a video upload or one of your video outputs.
  • The pictures: 1 to 4, PNG, JPEG or WebP, up to 10 MB each.
  • Off the limits: a clip the editor cannot take is refused with 400 invalid_video when you send it, and the message says what to fix, such as converting it to 24 fps; a missing or mismatched targets list is refused with 400 invalid_request. Neither costs anything.
  • The rules: everything you make must be fiction. Never anything involving minors, never a real, identifiable person without their consent, including faces from photos of private persons, and never impersonation or fraud. A request that breaks them answers 400 content_policy and costs nothing. The full text is the acceptable use policy.
  • The content filter: every workspace starts with it on. It reads the note and every target of an edit. With the filter off, Frameport Replace 1 applies no content filter of its own; the rules above still apply. The uncensored image generation API guide explains who can turn it off and how.

What a character swap costs

A character swap is billed like a face swap: the clip's seconds, rounded up to whole seconds, times the rate at the resolution. The character's picture is billed apart, if you generate it here.

Item768p1080p
A 5-second clip$0.60$1.25
An 8-second clip$0.96$2.00
A 10-second clip$1.20$2.50

A character image on Frameport Image 3 adds $0.025, and you make it once for as many clips as you like. The price of the longest clip, 10 seconds, is held when you submit and brought down to your clip's price once it is measured. It is charged when the edit succeeds; a failed edit gives the hold back. POST /v1/generations/quote with seconds gives the exact price before you send anything.

To keep one character across clips you generate rather than swap, see consistent character AI video.

FAQ

What is the difference between a character swap and a face swap?

One field. With keep_outfit at true, the default, only the face changes and the clothes stay the clip's. With false, each person is also dressed as in their picture, so the whole character comes through.

Is there a free character swap API?

The account, the key and quotes are free, and an edit that fails costs nothing. Edits are paid from a prepaid balance, topped up from $10, with no subscription. You can also try Frameport Replace 1 by hand first.

How do I swap a character into a video with Python?

Generate or upload the character's picture, then send POST /v1/videos/edits with the clip, the picture in faces and "keep_outfit": false, and poll GET /v1/videos/edits/{id}. The Python tab above does the whole workflow with requests.

How many characters can I put in one clip?

Up to four, one picture per person, left to right, with a targets entry for each saying who it replaces.

How much does a character swap cost?

$0.12 per second of clip at 768p and $0.25 at 1080p, so an 8-second clip at 768p costs $0.96, plus $0.025 for each character image you generate here.

Start building.

Your API key is free. Top up from $10 when you are ready.