提交swap_face任务
POST
https://newapi02.sharkchat.cn/mj/insight-face/swap
InsightFace任务提交
请求参数
Authorization
在 header 添加参数
mj-api-secret
示例:
mj-api-secret: ********************
Body 参数application/json
sourceBase64
string
必需
示例值:
data:image/png;base64,xxx1
targetBase64
string
必需
示例值:
data:image/png;base64,xxx2
accountFilter
object (Filter)
可选
instanceId
string
账号实例ID
notifyHook
string
可选
state
string
自定义参数
示例
{
"sourceBase64": "data:image/png;base64,xxx1",
"targetBase64": "data:image/png;base64,xxx2",
"accountFilter": {
"instanceId": "string"
},
"notifyHook": "string",
"state": "string"
}
示例代码
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://newapi02.sharkchat.cn/mj/insight-face/swap' \
--header 'Content-Type: application/json' \
--header 'mj-api-secret;' \
--data-raw '{
"sourceBase64": "data:image/png;base64,xxx1",
"targetBase64": "data:image/png;base64,xxx2",
"accountFilter": {
"instanceId": "string"
},
"notifyHook": "string",
"state": "string"
}'
返回响应
🟢200OK
application/json
Body
code
integer <int32>
可选
description
string
可选
result
string
可选
示例
{
"code": 0,
"description": "string",
"result": "string"
}
🟢201Created
🟠401Unauthorized
🟠403Forbidden
🟠404Not Found
修改于 2024-08-18 08:21:15