Self-hosted withoutBG v3 background removal API (GPU, CUDA, FastAPI).
4.7K
Self-hosted withoutBG open weights background removal API with GPU acceleration. Runs the v3 ONNX model via CUDA for faster inference.
Requires an NVIDIA GPU and the NVIDIA Container Toolkit.
docker run --rm --gpus all -p 8000:8000 withoutbg/withoutbg-openweights-v3-service-gpu:latest
Health check: http://localhost:8000/health
Published for linux/amd64 only (NVIDIA CUDA on x86_64).
| Endpoint | Method | Description |
|---|---|---|
/health | GET | Liveness probe |
/ready | GET | Readiness probe (model loaded) |
/v1/remove-background | POST | Remove image background (raw image or multipart) |
/v1/licenses | GET | Model and dependency licenses |
/docs | GET | OpenAPI / Swagger UI |
Same input/output schema as the withoutBG Mac Local API: send a raw JPEG/PNG body (or multipart field image); response is image/png with headers X-Latency-Ms, X-Route-Category and X-Route-Pipeline (matting or birefnet). Use ?output=matte for a grayscale alpha matte instead of the default cutout.
curl -X POST \
--data-binary @photo.jpg \
-H "Content-Type: image/jpeg" \
http://127.0.0.1:8000/v1/remove-background \
-o result.png
curl -X POST "http://127.0.0.1:8000/v1/remove-background?output=matte" \
-H "Content-Type: image/png" \
--data-binary @photo.png \
-o matte.png
The withoutBG Open Weights 10.8.0 bundle (~1.5 GB, baked into the image): a trained router sends fine strands, soft detail and transparency to the withoutBG matting model, and hard opaque objects, flat scenes and vehicles to BiRefNet. Only the selected branch runs.
| Image | Use case |
|---|---|
withoutbg/withoutbg-openweights-v3-service-cpu | Same API, CPU only |
withoutbg/withoutbg-openweights-v3-app-cpu | Web UI + API (CPU) |
withoutbg/withoutbg-openweights-v3-app-gpu | Web UI + API (GPU) |
/v1/licenses in the running containerContent type
Image
Digest
sha256:f882accd6…
Size
3.8 GB
Last updated
2 days ago
docker pull withoutbg/withoutbg-openweights-v3-service-gpu