For developers

Self-hosted background remover API

Kavij is open source, so its background-removal endpoint is yours to run. Host it with Docker and call your own API — no per-call fees, no third-party quota, and images that never leave your infrastructure.

✦ Remove a background free → No sign-up · no watermark · images never stored

Your own endpoint, no per-call fees

Hosted background-removal APIs charge per image and send every upload to their servers. Kavij flips that: run the container on your own machine and you get an unlimited local endpoint at no marginal cost, with your images staying entirely within your infrastructure — which matters for regulated, private, or high-volume workloads.

Call the /api/remove endpoint

Send a multipart POST with your image and an optional model and hair-refinement flag; get back a transparent PNG. It's a single request:

curl -X POST http://localhost:8420/api/remove \
  -F "image=@photo.jpg" \
  -F "model=precise" \
  -F "alpha_matting=true" \
  -o cutout.png

The model field accepts standard, fast, precise, or anime; alpha_matting=true refines hair and fur edges. A GET /api/health endpoint reports engine status for readiness checks.

Run it in one command

The project ships a Dockerfile and docker-compose.yml. With Docker installed, one command builds the image and serves the API, and the AI model downloads once into a cached volume:

docker compose up -d --build

The full source is on GitHub under an MIT license, so you can audit it, extend it, or wire it into your own pipeline.

Frequently asked questions

Is there a background remover API?

Yes. Kavij exposes a POST /api/remove endpoint that accepts an image and returns a transparent PNG. Because Kavij is open source and self-hosted, you run the endpoint yourself with no per-call fees.

How is a self-hosted API more private?

Requests hit your own server, images are processed in memory, and nothing is sent to a third party. You control the infrastructure end to end, which suits regulated or confidential workloads.

What does it cost?

The software is free and MIT-licensed. You only pay for the machine you run it on — there are no per-image or per-call charges.

Try it now — it's free

Remove a background in seconds. No sign-up, no watermark.

Upload an image →