# Remove Background

For AI agents: this is the Markdown version of https://docs.fashiolabs.com/tools/remove_background.html. The index of all Fashio API docs is at https://docs.fashiolabs.com/llms.txt, and the complete reference in one file is at https://docs.fashiolabs.com/llms-full.txt.

Removes the background from a product or on-model photo, leaving a clean cutout — the cheapest tool in the catalog, deterministic, with no creative controls.

`toolId: "remove_background"` · 2 credits · deterministic

![Remove Background result — clean cutout with transparent background](https://firebasestorage.googleapis.com/v0/b/fashio-ai-app.firebasestorage.app/o/fal_outputs%2Fremove_bg.jpg?alt=media)

## What it does

Fashio strips the background out of the photo you send in, leaving a clean cutout of the product or model. Output preserves the input's framing exactly — the background simply becomes transparent/removed. There's no prompt and no selectors, just the image.

## Request body

| Field | Type |  | Description |
| --- | --- | --- | --- |
| `toolId` | string | required | Always `"remove_background"`. |
| `images.user_photo` | string | required | URL of the photo to remove the background from (from `POST /v1/uploads` or your own hosting). |

No pose, no ratio, no prompt fields — same minimal shape as [Enhance / Upscale](https://docs.fashiolabs.com/tools/photo_enhance.md).

## Example request

**cURL**

```bash
curl -X POST https://api.fashiolabs.com/v1/generations \
  -H "Authorization: Bearer fio_live_YOUR_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "toolId": "remove_background",
    "images": {
      "user_photo": "https://your-cdn.com/photo.jpg"
    }
  }'
```

**Node.js**

```javascript
const res = await fetch("https://api.fashiolabs.com/v1/generations", {
  method: "POST",
  headers: {
    Authorization: "Bearer " + process.env.FASHIO_API_KEY,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    toolId: "remove_background",
    images: {
      user_photo: "https://your-cdn.com/photo.jpg",
    },
  }),
});
const { id } = await res.json();
```

**Python**

```python
import os, requests

res = requests.post(
    "https://api.fashiolabs.com/v1/generations",
    headers={"Authorization": f"Bearer {os.environ['FASHIO_API_KEY']}"},
    json={
        "toolId": "remove_background",
        "images": {
            "user_photo": "https://your-cdn.com/photo.jpg",
        },
    },
)
job_id = res.json()["id"]
```

## Response

**202 Accepted**

```json
{ "success": true, "id": "8b1e...", "status": "processing" }
```

Poll `GET /v1/generations/:id` (see [Quickstart](https://docs.fashiolabs.com/quickstart.md)) until it completes:

**200 · completed**

```json
{
  "success": true,
  "id": "8b1e...",
  "status": "completed",
  "resultUrls": ["https://.../result.jpg"],
  "errorMessage": null
}
```

## Common errors

| Status | Meaning |
| --- | --- |
| 400 | `remove_background: missing required image "user_photo"` — required image field wasn't resolvable. |
| 402 | `Insufficient diamonds. Required 2, have <n>.` |
| 429 | Daily request cap reached for this key — see [Rate Limits](https://docs.fashiolabs.com/rate-limits.md). |

## Related tools

- [Enhance / Upscale](https://docs.fashiolabs.com/tools/photo_enhance.md) — another deterministic, no-prompt pass on an existing photo.
- [Mannequin to Flat Lay](https://docs.fashiolabs.com/tools/model_to_flat_lay.md) — a more involved product-photo transform.

---

Source: https://docs.fashiolabs.com/tools/remove_background.html · OpenAPI spec: https://docs.fashiolabs.com/openapi.yaml · Docs index: https://docs.fashiolabs.com/llms.txt
