Get API Key
Normal return
{
"code": 0,
"data": {
"imageBase64: "iVBORw0KGgo..." //base64 encoded of the image
},
"msg": null,
"time": 1590462453264
}
Error
{
"code": 1001, //
"data": null
"msg": 'Insufficient balance',
"time": 1590462453264
}
Overlay API
Get API Key
Adjust gamma
Parameter | Type | Description |
---|
name | String | Type of work |
gamma | Integer | Gamma value |
Sample code
Curl
curl -H 'APIKEY: INSERT_YOUR_API_KEY_HERE' \
-F 'file=@/path/to/file.jpg' \
-f 'https://www.cutout.pro/api/v1/matting2?mattingType=6&crop=true' \
-o out.png
Python
import requests
response = requests.post(
'https://www.cutout.pro/api/v1/matting2?mattingType=6',
files={'file': open('/path/to/file.jpg', 'rb')},
headers={'APIKEY': 'INSERT_YOUR_API_KEY_HERE'},
)
Node.js
var request = require('request');
var fs = require('fs');
request.post({
url: 'https://www.cutout.pro/api/v1/matting2?mattingType=6',
formData: {
file: fs.createReadStream('/path/to/file.jpg')
},
headers: {
'APIKEY': 'INSERT_YOUR_API_KEY_HERE'
},
encoding: null
}, function(error, response, body) {
// console.log(response);
});
Color Burn overlay
Darken overlay
Hard Light-overlay
Lighten overlay
Multiply overlay
Normal Overlay
Screen overlay
Soft Light