DEDUPED Hot AI repos. Real use cases. What people build. Get the Monday 5

How to host a private background removal API with Docker with Unbagrnd

Run the Axum REST API on your own server, then create API keys for your apps.

Short answer: Clone the repository and copy the example environment file; then cp .env.example .env; edit .env and set UNBAGRND_ADMIN_KEY, for example with openssl rand -hex 32. All steps.

  • Content
  • Intermediate
  • 30 minutes
  • From the README
  • Any agent

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

  1. Clone the repository and copy the example environment file.
  2. cp .env.example .env
  3. Edit .env and set UNBAGRND_ADMIN_KEY, for example with openssl rand -hex 32.
  4. docker compose up --build
  5. curl http://localhost:8080/health should 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.

Use this in your AI agent

Ask your agent

Using the Deduped MCP, get the setup steps for zidniryi/unbagrnd and "Host a private background removal API with Docker"

Add Deduped to Claude Code once

claude mcp add --transport http deduped https://dedupedai.com/mcp

Cursor, ChatGPT, others

Share: X LinkedIn Hacker News Email Copy link

Third-party repos we don't own. AI-written use cases can be wrong. Disclaimer