Skip to content
Comparisons

Best Face Swap API for Video: What to Look For

How to choose the best face swap API for video: people per clip, lips and motion kept, clip limits, consent rules, what a failed job costs, and a request.

Updated 7 min read

The best face swap API for video changes the faces and nothing else: each person keeps their movements, their lip sync, the scene and the original audio, and the provider tells you its clip limits, its consent rules and what a failed job costs before you build on it. On Frameport that job belongs to Frameport Replace 1, a clip editor that swaps up to four people in one clip through POST /v1/videos/edits, from $0.12 per second of clip, with nothing charged when an edit fails.

Below: a checklist to hold any provider to, how Frameport Replace 1 answers it, hosted API versus open-source code, consent, billing, and a two-face request to run as is.

Best face swap API checklist

What to checkWhy it mattersFrameport Replace 1
People per clipDuets and group shots need several swapsUp to 4, one picture each, matched in targets
What staysAnything redrawn is work for your editorMoves, lips, scene and sound; clothes too, by default
Published clip limitsYour app can check a file before upload2 to 10 seconds, MP4 or MOV up to 64 MB, 24 fps
Output sizesThe screen decides the size768p and 1080p
A clear refusalA bad clip should fail at once, for free400 invalid_video naming the limit, nothing held
Billing unitIt sets your marginsPer second of clip, one face or four
A failed jobRetries and refunds depend on itNothing charged: the hold goes back
Written rulesYour product inherits themThe acceptable use policy

Past a test, two more points count: an edit answers 202 at once and a webhook can report its end, and a workspace may start 60 jobs a minute with 20 running at once.

What separates a usable face swap API

It keeps the take

A swap that redraws the whole frame hands you a new clip, not yours. What you want back is the same performance: every gesture on its beat, the mouth on the words already spoken, the soundtrack as recorded. Frameport Replace 1 changes the faces you name and leaves the moves, the lips, the scene and the sound alone. People keep the clothes the clip shows them in; with "keep_outfit": false they wear what their picture shows, which makes it a character swap.

It handles everyone in the shot

Group scenes are where single-face tools stop. Here faces carries one picture per person, ordered left to right as they stand in the frame, and with two or more, targets says in plain words who each one replaces ("the man in the gray coat"). Four people can change in one edit.

It states its limits before you upload

An app should turn a clip away before sending it, not after a failed job. These limits are fixed: 2 to 10 seconds, an MP4 or MOV file of 64 MB at most, at 24 frames a second. A clip outside them gets 400 invalid_video naming the limit it missed, before anything is held. The clip rules list where a clip may come from: a public https address, an upload, or a video made on the same key.

It fits into a pipeline

The clip can be the file_… id of one of your outputs, so a rendered clip goes straight into the swap, and the result moves on the same way: a 1080p swap can be sharpened to 2K by Frameport Upscale 1. An Idempotency-Key header makes retries safe: the same key returns the first edit instead of paying for a second (idempotency).

Hosted API or open-source code you run yourself

Search GitHub for video face swap and you will find open-source projects that run on your own machine. They are a real option; the choice comes down to what you want to own:

  • Hardware. Running locally takes a GPU with enough memory, its drivers, and the time each batch needs. A hosted API runs the work elsewhere and bills each clip by its length.
  • Everything around the model. Decoding the video, matching faces frame by frame, keeping the frame rate, putting the audio back, encoding the file: local code leaves those steps to you, an API returns the finished clip.
  • Licenses. Each project and set of model weights carries its own license, and some limit commercial use.
  • Control and storage. Local code keeps every frame on your hardware. With a hosted API the clip travels to the provider, so ask how long it keeps files. Here, an output's signed link opens for about an hour, another workspace's key cannot read it, and files are not kept forever.

Without code at all, a private AI studio runs eroq Replace Pro in the browser, on credits: it puts your character in place of the people in a clip.

A local project can be enough for a prototype on your own footage. A product that takes clips from its users usually wants published limits, a written policy and a price per clip instead of upkeep.

No API can tell whether the person in a photo agreed. A provider can write down what it forbids, refuse what its checks catch, and hold its customers to the rest: look for all three.

On Frameport, the acceptable use policy covers every edit, whatever the workspace settings:

  • Fiction only, for the clip you send, the faces you send and the clip you get back.
  • No minors, in any role.
  • No real person who can be recognized unless they agreed, and a face taken from a private person's photo counts.
  • Nothing unlawful where you or your users are, impersonation, fraud, threats and harassment included, and no tricks to slip past the filter or a model's refusals.

