AI Background Remover (Transparent PNG, No API Key) avatar

AI Background Remover (Transparent PNG, No API Key)

Pricing

from $9.00 / 1,000 image processeds

Go to Apify Store
AI Background Remover (Transparent PNG, No API Key)

AI Background Remover (Transparent PNG, No API Key)

Remove the background from any image and get a transparent PNG or WebP cutout. Self-hosted IS-Net and U2-Net AI models, optional solid background color, crop to subject and mask output. No external APIs.

Pricing

from $9.00 / 1,000 image processeds

Rating

0.0

(0)

Developer

Camp8 fr0

Camp8 fr0

Maintained by Community

Actor stats

0

Bookmarked

1

Total users

0

Monthly active users

5 days ago

Last modified

Features

Limited permissionsSingle-tenantServer interface

Share

AI Background Remover: Remove Image Backgrounds to Transparent PNG (No API Key)

Remove the background from any photo and get a transparent PNG or WebP cutout in seconds. The Actor runs open-source AI segmentation models (IS-Net and U2-Net, the same models used by the popular rembg tool) on Apify. No remove.bg or other paid API, no API key, and your images are never sent to a third-party service.

What does Background Remover do?

Give it a list of image URLs. For each image, the Actor:

  1. downloads and decodes the image (JPEG, PNG, WebP, AVIF, GIF, TIFF; EXIF rotation is applied),
  2. predicts a foreground mask with the AI model you choose,
  3. uses the mask as the alpha channel and saves a transparent PNG/WebP, or flattens it onto a solid background color,
  4. optionally crops to the subject and saves the grayscale mask,
  5. returns a dataset row with a public link to the result plus size, foreground ratio and timing.

Pre- and post-processing reproduce rembg step by step: the same resize filter, normalization and min-max mask scaling. On our test images the masks match rembg within 1/255.

