Credentials. The UNBAGRND_ADMIN_KEY controls API key creation and revocation, so store it securely and never commit it to version control.
Who it is forA developer or small team that wants background removal inside its own product, with images staying on its own server.
The problemCalling a third-party cloud service sends customer images off your infrastructure and adds per-use cost.
The outcomeA running background removal API on your server, with a health check that returns ok and a working API key for callers.
What you need first
- A Windows, macOS (Apple Silicon), Linux, or Android device
- Internet access once, to download the AI model on first use (about 170 MB)
- For building from source: Node.js 20+, Rust 1.88+ via rustup, and the Tauri prerequisites for your OS
- For the API: Docker with docker compose, and openssl to generate an admin key
Steps
- Clone the repository and copy the example environment file.
cp .env.example .env- Edit .env and set UNBAGRND_ADMIN_KEY, for example with
openssl rand -hex 32. docker compose up --buildcurl http://localhost:8080/healthshould return {"status":"ok"}, then create a key with POST /v1/keys using your X-Admin-Key header.
Prompt for your agent
Clone github.com/zidniryi/unbagrnd, set UNBAGRND_ADMIN_KEY in .env, and start the stack with docker compose up --build. Expected output: a health response of {"status":"ok"} from http://localhost:8080/health. Verify the response and then use a generated key to call POST /v1/remove-background with an image from <image path>.
Caveat. The API routes beyond /health and key management are not fully documented in the README excerpt, so check the Swagger UI at /docs for exact request formats.
Get 5 new use cases every morning. Free, one short email, unsubscribe anytime.
Get them freeShare: X LinkedIn Hacker News Email Copy link
Disclaimer
Deduped lists open-source repositories that belong to other people. We do not own, maintain, audit, or vouch for any of them, and a repo appearing here is not an endorsement or a safety check. The use cases, steps, and prompts are written by AI and may be incomplete, outdated, or just wrong. Where a use case is marked "Seen in the wild", we link to public posts where someone described something similar, but we have not verified those posts and the use case itself is still our AI's own write-up. Use all of this at your own risk. Only run code, commands, or agents on systems and accounts you are authorized to use, and read the code and every command before you run it, especially anything that touches credentials, files, or the network. Nothing here is professional, security, legal, or financial advice. All trademarks and project names belong to their respective owners, and their use here does not imply affiliation. Content is provided as is, without warranties of any kind. Found a mistake, a safety problem, or something you want removed? Email [email protected] and we will look at it promptly. Full disclaimer page