withoutBG API Documentation#
Get started quickly. Explore APIs, SDKs, examples, and error handling. All endpoints require X-API-Key. Rate limit 7 requests/minute.
API Endpoints#

Background Removal (Binary)#
POST /v1.0/image-without-background
Returns binary PNG with transparency. Best for servers, CLIs, batch workflows, and direct file I/O without JSON overhead.

Background Removal (Base64)#
POST /v1.0/image-without-background-base64
Returns base64 PNG in JSON. Best for browsers, JSON APIs, serverless functions, and embedded workflows.

Alpha Matte (Binary)#
POST /v1.0/alpha-channel
Returns grayscale PNG mask for compositing and advanced pipelines. Enables non-destructive editing and multiple background variants.

Alpha Matte (Base64)#
POST /v1.0/alpha-channel-base64
Returns base64 PNG mask in JSON. Best for browser compositing, Canvas/WebGL workflows, and embedded applications.

API Credits Info#
GET /available-credit
Returns credit balance and expiration date. Use for gating features, monitoring usage, and setting up alerts.
| Method | Path | Returns | Best for |
|---|---|---|---|
| POST | /v1.0/image-without-background | Binary PNG | Servers, CLIs, batch |
| POST | /v1.0/image-without-background-base64 | Base64 JSON | Browsers, JSON APIs |
| POST | /v1.0/alpha-channel | Binary mask | Compositing pipelines |
| POST | /v1.0/alpha-channel-base64 | Base64 mask | Browser compositing |
| GET | /available-credit | Credit balance | Monitoring, gating |
SDKs#
Python SDK#
Local Focus v1.0.0 (free) and cloud modes. Includes CLI, batch processing, and comprehensive examples. Handles authentication, retries, and error handling automatically.
Why withoutBG?#
- Open & premium options - Apache-2.0 models + a managed API
- Flexible deployment - CPU/GPU local or cloud at scale
- Simple integration - Python API and CLI
- Production-ready - Powers apps processing 100k+ images