Request Headers
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken |
Body Attributes
Parameter | isRequired | Type | Value | Description |
---|---|---|---|---|
color_code | false | String | eg: #aafbe3 | background color。 Use hexadecimal to represent colors |
template_url | false | String | resource address of the background image | |
origin_img | true | String | Foreground image address | |
modify_template_size | false | String | eg:“3031x3372” | The size of the template image after expansion |
modify_origin_img_size | true | String | eg: “3031x2894” | The size of the foreground image after scaling |
overlay_origin_x | true | int | eg: 205 | The position of the upper left corner of the foreground image in the canvas |
overlay_origin_y | true | int | eg: 497 | The position of the upper left corner of the foreground image in the canvas |
overlay_template_x | false | int | eg: 10 | The position of the upper left corner of the template image in the canvas |
overlay_template_y | false | int | eg: 497 | The position of the upper left corner of the template image in the canvas |
canvas_size | true | String | eg:“3840x3840” | Canvas size |
webhookUrl | true | String | Callback url address based on HTTP request | |
removeBg | false | Boolean | true or false default false | Whether to remove the background image |
Response Attributes
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000:success) |
msg | String | Interface returns status information | |
data | Object | { _id: "", image_status: 1 } | _id: Interface returns data, image_status: the status of image: 【1:queueing, 2:processing, 3:completed,4:failed】 |
Example
Body
Request
Response
Request Headers
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken |
Query Attributes
Parameter | Type | Value | Description |
---|---|---|---|
image_model_id | String | image db id:You can get it based on the _id field returned by https://openapi.akool.com/api/open/v3/content/image/bg/replace api. |
Response Attributes
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000:success) |
msg | String | Interface returns status information | |
data | Object | {image_status:1,_id:"",image:""} | image_status: the status of image: 【1:queueing, 2:processing, 3:completed, 4:failed】 image: Image result after processing _id: Interface returns data |
Example
Request
Response
Response Code Description
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 |
Request Headers
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken |
Body Attributes
Parameter | isRequired | Type | Value | Description |
---|---|---|---|---|
color_code | false | String | eg: #aafbe3 | background color。 Use hexadecimal to represent colors |
template_url | false | String | resource address of the background image | |
origin_img | true | String | Foreground image address | |
modify_template_size | false | String | eg:“3031x3372” | The size of the template image after expansion |
modify_origin_img_size | true | String | eg: “3031x2894” | The size of the foreground image after scaling |
overlay_origin_x | true | int | eg: 205 | The position of the upper left corner of the foreground image in the canvas |
overlay_origin_y | true | int | eg: 497 | The position of the upper left corner of the foreground image in the canvas |
overlay_template_x | false | int | eg: 10 | The position of the upper left corner of the template image in the canvas |
overlay_template_y | false | int | eg: 497 | The position of the upper left corner of the template image in the canvas |
canvas_size | true | String | eg:“3840x3840” | Canvas size |
webhookUrl | true | String | Callback url address based on HTTP request | |
removeBg | false | Boolean | true or false default false | Whether to remove the background image |
Response Attributes
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000:success) |
msg | String | Interface returns status information | |
data | Object | { _id: "", image_status: 1 } | _id: Interface returns data, image_status: the status of image: 【1:queueing, 2:processing, 3:completed,4:failed】 |
Example
Body
Request
Response
Request Headers
Parameter | Value | Description |
---|---|---|
Authorization | Bearer {token} | Your API Key used for request authorization.getToken |
Query Attributes
Parameter | Type | Value | Description |
---|---|---|---|
image_model_id | String | image db id:You can get it based on the _id field returned by https://openapi.akool.com/api/open/v3/content/image/bg/replace api. |
Response Attributes
Parameter | Type | Value | Description |
---|---|---|---|
code | int | 1000 | Interface returns business status code(1000:success) |
msg | String | Interface returns status information | |
data | Object | {image_status:1,_id:"",image:""} | image_status: the status of image: 【1:queueing, 2:processing, 3:completed, 4:failed】 image: Image result after processing _id: Interface returns data |
Example
Request
Response
Response Code Description
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 |