Light Mode
Create Task
POST
/api/v1/taskThis async endpoint from PiAPI's Faceswap API swaps the face from the swap_image
to the target_image
.
Request
Body Params application/json
model
string
required
task_type
string
required
input
object
required
target_image
string
required
swap_image
string
required
Example
{
"model": "Qubico/image-toolkit",
"task_type": "face-swap",
"input": {
"target_image": "https://img.picui.cn/free/2024/09/25/66f41e64b1922.jpg",
"swap_image": "http://wohuitest-1316801467.cos.ap-guangzhou.myqcloud.com/aiuploadv2/ad/61/ad61a39afd9079e57a5908c0bd9dd995.jpg"
}
}
Request samples
Responses
Success(200)
HTTP Code: 200
Content Type : JSONapplication/json
Data Schema
object {0}
Example
{
"code": 200,
"data": {
"task_id": "90efd2db-bcfc-413f-a0be-c893850c9d68",
"model": "Qubico/image-toolkit",
"task_type": "face-swap",
"status": "pending",
"config": {
"webhook_config": {
"endpoint": "",
"secret": ""
}
},
"input": {},
"output": null,
"meta": {},
"detail": null,
"logs": [],
"error": {
"code": 0,
"raw_message": "",
"message": "",
"detail": null
}
},
"message": "success"
}
Modified at 9 days ago