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:

Header parameters:

APIKEYYour Exclusive API Key

Query string parameters:

mattingType1: Remove Background;
3: Avatar Matting
croptrue: Crop the image to fix the non-transparent areas;
false: no crop

Multipart body parameters:

filePicture file


  • Normal response

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

  • Abnormal response

    Output application/json format strings



"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 3 query / second

Product Pricing

You can purchase the number of API calls through online recharge and payment methods. Each successful API call costs 1 credit.

View the price list