POST
/
deepfake
/
multiple_face_swap
Multiple face swap in image
curl --request POST \
  --url https://modelslab.com/api/v6/deepfake/multiple_face_swap \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "init_image": "<string>",
  "target_image": "<string>",
  "watermark": true,
  "base64": false,
  "webhook": "<string>",
  "track_id": 123
}'
{
  "status": "success",
  "generationTime": 123,
  "id": 123,
  "output": [
    "<string>"
  ],
  "proxy_links": [
    "<string>"
  ],
  "meta": {
    "init_image": "<string>",
    "target_image": "<string>",
    "reference_image": "<string>",
    "seed": 123,
    "temp": "<string>",
    "file_prefix": "<string>",
    "model_save_format": "<string>",
    "watermark": "<string>",
    "watermark_image": "<string>"
  }
}

Request

Make a POST request to below endpoint and pass the required parameters in the request body.
curl
--request POST 'https://modelslab.com/api/v6/deepfake/multiple_face_swap' \

Body

json
{  
    "key": "your_api_key",  
    "init_image":"https://i.pinimg.com/564x/4c/6a/d0/4c6ad0f74a3a251344cb115699a9a7c9.jpg",  
    "target_image":"https://i.pinimg.com/564x/11/ac/0d/11ac0ddaf6962e395f30abc61043393e.jpg",  
    "base64":false,
    "webhook": null,  
    "track_id": null
} 

Body

application/json
key
string
required

Your API Key used for request authorization

init_image
string<uri>
required

The initial image that contains the faces to be swapped

target_image
string<uri>
required

The target image that contains the faces to replace those in the initial image

watermark
boolean
default:true

Indicates if the generated result should include a watermark

base64
boolean
default:false

Input image is base64 format

webhook
string<uri> | null

A URL to receive a POST API call once the image generation is complete

track_id
integer | null

An ID included in the webhook response to identify the request

Response

Face swap response

status
enum<string>
Available options:
success
generationTime
number

Time taken to generate the result in seconds

id
integer

Unique identifier for the generation request

output
string<uri>[]

Array of URLs to the generated images

Array of proxy URLs for the generated images

meta
object

Metadata about the generation process and parameters used