Python function on Vercel

shnwazdev-rembgapi

A small production-ready API for removing image backgrounds with rembg, built for upload, base64, raw bytes, and remote image URLs.

Live endpoint https://shnwazdev-rembgapi.vercel.app/api/remove
Default model u2netp
Warm request about 3 seconds

Quick start

Send an image, receive a transparent PNG.

curl -s -F file=@input.jpg \
  https://shnwazdev-rembgapi.vercel.app/api/remove \
  -o output.png
01

Multiple input paths

Use multipart uploads, JSON base64, form URLs, or raw image bytes.

02

Clear client errors

Bad URLs, private hosts, non-image responses, and size issues return JSON errors.

03

Serverless defaults

Uses the lightweight model by default and caches model files during warm reuse.

upload validate remove png

Reference

Everything needed for integration lives on the docs page.

Open API docs