If your users upload the faces, you answer for what they make through your keys. Build the yes into your product: ask who is in the photo, record that they agreed, and refuse uploads that skip that step.

Every workspace also starts with its content filter on. For an edit it reads the note (prompt) and each targets entry, and refuses a match with 400 content_filtered before anything is held. An owner or admin who is 18 or older can turn it off in Settings, and the rules above stay either way (how that works). A request refused under the policy answers 400 content_policy and costs nothing.

Billing: per second, per face, on failure

Providers bill face swaps by the second, by the face, by the job, or through a subscription with a monthly allowance. Per second is the easiest to forecast: you know a clip's length before you send it.

Frameport Replace 1 bills the clip's seconds at the rate of the output resolution, rounded up to whole seconds after 0.15 s of grace, whatever the number of faces.

Clip length768p1080p
2 s$0.24$0.50
5 s$0.60$1.25
10 s$1.20$2.50

On submit, the price of the longest clip the model takes, 10 seconds, is held while your clip is fetched and measured; the hold then drops to your clip's own price, the reserved_usd of the 202. A success charges it, a failure releases it. To know the amount first, post {"model": "fp-replace-1", "seconds": 7.4} to POST /v1/generations/quote. The price rules give the details, and pricing explains the prepaid balance, topped up from $10.

A working request: two faces in one clip

Two musicians swapped in one clip at 1080p; the Idempotency-Key header lets you rerun the script without paying twice:

# 1. Submit: two faces, left to right, and who each one replaces
curl https://frameport.ai/v1/videos/edits \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: duet-take-3" \
  -d '{
    "model": "fp-replace-1",
    "video": "https://example.com/duet.mp4",
    "faces": ["https://example.com/face-left.jpg", "https://example.com/face-right.jpg"],
    "targets": ["the woman at the piano", "the man holding the guitar"],
    "resolution": "1080p"
  }'

# 2. Poll with the id it returns until "succeeded" or "failed", then download outputs[0].url
curl https://frameport.ai/v1/videos/edits/$GENERATION_ID \
  -H "Authorization: Bearer $FRAMEPORT_API_KEY"
202 Accepted, an 8-second clip (abridged)
{
  "id": "gen_6Pq3WnT8vXc1Lm5Rk9YbZs",
  "object": "generation",
  "type": "video",
  "model": "fp-replace-1",
  "status": "queued",
  "input": {
    "video": "url",
    "resolution": "1080p",
    "faces": 2,
    "targets": ["the woman at the piano", "the man holding the guitar"],
    "keep_outfit": true,
    "duration": 8
  },
  "reserved_usd": 2,
  "cost_usd": null,
  "outputs": [{ "id": "file_3Vb8KqW2nTx7Lc5Rm1YdPs", "status": "queued" }],
  "error": null
}

duration is the measured clip in billed seconds. The edits reference lists every field; the face swap video API guide adds uploads from disk and clip preparation with ffmpeg.

The full price grid is in face swap API pricing for video.

FAQ

What is the best face swap API for video?

The one that keeps the take (movement, lip sync, scene and sound), handles everyone in your shot, publishes its limits and rules, and charges nothing for a failed job. Frameport Replace 1 is built around those points.

Is there a free video face swap API?

There is no charge to sign up, make a key or ask for a quote, and a refused clip or a failed edit is never billed. Edits are paid by the second from a prepaid balance with no subscription, and a test run in the browser needs no code.

Should I run an open-source face swap from GitHub instead?

It depends on what you want to maintain. A project on your own GPU gives you full control and keeps the footage on your machine, and leaves you the hardware, the frame rate and audio handling, and the license checks. A hosted API trades that upkeep for a price per second.

How many people can one face swap request replace?

Up to four, one picture each, ordered left to right, plus a targets entry for each when there are two or more. The price stays the same whatever the number.

Does a face swap API need the person's consent?

Yes. The acceptable use policy forbids swapping in a real, identifiable person who has not agreed, faces from private persons' photos included, with the filter on or off. If your users upload faces, collect that consent in your product: you answer for what they make through your keys.

Can I swap faces without writing code?

Yes: the Studio runs the same edit from the same balance, and the no-code guide shows each step.

Start building.

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