Magic Eraser
Remove any object from an image by painting a mask over it. The fill blends seamlessly with the surroundings. The mask is an asset like any other: a white-on-transparent PNG uploaded alongside the photo.

Ordering
Submit an order with POST /v1/orders — or one call of SDK. The snippets below are complete: upload, order, live progress, download.
/v1/ordersimport { BkbnClient } from '@bkbnlab/api'
const bkbn = new BkbnClient() // reads BKBNLAB_API_KEY
const photo = await bkbn.upload('living-room.jpg')
const mask = await bkbn.upload('mask.png') // white-on-transparent PNG
const order = await bkbn.order({
inputs: [photo],
genEdit: 'magic_eraser',
mask: mask,
})
const result = await order.wait({
onProgress: (p) => console.log(p.stage, p.percent),
})
await result.save('result.jpg')Options
Options ride the order body next to inputs. Everything is optional — an order with no options runs the base develop.
| Option | Type | Description |
|---|---|---|
mask | asset | Asset id of the mask (white marks the region to erase). |
Inputs and outputs
inputs takes 1-5 asset ids — the exposure brackets of one scene (most orders send a single image). The completed order carries one outputAssetId; download it with GET /v1/assets/:id.
Before / After
Drag the slider to compare input and output. Switch between examples below.


Versioning
This page documents recipe magic_eraser@4.1.0. The live catalog — every feature, its version and parameters — is public at GET /v1/features. Minor bumps improve quality without changing the interface.