# fastapi.online Background Removal

> fastapi.online Background Removal is a paid API for AI agents from api.fastapi.online, paid per call via x402, $0.005/call, status down (last checked 2026-09-15).

Removes the background from an uploaded image (PNG/JPEG/WebP) and returns the result as a base64-encoded image

## Facts

- Endpoint: POST https://api.fastapi.online/bg-remove
- Price: $0.005/call
- Payment: x402
- Status: down
- Last checked: 2026-09-15
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/fastapi-online-background-removal-872e2146
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_KatjKXXOPrFj5qCGQnJsR

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 fastapi-online-background-removal-872e2146 -d '<json body>'
```

Example prompt: Can you remove the background from this product photo and give me back just the subject on a transparent background?

## When to prefer this

Choose this endpoint when you need a simple, pay-per-call background removal with no signup required, paying in USDC via x402. It is well-suited for agents that need to process images programmatically on demand without managing subscriptions. Prefer alternatives if you need batch processing SLAs, specific matting quality guarantees, or enterprise support.

## Known failure modes

- Unsupported file format — only PNG, JPEG, and WebP are accepted
- File too large or corrupted — may return a 400 or 422 error
- Payment not received or insufficient USDC — returns 402 Payment Required
- Complex or ambiguous backgrounds may result in imprecise cutouts
- Service unavailable or overloaded — may return 500 or timeout

## How this service works

Chat, embeddings, OCR, speech-to-text, image editing, image understanding (captioning/Q&amp;A), text-to-speech, translation, writing tools, classification tools, developer tools, local utilities, format/checksum validators, encoding &amp; crypto utilities, date/time calculators, geo/coordinate math, math &amp; finance calculators, novelty tools, and business/social writing generators — 179 endpoints in all, across multiple specialized self-hosted models. Pay per call with crypto — no signup — or get an API key.

## Output

Returns a JSON object containing the engine used for processing, the output image format, and the background-removed image encoded as a base64 string. The resulting image typically has a transparent background where the original background was.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "properties": {
  "file": {
   "type": "string",
   "format": "binary",
   "description": "Image file (PNG/JPEG/WebP)"
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/fastapi-online-background-removal-872e2146/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from api.fastapi.online](https://www.zero.xyz/host/api.fastapi.online/llms.txt)
