Skip to main content
POST
/
api
/
portrait
/
editing
/
ai-face-swap
AI Face Swap
curl --request POST \
  --url https://www.ailabapi.com/api/portrait/editing/ai-face-swap \
  --header 'Content-Type: multipart/form-data' \
  --header 'ailabapi-api-key: <api-key>' \
  --form image_target='@example-file' \
  --form image_template='@example-file'
{
  "request_id": "",
  "log_id": "",
  "error_code": 0,
  "error_code_str": "",
  "error_msg": "",
  "error_detail": {
    "status_code": 200,
    "code": "",
    "code_message": "",
    "message": ""
  },
  "task_type": "async",
  "task_id": ""
}

Authorizations

ailabapi-api-key
string
header
required

API Key for authentication

Body

multipart/form-data
image_target
file
required

The image to be modified. The face in this image will be replaced.

  • Image format: JPEG JPG PNG
  • Image size: No more than 5 MB.
  • Image resolution: Less than 4096x4096px.
image_template
file
required

The image that provides the face to use.

  • Image format: JPEG JPG PNG
  • Image size: No more than 5 MB.
  • Image resolution: Less than 4096x4096px.

Response

200 - application/json

Success

The response is of type object.