FaceSwap
Swap One from Two

API for Swap One from Two Face Swapper

Authentication

An API key is required for all requests. You can generate an API key from the developers tab in your dashboard.

Header Attributes

ParameterValue
X-sourceweb
X-api-keyYOUR_API_KEY

Swap One from Two

Request URL

MethodURL
POSThttp://aiapi.aiphotocraft.com/api/faceswap/swap1from2 (opens in a new tab)

Body Parameters

ParameterTypeDescriptionRequired
srcimagefileSource image for swap having 2 facesYes*
targetimage1fileFirst target image for swap having 1 faceYes*
targetimage2fileSecond target image for swap having 1 faceYes*

*Required parameters

Response

The API returns the processed image with two faces from the source image swapped with the faces from the two target images.

Response Content Type

application/json

Response Codes

CodeDescription
201Swap successful
400Bad request

Example

curl -X POST \
  http://aiapi.aiphotocraft.com/api/faceswap/swap1from2 \
  -H 'X-source: web' \
  -H 'X-api-key: YOUR_API_KEY' \
  -F 'srcimage=@/path/to/source.jpg' \
  -F 'targetimage1=@/path/to/target1.jpg' \
  -F 'targetimage2=@/path/to/target2.jpg'