Slazzer Auto Background Removal API Documentation

Instantly remove image background automatically

with just a simple API call

Our AI will remove the background from any image that has a clear foreground and Background. (Tested with human, cars, animals, & Products )

Instant integration in just few steps.

Our rest API is simple and easy to use:
  • Source images: Direct uploads
  • Result images: PNG image file
  • Output resolution: Up to 25 megapixels
  • Works perfectly with clear images of human, car, animals or products

Check out our sample code

Remove background from image file

Environment

Output Formats

Easily request any one of the 2 formats via our format parameter

Format Resolution
png
  • Upto 10 MP , Ex - 3872 x 2592
jpg
  • Upto 25 MP , Ex - 6250 x 4000

*Please note that PNG images above 10 megapixels are not supported by default. If you don't require transparency we recommend using the JPG format.

API Reference

Server URL:https://www.slazzer.com/api/v1

Request Body:multipart/form-data

Method:POST

API:/remove_image_background

Authorization
  • API-KEY
    string

    Your API key

Parameters Request body
  • source_image_file
    string($binary)

    Source image file. Support only PNG, JPG, JPEG.

    *** use only one source_image_ parameters at a time

  • source_image_url
    string

    Source image url. Support only PNG, JPG, JPEG.

    *** use only one source_image_ parameters at a time

  • source_image_base64
    string

    Source image base64 format. Support only PNG, JPG, JPEG.

    *** use only one source_image_ parameters at a time

  • format
    string

    Output image format. Default value 'png'. Otherwise 'jpg' for JPG format and 'png' for PNG format. 'png' format support alpha transparency.

  • scale
    string

    Scale value from 10 to 100 applicable. Default value 100. Scaling will apply from center.

  • bg_color_code
    string

    Output with solid background color. Has to be HEX color code. (e.g. #72E4B3, #B3D472).

    *** Please Note: Add '#' before color code.

    *** use only one bg_ parameters

  • bg_image_file
    string($binary)

    Output with image file background. This image will be resize according to the output image file aspect ratio. supported bg_image_file formats are 'png', 'jpg', 'jpeg'.

    *** use only one bg_ parameters

  • bg_image_url
    string

    Output with image url background. This image will be resize according to the output image file aspect ratio. supported bg_image_file formats are 'png', 'jpg', 'jpeg'.

    *** use only one bg_ parameters

  • bg_image_base64
    string

    Output with image base64 background.This image will be resize according to the output image file aspect ratio. supported bg_image_file formats are 'png', 'jpg', 'jpeg'.

    *** use only one bg_ parameters

Response
  • Code : 200

    Successfully removed image background

    {
        "output_image_url": "image_url"
    }
  • Code: 400

    Error: Invalid parameters or unable to process input image file (No credit deducted)

    Example :

    {
        "error": "Source image file not found"
    }
  • Code: 401

    Error: API-KEY missing or invalid API-KEY (No credit deducted)

    Example :

    {
        "error": "invalid api key"
    }
  • Code: 402

    Error: No credits remaining (No credit deducted)

    Example :

    {
        "error": "No credits remaining"
    }
  • Code: 429

    Error: Api rate limit crossed (No credit deducted)

    Example :

    {
        "error": "Api rate limit crossed"
    }

API Rate Limit

You can instantly process upto 500 images per minute via the API , but depending on the input image megapixel resolution.

Megapixels Rate Limit Input image size
1 MP 500 / 1 = 500 images / min Upto 1200 x 820
2 MP 500 / 2 = 250 images / min Upto 1600 x 1200
4 MP 500 / 4 = 125 images / min Upto 2500 x 1600
10 MP 500 / 10 = 50 images / min Upto 4000 x 2500
25 MP 500 / 25 = 20 images / min Upto 6250 x 4000

Error code 429 will return if api rate limit exceed & no credit will be charged.

Higher api rate limit are available for enterprise customers. Contact Us