单人换脸
开发中
POST
/api/v2/face/swap
请求参数
Header 参数
Authorization
string
管理后台获取的密钥
示例值:
Bearer 1333_zrT4KITp20HcxxxxxxxxxxRD2C513FK40Pvq
Body 参数application/json
fromImgUrl
string
原人物头像
toImgUrl
string
目标(模特)头像
notifyHook
string
可选
示例
{
"fromImgUrl": "https://reserve-clear-1256181000.cos.ap-shanghai.myqcloud.com/img/cdn/clear-20250605/871b0c2ef89ebeba34816e87987e3f62.png",
"toImgUrl": "https://reserve-clear-1256181000.cos.ap-shanghai.myqcloud.com/img/cdn/clear-20250605/35864a988eb11b5d33be42318ce154ad.png",
"notifyHook": "https://abc.com/webhook/"
}
示例代码
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
请求示例请求示例
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.aihuihua.com/api/v2/face/swap' \
--header 'Authorization: Bearer 1333_zrT4KITp20HcxxxxxxxxxxRD2C513FK40Pvq' \
--header 'Content-Type: application/json' \
--data-raw '{
"fromImgUrl": "https://reserve-clear-1256181000.cos.ap-shanghai.myqcloud.com/img/cdn/clear-20250605/871b0c2ef89ebeba34816e87987e3f62.png",
"toImgUrl": "https://reserve-clear-1256181000.cos.ap-shanghai.myqcloud.com/img/cdn/clear-20250605/35864a988eb11b5d33be42318ce154ad.png",
"notifyHook": "https://abc.com/webhook/"
}'
返回响应
🟢200成功
application/json
Body
code
string
必需
description
string
描述
result
string
必需
示例
{
"code": 1,
"description": "Submit success",
"result": "123"
}