FaceSwap
Basic Swap

API for Basic 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

Basic Face Swap

Request URL

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

Body Parameters

ParameterTypeDescriptionRequired
srcimagefileYour image with exactly one faceYes*
targetimagefileYour desired image with exactly one faceYes*
enhancestringEither 'true' or 'false'. Enhance the result after swap.Yes*

*Required parameters

Response

The API returns the processed image with the face swapped.

Response Content Type

application/json

Response Codes

CodeDescription
201Swap successful
400Bad request

Example

curl -X POST \
  http://aiapi.aiphotocraft.com/api/faceswap/basicswap \
  -H 'X-source: web' \
  -H 'X-api-key: YOUR_API_KEY' \
  -F 'srcimage=@/path/to/source.jpg' \
  -F 'targetimage=@/path/to/target.jpg' \
  -F 'enhance=true'