Skip to content

Midjourney SwapFace ​

提交换脸(SwapFace)任务。文档口径为 上传 / ;调试台演示网关兼容的 JSON Base64 写法。

http
POST /mj/insight-face/swap

请求头 ​

名称类型必填说明
string是Bearer Token,示例:
string是multipart 为 ;JSON 为

请求体(multipart) ​

名称类型必填说明
string否 /
file是人脸源图片
file是目标图片

请求体(JSON 兼容) ​

名称类型必填说明
string否 /
string是人脸源图 Base64
string是目标图 Base64

请求示例 ​

bash
curl -X POST https://octopusx.ai/mj/insight-face/swap \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "mode=RELAX" \
  -F "[email protected]" \
  -F "[email protected]"
bash
curl -X POST https://octopusx.ai/mj/insight-face/swap \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "mode": "RELAX",
    "sourceBase64": "data:image/png;base64,source",
    "targetBase64": "data:image/png;base64,target"
  }'

响应示例 ​

json
{
  "code": 1,
  "description": "Submit success",
  "result": "1712158011464912"
}

响应字段 ​

名称类型说明
integer 成功、其它为错误
string状态说明
string任务 ID

相关接口 ​