People Background Removal API
About
Send a photo of people, as a file or a link, and get it back with the background removed: on transparency, as a black-and-white mask, or on a new color or background image. The response also gives the person's bounding box.
Transparent PNG or mask
Get a PNG of the person on a transparent background, with the edge pixels kept semi-transparent, or a grayscale mask to use in your own editor or pipeline.
New background in the same call
Fill the background with any color, or send a background image: the person is placed on it, centered, and the result keeps the size of your original photo.
Demo
Try the People Background Removal API without signing up: pick a sample photo or upload your own, then drag the slider to compare.
Ready to try the API?
First, register on the API4AI portal and get your API key: no credit card, and $5 of free credit to start.
$
curl -X "POST" \ "https://api4ai.cloud/img-bg-removal/v1/people/results" \ -H "X-API-KEY: $YOUR_API_KEY" \ -F "url=https://static.api4.ai/samples/img-bg-removal-people-2.jpg"
Benefits
A production API for photos of people: one HTTPS call in, the result back as JSON, and commercial use of the results included (Terms of Use).
Off-the-shelf
solution
Nothing to train or host: get a key on the portal and send your first photo with the curl line above.
REST
API
Works from any language that can send an HTTP request, with code examples on GitLab.
Pay as
you go
No subscription: pay only for the photos you process, and your balance never expires.
Built for
people
Made for photos where the subject is a person: portraits, group photos, team headshots and model shots.
Use cases
Who uses it: photo and profile apps, online fashion stores, and teams that need every portrait on the same background.
FAQ
-
Pay as you go: $15 per 1,000 photos ($0.015 a photo), with no subscription, and your balance never expires. New accounts get $5 free, enough for 333 photos. Volume prices from about 5,000 photos of people a month: contact us.
-
This one, for photos where the subject is a person: portraits, group photos and model shots. For products, pets and other objects, use the Background Removal API; for vehicles, the Car Background Removal API.
-
Yes. Pass a color (for example ffffff for white) to fill the background, or send a background image as a file or a link. It is placed behind the person, centered, and the result keeps the size of your original photo.
-
JSON with the result as a base64-encoded PNG and the person's bounding box. Add mode=fg-mask to get a black-and-white mask instead of the cut-out.
-
JPG and PNG, up to 16 MB and 4096×4096 pixels. Send the file itself or a link to a public image.
-
Yes. The results are yours to use in your own products, ads and listings (Terms of Use).