Models/Image Face Swap

Image Face Swap API

LiveFree to test

Muapi's image face swap API replaces a face in an existing photo with a face from a source image, preserving lighting, skin tone, and facial geometry. One REST call, flat $0.02 per generation, no content filter on the output. Test it for free first with a sandbox key.

Watch: Free, Unlimited Face Swap API (Image + Video, Uncensored)

What is an Image Face Swap API?

An image face swap API takes a source photo of a face and a target photo, then replaces the face in the target with the source face — blending skin tone, lighting, and facial geometry so the result reads as a real photo, not a crude cutout composite.

Muapi exposes this as a single endpoint, ai-image-face-swap: one API key, one request/poll flow, $0.02 flat per generation, and no moderation filter applied to the output. Need to swap a face across a whole video instead of a single photo? See the Video Face Swap API.

Key Capabilities

Two-Image Input

Takes a swap_url (the source face) and an image_url (the target scene) — one API call returns the composited result.

Multi-Face Targeting

Accepts a target_index — 0 swaps the largest detected face, 1 targets the next, so you can pick which face to replace in a group photo.

Lighting and Geometry Preservation

Preserves the target's lighting, skin tone, and facial geometry rather than pasting a flat cutout.

No Content Filter

Output isn't run through a moderation filter — uncensored by default, same as every other Muapi generation endpoint.

Free Sandbox Testing

Create a key with is_test:true and every call returns a mock result instantly, at no cost, with no cap on call volume — swap to a real key when you're ready to go live.

Pay Per Generation

No subscription or minimum commitment — $0.02 flat per real generation.

Input Requirements

  • Both images — target scene and source face — must be 2048px or smaller on each side.
  • Use a clear, front-facing source photo. Good lighting and an unobstructed face give the model the cleanest reference for blending.
  • Expect some iteration on complex scenes. Extreme angles, heavy occlusion, or very small faces in the target reduce swap quality — test before batch-processing.

Other Ways to Swap Faces on Muapi

ai-image-face-swap is the cheapest and most literal option — $0.02, dedicated to exactly one job. General-purpose editing models can also do a face swap via a multi-image instruction prompt (e.g. "put this person's face into this photo"), and can combine the swap with other edits — outfit, pose, background — in the same request, at a higher per-generation cost:

Need the same face to appear consistently across brand-new generated images or video, instead of swapping into an existing one? See the AI Character Consistency API.

Example Prompts for General-Purpose Editors

On any of the multi-image editors above, pass the source face and target photo as the two input images, and use a prompt like:

"Replace the face in the second image with the face of the person from the first image. Preserve the exact facial features, structure, hairstyle, and expression of the source face, while keeping the target's lighting, skin tone, pose, and background unchanged."

State which image supplies the face and which supplies the scene explicitly — most failed swaps on general editors come from a missing lighting/angle match instruction, not the face itself.

Consent and Responsible Use

Image face swap generates a likeness-based image of whoever appears in the source photo. Only submit photos of people who have agreed to be used this way — yourself, a hired model under a release, or a customer who explicitly opted in to a face-swap feature. Do not use someone else's likeness without their permission, and do not use this endpoint to impersonate a real person without consent. Muapi does not verify consent on your behalf — that responsibility sits with the API caller, consistent with the platform's general terms of use.

How to Call the Image Face Swap API

  1. Host your images. Upload via POST /api/v1/upload_file, or use any publicly reachable URL.
  2. Submit the request. POST /api/v1/ai-image-face-swap.
  3. Poll for completion. Check GET /api/v1/predictions/{request_id}/result until status is completed, then download the output.
curl -X POST https://api.muapi.ai/api/v1/ai-image-face-swap \
  -H "Content-Type: application/json" \
  -H "x-api-key: YOUR_API_KEY" \
  -d '{
    "image_url": "https://example.com/target-scene.jpg",
    "swap_url": "https://example.com/source-face.jpg"
  }'
import requests

response = requests.post(
    "https://api.muapi.ai/api/v1/ai-image-face-swap",
    headers={"x-api-key": "YOUR_API_KEY"},
    json={
        "image_url": "https://example.com/target-scene.jpg",
        "swap_url": "https://example.com/source-face.jpg",
    },
)
request_id = response.json()["request_id"]

result = requests.get(
    f"https://api.muapi.ai/api/v1/predictions/{request_id}/result",
    headers={"x-api-key": "YOUR_API_KEY"},
)
print(result.json())

Frequently Asked Questions

What is the Image Face Swap API?

Muapi's image face swap API replaces a face in an existing photo with a face from a source image via a single REST endpoint, ai-image-face-swap.

How much does it cost?

A flat $0.02 per generation. Sandbox keys (is_test:true) are free and uncapped for testing — mock output only, no real charge.

Is the output censored or filtered?

No — the endpoint doesn't run output through a content filter, same as Muapi's other generation endpoints. Responsible, consented use is still on the API caller.

Can I choose which face gets swapped in a group photo?

Yes — the endpoint accepts a target_index (0 = largest detected face, 1 = next largest).

What are the input limits?

Both the target and source images must be 2048px or smaller per side.

I need to swap a face in a video, not a photo — is that the same endpoint?

No — video needs a separate endpoint, ai-video-face-swap, priced by video length. See the Video Face Swap API page.

Whose photos am I allowed to submit?

Only photos of people who consented to being used this way — yourself, a model under release, or an opted-in customer. Do not submit someone else's likeness without permission, and do not use this to impersonate a real person without consent.