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/swapRequest headers
| Name | Type | Required | Description |
|---|---|---|---|
| string | Yes | Bearer token, e.g. | |
| string | Yes | for multipart; for JSON |
Request body (multipart)
| Name | Type | Required | Description |
|---|---|---|---|
| string | No | / | |
| file | Yes | Face source image | |
| file | Yes | Target image |
Request body (JSON-compatible)
| Name | Type | Required | Description |
|---|---|---|---|
| string | No | / | |
| string | Yes | Face source Base64 | |
| string | Yes | Target 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
| Name | Type | Description |
|---|---|---|
| integer | ok, otherwise error | |
| string | Status text | |
| string | Task ID |