Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken |
Parameter | Type | Value | Description |
---|---|---|---|
targetImage | Array | [{path:"",opts:""}] | A collection of faces in the original image(Each array element is an object, and the object contains 2 properties, path:Links to faces detected in the original image.opts: Key information of faces detected in original pictures(You can get it through the face https://sg3.akool.com/detect API,You can get the landmarks_str value returned by the api interface as the value of opts) |
sourceImage | Array | [{path:"",opts:""}] | Replacement target image information.(Each array element is an object, and the object contains 2 properties, path:Links to faces detected in target images.opts: Key information of the face detected in the target image(You can get it through the face https://sg3.akool.com/detect API,You can get the landmarks_str value returned by the api interface as the value of opts) |
face_enhance | Int | 0 or 1 | Whether facial enhancement: 1 means open, 0 means close |
modifyImage | String | Modify the link address of the image | |
webhookUrl | String | Callback url address based on HTTP request |
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000: success) |
msg | String | Interface returns status information | |
data | Object | {_id:"",url: "",job_id: ""} | _id: Interface returns data url: faceswwap result url job_id: Task processing unique id |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization |
Parameter | Type | Value | Description |
---|---|---|---|
sourceImage | Array | [{path:"",opts:""}] | Replacement target image information:sourceImage means that you need to change it to the link collection of the face you need. You need to pass your image through the https://sg3.akool.com/detect interface. Obtain the link and key point data and fill them here, and ensure that they correspond to the order of the targetImage. You need to pay attention to that each picture in the sourceImage must be a single face, otherwise the face change may fail. (Each array element is an object, and the object contains 2 properties, path:Links to faces detected in the original image. opts: Key information of faces detected in original pictures【You can get it through the face https://sg3.akool.com/detect API, You can get the landmarks_str value returned by the api interface as the value of opts) |
targetImage | Array | [{path:"",opts:""}] | A collection of faces in the original video: targetImage represents the collection of faces after face detection using modifyVideo. When the original video has multiple faces, here is the image link and key point data of each face. You need to pass https://sg3.akool.com/detect interface to obtain data.(Each array element is an object, and the object contains 2 properties, path:Links to faces detected in target images. opts: Key information of the face detected in the target image【You can get it through the face https://sg3.akool.com/detect API, You can get the landmarks_str value returned by the api interface as the value of opts) |
face_enhance | Int | 0 or 1 | Whether facial enhancement: 1 means open, 0 means close |
modifyVideo | String | modifyImage represents the original image you need to change the face | |
webhookUrl | String | Callback url address based on HTTP request |
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000: success) |
msg | String | Interface returns status information | |
data | Object | {_id:"",url: "",job_id: ""} | _id : Interface returns data url: faceswwap result url job_id: Task processing unique id |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken |
Parameter | Type | Value | Description |
---|---|---|---|
_ids | String | result ids are strings separated by commas【You can get it by returning the _id field from https://openapi.akool.com/api/open/v3/faceswap/highquality/specifyimage or https://openapi.akool.com/api/open/v3/faceswap/highquality/specifyvideo api.】 |
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000: success) |
msg | String | Interface returns status information | |
data | Object | result: [{faceswap_status:"",url: "",createdAt: ""}] | faceswap_status: faceswap result status: 1 In Queue 2 Processing 3 Success 4 failed url: faceswwap result url createdAt: current faceswap action created time |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken |
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000: success) |
msg | String | Interface returns status information | |
data | Object | {"credit": 0 } | credit: Account balance |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken |
Parameter | Type | Value | Description |
---|---|---|---|
_ids | String | result ids are strings separated by commas |
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000:success) |
msg | String | Interface returns status information |
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken |
Parameter | Type | Value | Description |
---|---|---|---|
single_face | Boolean | true/false | Is it a single face picture: This should be true when the incoming picture has only one face, and false when the incoming picture has multiple faces. |
image_url | String | image link: You can choose to enter this parameter or the img parameter. | |
img | String | Image base64 information: You can choose to enter this parameter or the image_url parameter. |
Parameter | Type | Value | Description |
---|---|---|---|
error_code | int | 0 | Interface returns business status code(0:success) |
error_msg | String | error message of this api | |
landmarks | Array | [] | Key point data of face |
Parameter | Value | Description |
---|---|---|
code | 1000 | Success |
code | 1003 | Parameter error or Parameter can not be empty |
code | 1005 | Operation is too frequent |
code | 1006 | Your quota is not enough |
code | 1007 | The number of people who can have their faces changed cannot exceed 8 |
code | 1101 | Invalid authorization or The request token has expired |
code | 1102 | Authorization cannot be empty |
code | 1200 | The account has been banned |