Background
Last updated
Last updated
The background section contains all background properties, such as removing the background, blurring the background, and setting the color.
Remove image background. This operation offers both fully automated mode and advanced manual options. Following is a description of remove
option.
Possible values:
Value | Type | Description |
---|---|---|
true | boolean | Removes image background. |
false | boolean | Default. Keeps the background of the original image intact. |
{ "category": "general", "clipping": true } | object | Advanced options for background removal. See detailed description in the table below. |
{ "selective": { "object_to_keep": "<object>" }, "clipping": true } | object | Advanced options for background removal. See detailed description in the table below. |
Below are advanced options supported by remove
:
Option | Type | Description |
---|---|---|
category | string | Provides a hint about the nature of object in the foreground for a more accurate result of background removal. Possible values:
The |
selective | object | Allows to specify exactly which object should remain on the image, e.g. |
clipping | boolean |
|
Please be aware that older versions of the products
background removal category will be deprecated and automatically updated to the latest version starting January 1, 2025.
If clipping
is enabled, resizing.fit
value is "crop"/
unspecified, resizing.width
and resizing.height
are also unspecified - the resulting cropped image will be scaled to the dimensions of the input image.
If you want to keep the clipped region unchanged, set resizing.fit
to "bounds"
and leave resizing.width
and resizing.height
unspecified.
You can also upscale or downscale the clipped region in many different ways. See Resizing and Upscale to learn more.
JSON Request
The image background. You can set transparent background or any color in hexadecimal format.
Possible values
Value | Type | Description |
---|---|---|
transparent | string | To set transparent background the image format should support an alpha channel (PNG, WEBP or AVIF) otherwise the background will be white. |
color | string | Set the color of the background in hexadecimal format. Default is white color. |
JSON Request
Blur image background. This operation offers both fully automated mode and advanced manual options. Here's a description of blur
option.
Possible values:
Value | Type | Description |
---|---|---|
true | boolean | Blurs image background |
false | boolean | Default. Keeps the background of the original image intact. |
{ "category": "general", "type": "regular", "level": "medium" } | object | Advanced options for background blurring. See detailed description in the table below. |
{ "selective": { "object_to_keep": "<object>" }, "type": "regular", "level": "medium" } | object | Advanced options for background blurring. See detailed description in the table below. |
Below are advanced options supported by blur
:
Advanced option | Type | Description |
---|---|---|
category | string | Provides a hint about the nature of object in the foreground for a more accurate result of background blurring. Possible values:
The |
selective | object | Allows to specify exactly which object should remain on the image unblurred, e.g. |
type | string | Selects the type of blur to be applied to the background. Possible values:
|
level | string | Selects the level of blur strength to be applied to the background. Possible values:
|
JSON Request