withoutbg/withoutbg-python ? reverse-engineered prompt

Reverse engineered prompt

Build me a small Python package for removing image backgrounds, with the same simple API whether it runs locally or uses a cloud service.

I want to be able to pass in a photo, get back an image with transparency, and save it as PNG or WebP without losing the cutout. The local version should work offline on CPU, be private, and only download the model once. The cloud version should use an API key and give better results on things like hair and fur. Please include a tiny command line tool too, so I can run it on one image or a whole folder from the terminal.

It should also have batch processing, a progress callback, and clear errors when the API or image processing fails. Add a few examples and basic tests, and make the install and first run as easy as possible. If anything needs current docs or model details, look them up online first.

Are you gonna build this?

make sure you review the code using coderabbit

Try freeSponsored — opens CodeRabbit in a new tab