The Face-Swap API enables transferring faces from reference images to target images. When multiple faces are detected, the API automatically selects and replaces the largest face in the image.
Request
Header Params
x-api-key
string
required
Your API Key used for request authorization
Body Params application/json
model
string
required
task_type
string
required
input
object
required
target_image
string
required
swap_image
string
required
config
object
optional
webhook_config
object
optional
Webhook provides timely task notifications. Check PiAPI webhook for detail.
service_mode
enum<string>
optional
This allows users to choose whether this specific task will get processed under PAYG or HYA mode. If unspecified, then this task will get processed under whatever mode (PAYG or HYA) the user chose on the workspace setting of your account.
public means this task will be processed under PAYG mode.
private means this task will be processed under HYA mode.