Models/Face Swap

Face Swap API — Image and Video

Live2 models

Muapi's face swap API replaces a face in an existing image or video with a face from a source photo, preserving lighting, expression, and skin tone. One REST call, the same submit-and-poll pattern as every other model on the platform, from $0.02 per generation.

MuapiImage

AI Image Face Swap

Swaps a face from a source photo onto a target image. Advanced facial recognition and blending preserve skin tone, lighting, and facial geometry.

Two images in
$0.02 / generation
Try Model
MuapiVideo

AI Video Face Swap

Replaces a face throughout a video with a source photo, frame by frame. Accurate expression transfer and lighting consistency across the whole clip.

Image + video in
~$0.10 / sec
Try Model

What is a Face Swap API?

A face swap API takes a source photo of a face and an existing image or video, then replaces the face in that target with the source face — preserving lighting, expression, and skin tone so the result reads as a natural photo or clip rather than a crude composite.

Muapi exposes this through two endpoints: AI Image Face Swap for still images and AI Video Face Swap for video, frame by frame — one API key, one request/poll flow, pay-as-you-go pricing.

Image Face Swap vs. Video Face Swap

AI Image Face Swap takes a swap_url (the source face) and an image_url (the target scene), and returns a single composited image at a flat $0.02 per generation — useful for memes, avatars, and one-off photo edits. AI Video Face Swap takes an image_url (the source face this time) and a video_url (the target clip), and replaces the face across every frame — priced by video length, roughly $0.10 per second in practice. Note the parameter names swap meaning between the two endpoints — image_url means "target" on the image endpoint but "source face" on the video endpoint — so double-check field mapping when switching between them.

Key Capabilities

Image and Video Coverage

AI Image Face Swap handles still photos; AI Video Face Swap replaces a face across every frame of a clip.

Multi-Face Targeting

Both endpoints accept 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 or scene.

Gender Filtering (Video)

AI Video Face Swap accepts a target_gender filter (All/Female/Male) to control which faces in a multi-person clip get swapped.

Lighting and Expression Preservation

Both models preserve the target's lighting, skin tone, and facial geometry (image) or expression and frame-by-frame consistency (video) rather than pasting a flat cutout.

Pair with Lipsync

Combine a video face swap with Muapi's lipsync models to both replace the face and re-sync the mouth to new audio in one pipeline.

Pay Per Generation

No subscription or minimum commitment — $0.02 flat for image face swap, roughly $0.10/sec for video face swap.

Input Requirements

  • Image face swap: both the target image and the source face image must be 2048px or smaller on each side.
  • Video face swap: the target video must be under 10MB, resolution below 1280×720 (or 720×1280 portrait), and no more than 600 frames.
  • 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.

Consent and Responsible Use

Face swap generates a likeness-based image or video 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 Face Swap API

  1. Host your images/video. Upload via POST /api/v1/upload_file, or use any publicly reachable URL.
  2. Submit the request. POST /api/v1/ai-image-face-swap or POST /api/v1/ai-video-face-swap, matching the field names to the correct endpoint.
  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 Face Swap API?

Muapi's face swap API replaces a face in an existing image (AI Image Face Swap) or video (AI Video Face Swap) with a face from a source photo, via two REST endpoints.

How much does face swap cost?

AI Image Face Swap is a flat $0.02 per generation. AI Video Face Swap is priced by video length, roughly $0.10 per second in practice.

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

Yes — both endpoints accept a target_index (0 = largest detected face, 1 = next largest). AI Video Face Swap additionally accepts a target_gender filter (All/Female/Male).

What are the input limits?

Image face swap: both images must be 2048px or smaller per side. Video face swap: the target video must be under 10MB, resolution below 1280×720 (or 720×1280 portrait), and no more than 600 frames.

Whose photos am I allowed to submit?

Only photos of people who consented to being used this way — yourself, a model under a 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.

Can I get Face Swap API access right now?

Yes. Sign up at muapi.ai, create an API key from your dashboard, and start calling either endpoint immediately — no waitlist required.