Skip to main content

Request

Make a POST request to below endpoint and pass the required parameters in the request body.
curl
--request POST 'https://modelslab.com/api/v1/enterprise/faceswap/single_face_swap' \

Body

json
{    
    "key":"enterprise_api_key",    
    "init_image":"https://assets.modelslab.ai/generations/f139a3a7-1c64-4255-a53d-5b1c2a14b564",    
    "target_image":"https://assets.modelslab.ai/generations/f139a3a7-1c64-4255-a53d-5b1c2a14b564",    
    "reference_image":"https://assets.modelslab.ai/generations/f139a3a7-1c64-4255-a53d-5b1c2a14b564",    
    "base64":false,
    "webhook": null,    
    "track_id": null
}

Body Attributes

key
string
required
Your API Key used for request authorization.
init_image
string
required
The first image containing the face to be swapped. (URL string)
target_image
string
required
The second image containing the face to replace the face in the initial image. (URL string)
reference_image
string
required
The reference image of the particular face you want to swap from the init image. (URL string)
watermark
bool
default:"true"
Whether the generated result should have a watermark. Available options: true, false
watermark_image
string
The image to use as a watermark. If not provided, a default watermark will be used. Parameter is only used if watermark is set to true.
base64
boolean
default:"false"
If provided init_image is in base64 format or if you want generated images as base64 string, set to true. Default: false.
webhook
string
Provide a URL to receive a POST API call once the image generation is complete.
track_id
string
This ID is included in the webhook API call to identify the request.