{
 "schema_version": 1,
 "generated": "2026-10-20",
 "id": "zidniryi-unbagrnd--self-host-a-background-removal-api",
 "repo": "zidniryi/unbagrnd",
 "repo_url": "https://github.com/zidniryi/unbagrnd",
 "repo_slug": "zidniryi-unbagrnd",
 "title": "Host a private background removal API with Docker",
 "page_title": "How to host a private background removal API with Docker with Unbagrnd",
 "summary": "Run the Axum REST API on your own server, then create API keys for your apps.",
 "who": "A developer or small team that wants background removal inside its own product, with images staying on its own server.",
 "problem": "Calling a third-party cloud service sends customer images off your infrastructure and adds per-use cost.",
 "outcome": "A running background removal API on your server, with a health check that returns ok and a working API key for callers.",
 "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 --build`",
  "`curl http://localhost:8080/health` should return {\"status\":\"ok\"}, then create a key with POST /v1/keys using your X-Admin-Key header."
 ],
 "agent_prompt": "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>.",
 "agents": [
  "any"
 ],
 "difficulty": "Intermediate",
 "time": "30 minutes",
 "basis": "readme",
 "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.",
 "category": "Content",
 "tags": [
  "Content"
 ],
 "lang": "rust",
 "requirements": [
  "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"
 ],
 "risk": "none",
 "seen_in_the_wild": false,
 "mentioned_publicly": false,
 "risks": [
  {
   "tag": "credentials",
   "notice": "The UNBAGRND_ADMIN_KEY controls API key creation and revocation, so store it securely and never commit it to version control."
  }
 ],
 "best": false,
 "score": 0.7,
 "evidence": [],
 "url": "https://dedupedai.com/use-cases/zidniryi-unbagrnd/self-host-a-background-removal-api/",
 "md": "https://dedupedai.com/use-cases/zidniryi-unbagrnd/self-host-a-background-removal-api/index.md",
 "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 hello@dedupedai.com and we will look at it promptly.",
 "api": "https://dedupedai.com/api/v1/usecases/zidniryi-unbagrnd--self-host-a-background-removal-api.json",
 "api_version": "v1"
}
