namifusion

Realtime Face Swap API Guide: Live Camera & RTC Streams (2026)

7 min · Updated 2026-07-11 · By the NamiFusion team

Integrate realtime face swap into live camera and RTC streams using NamiFusion's REST API with SSE events: setup steps, desktop Playground, and pricing.

A realtime face swap API replaces faces in a live video feed — a webcam or an RTC stream — as it happens, instead of processing a file after the fact. NamiFusion ships this as a REST API authenticated with a Bearer API key, paired with a Server-Sent Events (SSE) stream for live status, plus a desktop Playground so you can validate quality before writing any code. Signup includes free credits, and usage is billed in credits at $1 = 100.

TL;DR

Swaps faces on live camera feeds and RTC streams, not just uploaded files.

REST submission with a Bearer API key; an SSE event stream reports status in real time.

A desktop Playground lets you test with your own camera before integrating anything.

Full protocol docs live in NamiFusion's on-site API store; keys are created at /api-keys.

Free signup credits to experiment; pay-as-you-go afterwards at $1 = 100 credits.

How does the realtime face swap API work?

The flow has three parts. First, you submit a session over REST, authenticated with your Bearer API key, telling NamiFusion which source face to apply. Second, you subscribe to the SSE event stream, which pushes status updates — session ready, processing, errors — the moment they happen, so you never poll blindly. Third, your live source (webcam or RTC stream) flows through the swap engine and comes out the other side with the face replaced.

The exact endpoints, session parameters, and event payloads are documented on the realtime face swap pages of the on-site API store, right alongside the rest of NamiFusion's 98+ marketplace models.

How do you set it up step by step?

1. Create a NamiFusion account — signup comes with free credits that are perfect for testing.

2. Generate an API key on the /api-keys page and store it securely; it goes in the Authorization header of every request.

3. Open the realtime face swap docs in the API store and read through the session lifecycle before coding.

4. Grab the desktop Playground and run a live test with your own camera — within minutes you will know whether the quality fits your use case.

5. Submit a session from your backend over REST with Bearer authentication.

6. Subscribe to the SSE event stream and drive your app's state from events instead of polling.

7. Connect your camera or RTC stream, verify the output, then move from test credits to a funded balance for production.

# Every request authenticates with the API key from /api-keys
curl -X POST "https://www.namifusion.com/api/v1/marketplace/run/<model_id>" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "input": {
      "face_image_url": "https://example.com/face.jpg"
    }
  }'

# Check task status; the realtime docs in the API store describe
# the SSE event stream for live session updates
curl "https://www.namifusion.com/api/v1/marketplace/run/tasks/<task_uuid>" \
  -H "Authorization: Bearer YOUR_API_KEY"

How much does the realtime face swap API cost?

Billing works like everything else on NamiFusion: credits, at $1 = 100. The free credits you receive at signup mean your first sessions and API calls cost nothing.

Marketplace models are priced in credits per call, with approximate dollar figures on each card, and the Playground is free to try. You top up credits as needed — there is no mandatory subscription tier — so costs grow linearly with usage and stay easy to budget.

What can you build with a realtime face swap API?

Live streaming is the obvious one: a streamer can broadcast with a different face, no 3D rig or motion capture needed. Video-chat apps can build in personas, and virtual production teams can preview a recast on set in real time instead of waiting for post.

Interactive installations and live events work well too. And because NamiFusion is unfiltered, adult-content creators can build on it without fighting a moderation layer. Whatever you build, get consent from the people involved — both on camera and in the source photo — and follow your local rules on synthetic media.

Desktop Playground or API: where should you start?

Start with the Playground. Without writing code, you can verify swap quality and perceived latency with your own camera and your own lighting in minutes — exactly the answers worth having before you invest engineering time.

Move to the API when you are embedding the capability into your own product. Both run the same engine, so what you see in the Playground is what production will look like. One rule worth repeating: keep the API key server-side — never ship it inside a client app.

What mistakes should you avoid when integrating?

Most failed integrations I have seen come down to three mistakes. First, shipping the API key inside a client app — always proxy through your own backend. Second, polling for status when the SSE stream already pushes it — you burn requests and still react more slowly. Third, skipping the desktop Playground and debugging quality issues in code, where lighting or camera problems masquerade as API bugs.

Also, test with the worst camera and lighting your users will realistically have, not with your best gear. A swap that holds up on a grainy laptop webcam in a dim room will look great everywhere else.

FAQ

Can I try the realtime face swap API for free?+

Yes. Signup comes with free credits, and together with the desktop Playground you can complete a first round of validation without entering a card.

Is there a watermark on the swapped stream?+

No. The output is clean, with no watermark, so it can go straight to your audience or into the downstream pipeline of your product.

Can I use it in a commercial product?+

Yes, embedding realtime face swap in a commercial product is fine. Securing likeness consent, and disclosing synthetic media where your jurisdiction requires it, is on you.

Does NamiFusion restrict NSFW use?+

No. NamiFusion is an unfiltered, uncensored engine and does not block NSFW use. You are still bound by local law and by the rules of whatever platform you stream to.

What latency and resolution can I expect?+

Real-world numbers depend on your stream setup and network. The fastest way to find out is to measure latency on your own hardware with the desktop Playground; the supported configurations are detailed in the realtime docs in the API store.