Skip to main content
POST
Remove Background

Choosing a background colour

The cutout is stored with its transparency intact and is never flattened onto a colour. To put it on a background, pass bg to the fetch endpoint:
bg is hex without a leading #. Three, six, or eight characters — the eight-character form carries alpha. This is why the colour is applied at delivery rather than baked in: one removal serves any number of backgrounds. Each colour is an ordinary transformation, cached permanently after its first request, so you are not charged another removal for it.

Saving to a folder

Name a destination and the cutout is stored there. Use folder (a path, created on demand) or folderId (a UUID):
With no folder given, the cutout is saved to the project’s default folder. See Folders & Paths.

Output format

PNG by default. Pass format=webp for a smaller file at the same transparency:
Only png and webp are accepted. JPEG has no alpha channel, so a cutout encoded as JPEG would arrive with a solid background and silently lose the transparency you paid for.

Billing

Background removals come from a consumable add-on, not a plan allowance — no plan includes them by default. Each successful removal spends one credit. With no credits left the endpoint returns 402 with code: "LIMIT_EXCEEDED" and featureKey: "bg_removals". Credits are only spent once the cutout is stored, so a failed request costs nothing.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data
file
file
required

The image to cut out. JPEG, PNG or WebP.

format
enum<string>
default:png

Output format. Only alpha-capable formats are accepted — a cutout encoded as JPEG would lose its transparency.

Available options:
png,
webp
folder
string

Slug path of the folder to save the cutout into, relative to the project root. Missing folders are created.

Example:

"products/cutouts"

folderId
string<uuid>

UUID of an existing folder to save the cutout into. Mutually exclusive with folder.

autoCreateFolders
enum<string>
default:true

Set to false to require that folder already exists.

Available options:
true,
false

Response

Background removed

asset
object

The stored cutout.