# Cutout (`cutout-1`): Background removal

Transparent PNG of the subject, background gone.

Cutout removes the background from a photo and returns a transparent PNG of the subject: products, people, pets, cars. Ask for `format: "mask"` to get the black-and-white mask instead and composite it yourself.

- **Price:** $2.00 per 1,000 images. One unit per image.
- **Languages:** Not applicable
- **Input:** An image: an https URL, a data URL (`data:image/png;base64,...`), or a file in a multipart upload. JPEG, PNG, WebP, GIF, AVIF or TIFF, up to 10 MB.
- **Batch:** no, one input per call
- **Status:** live
- **Built on:** [DIS ISNet general-use (xuebinqin/DIS)](https://github.com/xuebinqin/DIS), Apache-2.0 (ONNX export by img.ly, MIT), 44M

## Request

```bash
curl https://labs.greatwork.company/v1/run \
  -H "Authorization: Bearer $GWL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"model":"cutout-1","input":"https://labs.greatwork.company/examples/product.jpg"}'
```

Upload a local file with multipart: `curl https://labs.greatwork.company/v1/run -H "Authorization: Bearer $GWL_API_KEY" -F model=cutout-1 -F input=@file`

## Options

| Name | Type | Required | Default | Description |
|---|---|---|---|---|
| `input` | image (URL, data URL or upload) | yes | | An image: an https URL, a data URL (`data:image/png;base64,...`), or a file in a multipart upload. JPEG, PNG, WebP, GIF, AVIF or TIFF, up to 10 MB. |
| `format` | string (png \| mask) | no | `"png"` | `png` for the cutout with transparency, `mask` for the alpha mask. |

## Output

| Field | Type | Description |
|---|---|---|
| `image` | string | PNG as a data URL. |
| `foreground` | number | Share of the image kept, 0 to 1. |
| `width` | integer | Output width (long side up to 2,048 px). |
| `height` | integer | Output height. |

The response envelope is always `{"id", "object": "run", "model", "created", "output", "usage": {"units", "unit", "cost_usd", "cost_micros"}, "latency_ms"}`.

## Examples (real outputs from our servers)

### Product

```json
{
  "model": "cutout-1",
  "input": "https://labs.greatwork.company/examples/product.jpg"
}
```

```json
{
  "image": "/examples/out/cutout-1-0.png",
  "format": "png",
  "width": 1024,
  "height": 1024,
  "foreground": 0.146
}
```

5062 ms, $0.002.

## Good for

- Product photos on white or transparent
- Profile pictures and stickers
- Thumbnails with the subject cut out
- Masks for image editing

## Limits and caveats

- Hair and fur edges are soft, not strand-perfect.
- Busy scenes with several subjects may keep more than you want.
- Takes a few seconds per image.
