legacy/Face Swap
Overview#
This async endpoint from PiAPI's Faceswap API swaps the face from the swap_image
to the target_image
.API | Task-type | Model | Description | Input Limitation |
---|
Multi-faceswap API | multi-face-swap | Qubico/image-toolkit | Swap faces in the target image sequentially using the chosen images. | Max 10MB, resolution under 2048x2048. |
Task-type | Pricing |
---|
multi-face-swap | $0.015 per use |
Request
Body Params application/json
Upload the image URL into this parameter (the URL should end with '.png', '.jpeg', or Base64 string). The face in this image will be swapped out with the swap_image
face.
Upload the image URL into this parameter (the URL should end with '.png', '.jpeg', or Base64 string). The face in this image will swapped be onto the target_image
face.
The format should be: "url" or "base64". Default type is "base64".
{
"target_image": "Superman.png",
"swap_image": "Leonardo_Dicaprio.png",
"result_type": "url"
}
Request samples
curl --location --request POST 'https://api.piapi.ai/api/face_swap/v1/async' \
--header 'X-API-Key: {{x-api-key}}' \
--header 'Content-Type: application/json' \
--data-raw '{
"target_image": "Superman.png",
"swap_image": "Leonardo_Dicaprio.png",
"result_type": "url"
}'
Responses
{
"code": 200,
"data": {
"task_id": "7a7ba527************1974d4316e22"
},
"message": "success"
}
Modified at 2025-03-26 09:54:09