Remove Background
Upload an image and get back a cutout of the subject with a transparent background, saved to your Dreep storage as a new asset.
The cutout keeps its alpha channel — it is never flattened onto a colour. To serve it on a background, pass bg to the fetch endpoint (/api/v1/fetch/{id}?bg=ffffff). That runs as an ordinary transformation, so a single removal can serve any number of background colours without being charged again.
Background removals are billed from a consumable add-on rather than a plan allowance. With no credits remaining the endpoint returns 402.
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, passbg 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. Usefolder (a path,
created on demand) or folderId (a UUID):
Output format
PNG by default. Passformat=webp for a smaller file at the same
transparency:
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 returns402 with code: "LIMIT_EXCEEDED"
and featureKey: "bg_removals". Credits are only spent once the cutout is
stored, so a failed request costs nothing.Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
The image to cut out. JPEG, PNG or WebP.
Output format. Only alpha-capable formats are accepted — a cutout encoded as JPEG would lose its transparency.
png, webp Slug path of the folder to save the cutout into, relative to the project root. Missing folders are created.
"products/cutouts"
UUID of an existing folder to save the cutout into. Mutually exclusive with folder.
Set to false to require that folder already exists.
true, false Response
Background removed
The stored cutout.