Background Remover API — Batch, Transparent PNG, Pay per Image
Pricing
from $5.00 / 1,000 background removeds
Background Remover API — Batch, Transparent PNG, Pay per Image
Remove the background from one or many image URLs and get, for each image, a dataset item with the transparent PNG or WebP cutout URL, width and height. AI background removal in batch, optional mask, no API key, pay per image.
Pricing
from $5.00 / 1,000 background removeds
Rating
0.0
(0)
Developer
Sherwood
Maintained by CommunityActor stats
0
Bookmarked
5
Total users
4
Monthly active users
24 days ago
Last modified
Categories
Share
Give it one image URL or a thousand, or the dataset of another Actor, and get every image with its background removed as a transparent PNG (or WebP), one dataset item per image: the cutout URL, its width and height, optionally the mask, or a clear error. Uses the BiRefNet v2 segmentation model with foreground refinement. No API key, no GPU, no subscription. $0.005 per image delivered, failures are free.
Built for automation and AI agents: send a list in imageUrls, or a single URL (or a comma-separated string) in imageUrl; every alias (imageUrls, imageUrl, urls, images, startUrls, imageFiles) is merged, nothing is required, and the default input runs on its own so you can see the output shape before sending your own files. Images can be public URLs, Google Drive or Dropbox share links, Google Drive file IDs, base64 images or data URIs (handy from n8n, Make or Zapier), or files uploaded from the Apify console.
Pairs with Image Upscaler API for a complete product-photo pipeline: cut out, then enlarge. The upscaler reads this Actor's dataset directly (datasetId) and keeps the transparency in PNG and WebP.
What you get
One item per image, in your dataset:
{"index": 0,"inputUrl": "https://example.com/product.jpg","outputUrl": "https://api.apify.com/v2/key-value-stores/abc123/records/cutout-0000.png","maskUrl": null,"width": 1024,"height": 1024,"mode": "general","format": "png","model": "fal-ai/birefnet/v2","durationMs": 3800,"status": "ok","error": null}
A failed image (unreachable URL, not an image, over 25 MB) comes back with "status": "error" and the reason in error. It is never charged. A string that is not an image source at all (a file name, a broken ID) also comes back as an error item, so nothing is silently dropped. For a base64 image, inputUrl holds a short label (data:image/png;base64,iVBOR…) rather than the whole payload.
Use cases
- Cut out product photos for marketplaces, catalogs and ads, in bulk.
- Prepare portraits and avatars with clean hair edges (
mode: "portrait"). - Produce masks for compositing or further editing (
includeMask: true). - Clean up images pulled from a scraper before they reach a design pipeline.
- Give an AI agent or an n8n / Make / Zapier flow a single call that handles a whole list.
Input
| Field | Type | Default | Notes |
|---|---|---|---|
imageUrls | array | two sample images | Public JPG, PNG or WebP URLs, Google Drive or Dropbox share links, Google Drive file IDs, base64 images or data URIs. For a single item or a comma-separated string, use imageUrl. |
imageFiles | array | — | Files uploaded from the console (stored in a key-value store of your choice). Through the API: key-value store record links, or any image URLs. |
imageUrl, urls, images, startUrls | aliases | — | Merged with imageUrls, duplicates removed. startUrls accepts {"url": "..."} objects. |
datasetId | string | — | Read the image URLs from an Apify dataset instead (see below). |
urlField | string | auto | Field holding the image URL in each dataset item: images[].url, photo.thumbnails[0].url... |
maxImagesPerItem | integer | 1 | Image URLs taken from each dataset item. |
keepFields | array | — | Fields copied from each dataset item into its result, under source (SKU, ASIN, listing URL). |
mode | general, portrait, matting, heavy | general | portrait for people, matting for hair/fur/glass edges, heavy for complex scenes (slower). |
outputFormat | png, webp | png | Both keep transparency. |
includeMask | boolean | false | Adds maskUrl (black-and-white PNG) to each item. |
highResolution | boolean | false | Process at 2048×2048 instead of 1024×1024; finer edges on large images, about twice as slow. |
maxImages | integer | 100 | Stop after this many images. |
Minimal call:
{ "imageUrls": ["https://example.com/a.jpg", "https://example.com/b.png"] }
Other ways to give images
Every item of imageUrls (or of any alias) can be:
- a public URL of a JPG, PNG or WebP file;
- a Google Drive share link (
https://drive.google.com/file/d/ID/view?usp=sharing,open?id=ID,uc?id=ID) or just the file ID, for a file shared with anyone who has the link; - a Dropbox share link (
https://www.dropbox.com/s/.../photo.jpg?dl=0,scl/fi/...), converted to a direct download; - a base64 image or a data URI (
data:image/png;base64,...), the way n8n, Make and Zapier hand over binary data; - an Apify key-value store record link (
https://api.apify.com/v2/key-value-stores/STORE/records/KEY), read with the run's permissions, which is what the console's Upload images field (imageFiles) produces.
{"imageUrls": ["https://drive.google.com/file/d/1AbC.../view?usp=sharing","1AbC...","https://www.dropbox.com/s/abc123/photo.jpg?dl=0","data:image/png;base64,iVBORw0KGgo..."]}
A Drive file that is not shared publicly answers with a web page instead of an image: the item comes back as an error saying so, free of charge. Private Google Drive access (OAuth) is not supported.
Chain it after another Actor
Give datasetId (a dataset ID or name) and the Actor reads the image URLs from its items: the output of a product scraper or of AI Image Generator. The image field is detected automatically (outputUrl, highResolutionImages, imageUrls, images, displayUrl, thumbnailImage...), or set it with urlField.
{"datasetId": "YOUR_DATASET_ID","urlField": "images[].url","keepFields": ["sku", "url"]}
To run it automatically after another Actor, add it on that Actor's Integrations tab with the input { "datasetId": "{{resource.defaultDatasetId}}" }; the platform fills in the dataset of each finished run. Each result carries sourceItemIndex, the position of the item it came from, and the fields listed in keepFields.
Pricing
- Background removed — $0.005 per image delivered, mask included when requested.
- Failed, unreachable or non-image URLs: free.
Set a maximum cost per run in Apify and the Actor stops cleanly when it is reached; remaining images are reported, not processed.
Via API, n8n, Make or MCP
Call it like any Apify Actor: POST https://api.apify.com/v2/actors/sherwood~background-remover-batch/run-sync-get-dataset-items with the JSON input above, or add it as a tool through the Apify MCP server. Results are plain dataset items, so get-dataset-items returns the URLs directly.
Limits
- Input images up to 25 MB each, from public http(s) URLs, share links or uploads. Base64 images travel inside the Actor input, so keep them to a few MB.
- Output files live in the run's key-value store and follow your account's data retention.
- Processing time is typically 2 to 6 seconds per image; 4 images are processed in parallel.