API Documentation

Integrate unlimited self-hosted background removal into your apps.

Authentication

Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

POST /remove-background

Upload an image as multipart/form-data:

POST https://shop.kheriwala.com/remove-background
Content-Type: multipart/form-data

image: (binary)
format: png|jpg|webp
enhance: 0|1
blur_bg: 0|1
bg_color: #ffffff
{
  "url": "https://cdn.example.com/output.png",
  "format": "png"
}

Output Formats

  • PNG — Transparent background, HD edges
  • JPG — Solid or custom color background
  • WEBP — Optimized for web

Webhooks

Configure webhook URL in BGRemove AI → Settings for async bulk processing notifications.