Background Removal
Remove Background
Cut the subject out of an image with dreep.removeBackground(), keeping the alpha channel.
Returns a cutout of the subject with a transparent background, stored as a new asset.
Documentation Index
Fetch the complete documentation index at: /llms.txt
Use this file to discover all available pages before exploring further.
Cut the subject out of an image with dreep.removeBackground(), keeping the alpha channel.
const asset = await dreep.removeBackground({ file, folder: "products" });
| Parameter | Type | Description |
|---|---|---|
file | Buffer | Readable | Blob | File | Required. The image to cut out |
filename | string | Name to store it under |
folder | string | Slug path of the destination. Missing folders are created |
folderId | string | UUID of an existing folder |
autoCreateFolders | boolean | Set false to require the path already exists |
signal | AbortSignal | Cancels the request |
dreep.url(asset, { bg: "ffffff" });
dreep.url(asset, { bg: "000000" });