Background Removal API

Get API Key

Easy to integrate

Our API is a simple HTTP interface with various options:

  • Source images: Direct uploads or URL reference
  • Result images: Image file or JSON-encoded data
  • Output resolution: Up to 25 megapixels
  • Requires images that have a foreground

Get started

  • Get your API key.
  • Use the following code samples to get started quickly
  • Review the reference docs to adjust any parameters

Request description

HTTP method: POST Request URL:
https://www.cutout.pro/api/v1/matting

Header parameters:

parametervalue
Content-Typemultipart/form-data
APIKEYYour Exclusive API Key

Query string parameters:

parametervalue
1Remove Background
2Avatar Matting

Multipart body parameters:

parametervalue
filePicture file

Responses

  • Normal response

    Output binary format of processed image, content-type is image/png

  • Abnormal response

    Output application/json format strings

Example

{

"code": 1001,

"data": null,

"msg": 'Request failed',

"time": 1590462453264,

}

Error CodeDescription
1001Request failed
1002File size must be less than 10M
4001Your credits is not enough
4002File not exist
5002Invalid api key
5003Matting failed
5004Image url download failed
5005Query per second limited
5006Invalid base64 string
5007Base64 string can not be recognized as image
5008Input image can not be recognized as image
7001Face analysis failed
7002Multiple person detected

Request restrictions

The current API QPS limit is 1 query / second