- 发出请求
- 模型接口
- 聊天(Chat)
- 自动补全(Completions)
- 文生图片(Images)
- 向量生成(Embeddings)
- 音频(Audio)
- Suno 文生歌曲
- Flux 文生图
- Luma 文生视频
- 帮助中心
提交swap_face任务
POST
https://aigc.x-see.cn/mj/insight-face/swap
InsightFace任务提交
请求参数
Header 参数
Authorization
string
必需
默认值:
API KEY 令牌
Content-Type
string
必需
默认值:
application/json
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://aigc.x-see.cn/mj/insight-face/swap' \
--header 'Authorization;' \
--header 'Content-Type: application/json' \
--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