Skip to main content
POST
The resources (image, video, voice) generated by our API are valid for 7 days. Please save the relevant resources as soon as possible to prevent expiration.
Face Swap Plus is a unified API that supports both image and video face swap.
  • Single Face Mode: No pre-detection required, just provide source and target URLs
  • Multi-Face Mode: Requires Face Detection API to get face_url and bbox for each face
  • For highest quality image face swap (single face only), use Face Swap Pro
  • Video Faceswap API is a V3 legacy API. For new projects, we recommend using this API instead

Features

Face Swap Plus supports advanced face swapping scenarios:
  • Image and Video: Unified API for both image and video face swap
  • Multi-Face: Swap multiple faces at once via face_mapping
  • Single Face Mode: Use single_face_mode for simplified single-face swap
  • Style Options: Choose between realistic, beautify, or lossless styles

Which API Should I Use?

Parameters

Core Parameters

Multi-Face Mode (default)

When single_face_mode is false (default), use face_mapping to define multiple source-target face pairs:

Single Face Mode

When single_face_mode is true, enables simplified single-face swap mode:

When is bbox required?

The bbox parameter in source_face_info and target_face_info depends on where face_url comes from: The crop_region from Face Detection API returns [x, y, width, height]. Convert it to bbox format [x1, y1, x2, y2]:
  • x1 = x, y1 = y, x2 = x + width, y2 = y + height

Image Face Swap

Example: Simple Single Face Image Swap

Example: Multi-Face Image Swap with face_urls (no bbox needed)

When using face_urls from the Face Detection API response, bbox is not required:

Example: Multi-Face Image Swap with original URLs (bbox required)

When using user-uploaded original image URLs, provide bbox from crop_region:

Video Face Swap

Video face swap is an async operation. Use webhookUrl or poll the Get Result API to check processing status.

Video Requirements

  • Duration: Keep videos under 60 seconds for optimal processing time
  • Format: MP4, MOV, AVI supported
  • Resolution: Higher resolution videos may take longer to process
  • Encoding: H.264 recommended
  • Face Count: For best results, limit to 8 or fewer faces

Example: Single Face Video Swap

Example: Multi-Face Video Swap

Example: Video Swap with Webhook


Checking Results

After submitting a face swap request, use the Get Result API to check the status:

Authorizations

x-api-key
string
header
required

Your API Key used for request authorization. If both Authorization and x-api-key have values, Authorization will be used first and x-api-key will be discarded.

Body

application/json
source_url
string
required

Source (new) face image URL

target_url
string
required

Target material URL (image or video)

webhookUrl
string

Callback URL for result notification

face_enhance
boolean
default:false

Whether to enable face enhancement (default false)

model_style
enum<string>
default:realistic

Model style: realistic (default), beautify, or lossless

Available options:
realistic,
beautify,
lossless
face_mapping
object[]

Face mapping array for multi-face swap (required when single_face_mode is false). Each item maps one source face to one target face.

single_face_mode
boolean
default:false

When true, enables single-face mode for simplified single-face swap. When false (default), uses face_mapping for multi-face swap.

Response

200 - application/json

Faceswap request submitted successfully

code
integer
required

Interface returns business status code (1000: success)

Example:

1000

msg
string
required

Interface returns status information

Example:

"OK"

data
object