Key features

  • Self-hosted AI models: IS-Net general-use (best quality, default), U2-Net, U2-Net-P (fast), Silueta and U2-Net human segmentation for portraits. All are open source and licensed for commercial use.
  • Transparent PNG or WebP output. WebP files are often 5-10x smaller and keep transparency.
  • Background color replacement: put the cutout on white (#ffffff) for Amazon, eBay or Shopify product photos, or on any other hex color.
  • Crop to subject: removes the empty margins around the subject.
  • Mask export: get the black-and-white segmentation mask for your own compositing.
  • Edge controls: an optional hard threshold and feather (a lightweight alpha-matting step) to clean up halos.
  • Large images: inputs are downscaled to maxSidePx (default 4096 px), so time and memory stay predictable.
  • Fast HTTP API (Standby mode): call it like a regular REST endpoint and optionally get the PNG back as base64 in the response.
  • Pay per image. Images that fail (broken links, non-image files) are reported but not charged.

Use cases

  • E-commerce product photos: white or transparent backgrounds for marketplaces and catalogs.
  • Profile pictures and headshots: clean portrait cutouts for team pages, ID-style photos and avatars.
  • Marketing and design: stickers, thumbnails, banners and social media creatives.
  • Real estate, car dealers and classifieds: isolate the item from a cluttered background.
  • AI and data pipelines: build segmentation datasets, generate masks, or preprocess images for other models.
  • Automation: connect it to Make, Zapier, n8n or your own backend to process every new upload automatically.

How to use Background Remover

In Apify Console

  1. Open the Actor and paste one or more image URLs into Image URLs.
  2. Choose a model. isnet-general-use is the best default; u2netp is the fastest.
  3. Optional: set a background color, enable Crop to subject, or choose WebP output.
  4. Click Start. Each result row links to the finished cutout in the run's key-value store.

Via the Apify API

curl -X POST "https://api.apify.com/v2/acts/freecamp008~background-remover/run-sync-get-dataset-items?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"imageUrls": ["https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/portrait-of-woman_small.jpg"], "outputFormat": "png"}'

You can also use the official apify-client packages for JavaScript and Python.

Standby mode (instant HTTP endpoint)

Standby keeps the model loaded, so requests skip the container start. Send the same fields as the Actor input, either as GET query parameters or as a POST JSON body. The response is { "count": n, "items": [...] }.

# GET: arrays are comma-separated
curl "https://freecamp008--background-remover.apify.actor/?token=YOUR_APIFY_TOKEN&imageUrls=https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/portrait-of-woman_small.jpg&model=u2netp"
# POST: also return the cutout as base64 in the response
curl -X POST "https://freecamp008--background-remover.apify.actor/?token=YOUR_APIFY_TOKEN" \
-H "Content-Type: application/json" \
-d '{"imageUrls": ["https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/portrait-of-woman_small.jpg"], "returnBase64": true}'

With returnBase64: true (Standby only), each item also contains imageBase64, contentType and, if returnMask is on, maskBase64. In Standby you can also send small images inline as data:image/...;base64,... URLs.

AI agents can pay per call: because the Actor uses pay-per-event pricing and only default storages, AI agents can call it and pay per request with x402 through Apify. No Apify account setup is needed on the agent side.

Input example

{
"imageUrls": [
"https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/portrait-of-woman_small.jpg"
],
"model": "isnet-general-use",
"outputFormat": "png",
"backgroundColor": "",
"cropToSubject": false,
"returnMask": false,
"maskThreshold": 0,
"featherPx": 0,
"maxSidePx": 4096
}
FieldDescription
imageUrlsImage links. One result per image.
modelisnet-general-use (default, best), u2netp (fastest), u2net, silueta, u2net_human_seg (people).
outputFormatpng or webp.
backgroundColorOptional hex color such as #ffffff. If empty, the background is transparent.
cropToSubjectTrim the empty margins around the subject.
returnMaskAlso save the grayscale mask (maskUrl).
maskThreshold0 keeps soft edges. 1-254 makes a hard cutout at that mask level.
featherPxBlur the mask edge by N pixels.
maxSidePxDownscale larger images to this size (default 4096).
returnBase64Standby API only: include the image as base64 in the HTTP response.

Output example

{
"imageUrl": "https://huggingface.co/datasets/Xenova/transformers.js-docs/resolve/main/portrait-of-woman_small.jpg",
"outputUrl": "https://api.apify.com/v2/key-value-stores/STORE_ID/records/71739f71758474e1-cutout.png",
"width": 360,
"height": 450,
"originalWidth": 360,
"originalHeight": 450,
"model": "isnet-general-use",
"outputFormat": "png",
"backgroundColor": null,
"cropBox": null,
"foregroundRatio": 0.5451,
"outputBytes": 179413,
"inferenceMs": 1194,
"processingMs": 1392
}
  • outputUrl: public link to the cutout (PNG/WebP) in the run's key-value store.
  • maskUrl: link to the mask PNG (only when returnMask is on).
  • foregroundRatio: share of the image covered by the subject, from 0 to 1. Values near 0 mean nothing was detected.
  • cropBox: the crop rectangle when cropToSubject is on.
  • processingMs: time to decode, segment, encode and store the image, excluding the download.
  • Failed images produce { "imageUrl": "...", "error": "...", "isError": true } and are not charged.

Pricing

This Actor uses pay-per-event pricing. You pay only for images that were processed successfully:

EventPricePer 1,000
image-processed: one background removed and saved$0.009$9.00

Hosted background-removal APIs typically charge $0.01 to $0.05 per image. Apify platform usage (compute units, storage) is billed separately according to your Apify plan. Use Maximum cost per run to cap spending; the Actor stops cleanly when the limit is reached.

FAQ

Which model should I use? Start with isnet-general-use. It gives the most detailed edges (hair, fur) on products, people, animals and objects. Use u2netp when speed matters most: it is roughly 5-7x faster with slightly softer edges. u2net_human_seg gives very clean silhouettes for portraits but ignores objects that are not people. u2net and silueta are classic general-purpose alternatives.

How fast is it? Most of the time goes into the model. With isnet-general-use expect a few seconds per image at the default 2 GB memory; u2netp takes well under a second. More memory also means more CPU on Apify, so 4-8 GB runs are faster. Standby mode removes the container start time.

What are the limits? Downloads are capped at 50 MB per image, and images are downscaled to maxSidePx (default 4096 px, max 8192). Animated GIFs use only the first frame. The default 2 GB memory handles 4K images; 1 GB is the minimum.

Does it work on any image or language? Yes. Background removal does not depend on text or language, and any common image format works. It works best when there is one clear foreground subject. Scenes with many overlapping objects, glass, smoke or very fine transparent details may need manual touch-up.

Are my images private? Yes. Images are processed inside your own Apify run by models bundled with the Actor and are not sent to any external AI service. Results are stored in the run's key-value store. The outputUrl links are unguessable but public, so anyone with the link can open the file. Delete the storage or set a data retention period if you need to.

Can I use the results commercially? Yes. The models are released under permissive open-source licenses (Apache-2.0 / MIT) that allow commercial use. You still need the rights to the images you process.

Is it legal to remove backgrounds from images? Editing images you own or are licensed to use is legal. Do not use the Actor to strip watermarks or to reuse copyrighted photos without permission. You are responsible for the images you submit.

Why is some background left around the edges? Soft edges keep fine detail such as hair. If you see a faint halo, set maskThreshold (e.g. 128) for a hard edge, optionally with featherPx: 1-2 to smooth it, or try a different model.