Models/Face Swap API

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. Use one REST API and the same submit-and-poll pattern as every other model.

2 of 2 models
MuapiImage

AI Image Face Swap

Swap a face from a source photo onto a target image while preserving lighting and facial geometry.

Image or video in, edited media out
$0.02/generation
Try Model
MuapiVideo

AI Video Face Swap

Replace a face throughout a video frame by frame with consistent expression and lighting.

Image or video in, edited media out
~$0.10/sec
Try Model

What Is a Face Swap API?

A face swap API takes a source face photo and an existing image or video, then replaces the target face while preserving lighting, expression, and skin tone.

Muapi exposes separate image and video endpoints with one API key, one request-and-poll flow, and pay-as-you-go pricing.

Key Capabilities

Image and Video Coverage

Use the image endpoint for still photos and the video endpoint for frame-by-frame replacement.

Multi-Face Targeting

Use target_index to select which detected face should be replaced in a group image or scene.

Video Gender Filtering

The video endpoint supports target_gender filtering for multi-person footage.

Lighting and Expression Preservation

The models blend the source identity into the target while retaining target lighting and motion.

Pair with Lipsync

Combine a face swap with a lipsync model to replace the face and synchronize speech in one workflow.

Pay Per Generation

Image face swap is $0.02 per generation; video face swap is priced by video length.

Face Swap Model Comparison

ModelInputPriceBest For
AI Image Face SwapTwo images$0.02/generationPhotos, memes, and avatars
AI Video Face SwapImage + video~$0.10/secFrame-by-frame video replacement

The two endpoints use different field meanings. Check the model schema carefully when switching between image and video face swap.

How to Call the Face Swap API

  1. Host your media. Upload through POST /api/v1/upload_file or use publicly reachable image and video URLs.
  2. Choose the endpoint. Use ai-image-face-swap for a target image or ai-video-face-swap for a target video.
  3. Submit the request. Pass the source and target fields required by the selected endpoint, including optional target selection.
  4. Poll and download. Poll GET /api/v1/predictions/{request_id}/result until completed, then persist 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?

It replaces a face in an existing image or video with a face from a source photo through two REST endpoints.

How much does face swap cost?

Image face swap costs $0.02 per generation. Video face swap is priced by duration, roughly $0.10 per second in practice.

Can I choose which face gets swapped?

Yes. Both endpoints accept target_index, and the video endpoint also supports target_gender filtering.

What input limits apply?

Use clear, front-facing source images and check the selected model's Playground schema for media size, resolution, and frame limits.

Whose photos can I submit?

Only submit photos of people who have consented to this use. Do not use another person's likeness to impersonate them without permission.