# Background removal

> Cut a building or product out onto a transparent background. $0.0297 per image.

Source: https://developers.mnml.ai/docs/models/bg-remove

- **Price:** $0.0297 (per image)
- **Endpoint:** POST /v2/enhancements (kind: bg-remove)
- **Account:** Any account (Free and topped-up)

## Run it

Send it to [POST /v2/enhancements](https://developers.mnml.ai/docs/enhancements). It answers `202` with a job; poll [GET /v2/jobs/{id}](https://developers.mnml.ai/docs/jobs) for the result. A job that fails is refunded.

**curl**

```bash
curl -X POST https://api.mnml.ai/v2/enhancements \
  -H "Authorization: Bearer $MNML_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "kind": "bg-remove",
    "job_id": "10482"
  }'
```

**TypeScript**

```ts
const res = await fetch("https://api.mnml.ai/v2/enhancements", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.MNML_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "kind": "bg-remove",
    "job_id": "10482"
  }),
});

const data = await res.json();
```

**Python**

```python
import os, requests

res = requests.post(
    "https://api.mnml.ai/v2/enhancements",
    headers={"Authorization": f"Bearer {os.environ['MNML_API_KEY']}"},
    json={
      "kind": "bg-remove",
      "job_id": "10482"
    },
)

data = res.json()
```

## Fields

- `kind: "bg-remove"`, required. It takes nothing else.
- One source: `image` (a link, base64, or the file itself as multipart), or `job_id` to work on a finished job’s output without downloading it.
- `webhook_url`, optional: where to send this job’s settle event.

## Price

$0.0297 per image, whichever engine made the image.

| Top-up | Covers about |
| --- | --- |
| $10 | 337 images |
| $25 | 842 images |
| $50 | 1,683 images |
| $100 | 3,367 images |

## Related

- [Enhance an image](https://developers.mnml.ai/docs/enhancements): every field of the call.
- [Sending the image](https://developers.mnml.ai/docs/renders#image): a file, a link or base64, for a source or a mask.
- [Pricing](https://developers.mnml.ai/docs/pricing): the wallet and every price.
