Slazzer App
All-in-one AI photo editor
Our AI will remove the background from any image that has a clear foreground and background. (tested with human, cars, animals, & products )
Type :string ($binary)
Required :Yes (Only one of the source_image_ parameters can be used in a single request.)
The source_image_file parameter uploads an image for background processing. By default, the API removes the background and returns a transparent PNG. Based on additional parameters, it can replace the background with a solid color or crop the image. It must be sent as a multipart/form-data request, processing one image at a time. Transparent PNGs retain transparency unless a background color is set.
Supported Format :PNG, JPG, JPEG.
Examples :source_image_file = @/path/to/image.png
Type :string
Required :Yes (Only one of the source_image_ parameters can be used in a single request.)
The source_image_url parameter provides a URL to an image for background processing. The API removes the background by default, returning a transparent PNG, or replaces it with a solid color or crops it, based on additional parameters. The URL must point to a publicly accessible image in JPG, JPEG, or PNG format.
Supported Format :PNG, JPG, JPEG.
Examples :source_image_url = https://example.com/image.png
Type :string
Required :Yes (Only one of the source_image_ parameters can be used in a single request.)
The source_image_base64 parameter accepts a base64-encoded image string for background processing. The API removes the background by default, returning a transparent PNG, or replaces it with a solid color or crops it, based on additional parameters. The image should be encoded in base64 format and can be in JPG, JPEG, or PNG format.
Supported Format :PNG, JPG, JPEG.
Examples :source_image_base64 = data:image/png;base64,iVBORwEUgAA...
Type :string ($binary)
Required :No
This bg_image_file will be used as the background for the processed image. The background image will automatically be resized to fit the output image’s aspect ratio.
Supported Format :PNG, JPG, JPEG.
Examples :bg_image_file = @/path/to/image.png
Type :string
Required :No
This bg_image_url will be used as the background for the output binary image. The background image will automatically be resized to fit the output image’s aspect ratio.
Supported Format :PNG, JPG, JPEG.
Examples :bg_image_url = https://example.com/image.png
Type :string
Required :No
This bg_image_base64 will be used as the background for the output binary image. The background image will automatically be resized to fit the output image’s aspect ratio
Supported Format :PNG, JPG, JPEG.
Examples :bg_image_base64 = data:image/png;base64,sYHdKmEUgAA...
Type :string
Required :No
The bg_color_code parameter is used to specify a solid background color for the processed image. The color must be provided as a HEX color code.
Supported Format :HEX color code (e.g., #72E4B3 or #B3D472)
Examples :bg_color_code = #72E4B3
Type :string
Required :No
The format parameter specifies the output image format. By default, the format is set to png. You can change it to other formats depending on your requirements.
Examples :format = jpg
Type :boolean
Required :No
The crop parameter determines whether extra transparent pixels surrounding the image will be cropped. When set to true, the image will be cropped to remove any transparent pixels around the content.
Examples :crop = true
Type :int
Required :No
The crop_margin parameter allows you to specify the amount of margin around the subject when cropping is applied (i.e., when crop=True). This parameter works only when the crop parameter is set to true.
Type :string
Required :No
The scale parameter adjusts the size of the subject in the output image. The scaling factor can range between 10% and 100%, depending on the image dimensions.
Examples :scale = 50%
Type :string
Required :No
The position parameter determines the placement of the subject within the image canvas. This parameter only works when the scale parameter is provided.
Examples :position = 25%,50%
Type :boolean
Required :No
The preview parameter determines whether the image is resized to a lower resolution for preview purposes.
Examples :preview = true
Type :string
Required :No
The channel parameter specifies which image channel to return. It can be used to extract specific color channels (red, green, blue) or the alpha mask.
Examples :channel = alpha
Type :string
Required :No
The roi parameter allows you to extract a specific region of interest from an image. Only the contents within the selected rectangular area will be considered as the foreground, while everything else will be removed as background.
Examples :roi = 100px, 200px, 400px, 500px
Type :boolean
Required :No
The car_shadow parameter determines whether an artificial shadow should be included in the output image. This feature is currently limited to car photos.
Examples :car_shadow = true
Success
Background successfully removed!
Your image has been processed, and the background is now removed. You can now download or use it as you wish.
Error
Background removed failed!
The request could not be processed due to invalid parameters or an unsupported image format. Ensure the input image meets the required format and size specifications, then try again. (No credits were deducted for this request.)
Error
Background removed failed!
API-KEY missing or invalid API-KEY (No credit deducted)
Error
Background removed failed!
No credits remaining (No credit deducted)
Error
Background removed failed!
Api rate limit crossed (No credit deducted)
Format | Resolution |
---|---|
png |
|
jpg |
|
*Please note that PNG images above 10 megapixels are not supported by default. If you do not require transparency we recommend using the JPG format.
Input image | Megapixels | Rate Limit approx |
---|---|---|
625 x 400 | 1 MP | 500 images per minute |
1200 x 800 | 1 MP | 500 images per minute |
1600 x 1200 | 2 MP | 250 images per minute |
2500 x 1600 | 4 MP | 125 images per minute |
4000 x 2500 | 10 MP | 50 images per minute |
6250 x 4000 | 25 MP | 20 images per minute |
Error code 429 will return if api rate limit exceed & no credit will be charged.
Higher api rate limits are available for enterprise customers. Contact Us