Skip to content

Midjourney SwapFace ​

Submit a face swap (SwapFace) job. The documented format is with / files; the try-it panel demonstrates the gateway-compatible JSON Base64 format.

http
POST /mj/insight-face/swap

Request headers ​

NameTypeRequiredDescription
stringYesBearer token, e.g.
stringYes for multipart; for JSON

Request body (multipart) ​

NameTypeRequiredDescription
stringNo /
fileYesFace source image
fileYesTarget image

Request body (JSON-compatible) ​

NameTypeRequiredDescription
stringNo /
stringYesFace source Base64
stringYesTarget image Base64

Request example ​

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"
  }'

Response example ​

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

Response fields ​

NameTypeDescription
integer ok, otherwise error
stringStatus text
stringTask ID