# three.ws Background Removal Pipeline (rembg)

> three.ws Background Removal Pipeline (rembg) is a paid API for AI agents from three.ws, paid per call via x402, $0.01/call, status unknown (last checked 2026-10-11).

Removes the background from an image at a given URL using a selectable segmentation model, returning a transparent PNG persisted to CDN.

## Facts

- Endpoint: POST https://three.ws/api/x402/pipeline-rembg?utm_source=zero.xyz
- Price: $0.01/call
- Payment: x402
- Status: unknown
- Last checked: 2026-10-11
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/three-ws-background-removal-pipeline-rembg-29a448c2
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_Ih3rAzJM961nVB3r8BVJ-

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability three-ws-background-removal-pipeline-rembg-29a448c2 -d '<json body>'
```

Example prompt: Remove the background from this photo — https://example.com/my-headshot.jpg — and use the birefnet model for the cleanest hair and edge detail.

## When to prefer this

Choose this endpoint when you need fast, API-driven background removal with selectable segmentation models (including specialist options like u2net_human_seg for people or birefnet for fine hair detail), automatic CDN persistence of results, and per-call micropayment pricing at $0.01 USDC — especially when building pipelines for 3D avatar creation or product photo workflows on three.ws.

## Known failure modes

- Image URL is not publicly accessible or returns a non-200 status — endpoint cannot fetch the source
- Unsupported image format (e.g. BMP, TIFF) — only PNG, JPEG, WEBP, GIF are supported
- Model processing timeout for slow models like birefnet on very large images
- Invalid or malformed URI in image_url field — request rejected with validation error
- Payment not fulfilled — x402 micropayment of $0.01 USDC required per call

## How this service works

Make a 3D AI agent from a selfie in 60 seconds. Drop one HTML tag to embed it on any website. Agents think on IBM watsonx.ai (Granite); optionally charge per chat with built-in micropayments.

## Output

A JSON object containing the output CDN URL of the background-removed transparent PNG, the segmentation model used, the byte size of the output, the original input URL, the pipeline stage name ('rembg'), and a boolean confirming the result was persisted to CDN.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "model": {
   "enum": [
    "rmbg2",
    "birefnet",
    "u2net",
    "isnet",
    "u2net_human_seg",
    "silueta"
   ],
   "type": "string",
   "default": "rmbg2",
   "description": "Segmentation model. rmbg2 (default, general, ~1s), birefnet (BiRefNet, cleanest hair and thin edges, ~6s), u2net_human_seg (people), isnet, u2net, silueta."
  },
  "image_url": {
   "type": "string",
   "format": "uri",
   "description": "Public HTTPS URL of the source image (PNG, JPEG, WEBP, or GIF)."
  }
 }
}
```

## Response schema (JSON Schema)

```json
{
 "type": "json",
 "example": {
  "bytes": 284112,
  "model": "rmbg2",
  "stage": "rembg",
  "input_url": "https://three.ws/avatars/thumbs/default.png",
  "persisted": true,
  "output_url": "https://three.ws/cdn/x402-pipeline/rembg/abc123.png"
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/three-ws-background-removal-pipeline-rembg-29a448c2/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from three.ws](https://www.zero.xyz/host/three.ws/llms.txt)
