# 提交swap_face任务

**方法**: `POST`
**路径**: `/mj/insight-face/swap`

人脸源图片base64

## 请求参数

### Header 参数

```text
Authorization
string
可选
默认值:
Bearer {{YOUR_API_KEY}}
```

### Body 参数 application/json

```text
sourceBase64
string
必需
人脸源图片base64
示例:
data:image/png;base64,xxx1
targetBase64
string
必需
目标图片base64
示例:
data:image/png;base64,xxx2
accountFilter
object
(Filter)
Filter
可选
instanceId
string
账号实例ID
可选
notifyHook
string
可选
回调地址, 为空时使用全局notifyHook
state
string
自定义参数
可选
示例
{
"sourceBase64"
:
"data:image/png;base64,xxx1"
,
"targetBase64"
:
"data:image/png;base64,xxx2"
,
"accountFilter"
:
{
"instanceId"
:
"string"
}
,
"notifyHook"
:
"string"
,
"state"
:
"string"
}
```

## 请求示例代码

### Shell

```bash
curl --location --request POST '/mj/insight-face/swap' \
--header 'Authorization: Bearer {{YOUR_API_KEY}}' \
--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"
}'
```

## 返回响应

### 🟢 200 OK

**内容类型**: `application/json`

#### 响应结构

```text
code
integer
<int32>
可选
description
string
可选
result
string
可选
```

#### 示例

```json
{
    "code": 0,
    "description": "string",
    "result": "string"
}
```

### 🟢 201 Created

### 🟠 401 Unauthorized

### 🟠 403 Forbidden

### 🟠 404 Not Found
