AI Background Remover API: Remove BG to Transparent PNG
Pricing
from $1.00 / 1,000 image with background removeds
AI Background Remover API: Remove BG to Transparent PNG
Remove background from images in bulk with AI: transparent PNG or WebP cutouts, or white background JPG for Amazon and Shopify product photos. Background remover API and eraser, remove bg from image URLs, change background color, crop or square, full resolution up to 16 MP. $0.0013 per photo.
Pricing
from $1.00 / 1,000 image with background removeds
Rating
0.0
(0)
Developer
deAPI
Maintained by CommunityActor stats
0
Bookmarked
2
Total users
1
Monthly active users
4 days ago
Last modified
Categories
Share
Remove the background from images with AI, one picture or thousands at once. You get a transparent PNG or WebP cutout, or a white background JPG ready for Amazon, Shopify, eBay and Etsy listings. It is an automatic background eraser and remove bg API: paste image links, and the results keep the full resolution of your photo (up to 16 megapixels). You can crop them to the subject, center them on a square canvas or put them on any background color. You need no design skills, no GPU, no AI provider key and no subscription. It costs $0.0013 per typical product photo, or $1.30 per 1,000.
deAPI AI tools
- Product photos too small for zoom? → AI Image Upscaler 4x: Upscale Images to 4K & 8K in Bulk
- Transcribing audio or video files? → Audio & Video Transcription: MP3, MP4 & Podcast to Text
What does AI Background Remover do?
It is an automatic background remover that works from image links. For each link, the Actor:
- Downloads the image and checks it.
- Has an AI segmentation model find the foreground: a product, a person, a pet, a car or a logo.
- Removes everything behind the subject. The edges stay soft and natural, which helps with hair and fur.
- Saves the result to your Apify storage. It comes back as a download link with its size, its background and what was billed.
It also works as a background removal API: send links, get back cutouts as structured data. You can use it in bulk from Python, JavaScript, cURL, Make, Zapier or n8n. It is a background color changer too: the same run can put every cutout on white, black, gray or your brand color.
Why use it?
- Bulk background removal. Paste a list of URLs or feed in the output of another Actor. Images run in parallel.
- Transparent PNG, WebP or white JPG. Use PNG for design tools, WebP for websites (files about 5× smaller) and JPG for marketplaces that require a white background.
- Any background color. Use
#FFFFFFfor pure white, a brand color, light gray or black. - Full resolution. A 4000 × 3000 photo comes back at 4000 × 3000, not as a small preview.
- Product photo layout. Crop to the subject with a margin, or center the subject on a 1:1 square canvas for Amazon, Shopify, Etsy and Instagram.
- Every common format. JPG/JPEG, PNG, WebP, BMP, GIF and TIFF are accepted, up to 25 MB per file. Phone photos are turned upright first.
- Damaged files are caught, not billed. Every image is fully decoded before anything is spent.
- Pay per image, no subscription. $0.0013 for a 1-megapixel product photo and $0.0046 for a 12-megapixel camera photo. Images that fail cost nothing.
What data can you get?
| Data | Details |
|---|---|
| 🖼️ Image without background | A download link (imageUrl) to the file in your run's key-value store. |
| 📐 Size | outputWidth, outputHeight and the file size in MB. |
| 🎨 Background | Transparent, or the hex color it was placed on (backgroundColor). |
| 🎯 Subject | Whether a subject was found and how much of the picture it covers (subjectCoverage). |
| ✂️ Layout | Whether the result was cropped to the subject or placed on a square canvas. |
| 🔎 Original | Format, width and height of the picture you linked. |
| 💵 Billing | The megapixels billed for the image. |
How to remove the background from an image
- Paste one or more links into Image URLs. Each link must open the picture itself.
- Pick an Output format:
- PNG (default): transparent background, lossless.
- WebP: transparent background, small files.
- JPG: white or colored background.
- Optionally:
- set a Background color;
- turn on Crop to subject or Square canvas (1:1);
- set the Margin.
- Click Start. When the run finishes, open the Images without background view and click any link to download. You can also export the dataset as JSON, CSV or Excel, or read it from the Apify API.
Output options
| You want | Settings |
|---|---|
| Transparent PNG cutout (Canva, Photoshop, Figma, stickers) | outputFormat: png |
| Small transparent files for a website or online shop | outputFormat: webp |
| Amazon main image: pure white background, product filling the frame | outputFormat: jpg, squareCanvas: true, marginPercent: 8 |
| Shopify or Etsy catalog on a light gray background | outputFormat: jpg, backgroundColor: "#F5F5F5", squareCanvas: true |
| Tight cutout of the subject only | cropToSubject: true, marginPercent: 0 |
| Profile photo on a brand color | backgroundColor: "#1E40AF", squareCanvas: true |
Formats and sizes
| Supported | |
|---|---|
| Input formats | JPG / JPEG, PNG, WebP, BMP, GIF (first frame of an animation), TIFF |
| Output formats | PNG (transparent), WebP (transparent), JPG (solid background) |
| Input file size | Up to 25 MB and 25 megapixels (JPG up to 50 MP; 16 MP for images that already have transparency and for 16-bit images) |
| Shape | Up to 16,384 px on the long side, and at most 100 times longer than wide |
| Output size | Same as your image, up to 16 megapixels (8 MP for WebP). Larger images are scaled down to that, keeping their proportions. |
| Smallest input | 16 px on a side |
Which links work
| Link | Works |
|---|---|
https://example.com/photo.jpg (or .png, .webp, .bmp, .gif, .tif) | ✅ Direct image link |
| Product image URLs from Amazon, Shopify, eBay or WooCommerce scrapers | ✅ |
Image CDNs with resizing parameters, e.g. ...photo.jpg?w=1200 | ✅ |
| Web pages that show an image, share pages, galleries | ❌ Use the direct link of the image itself |
| Images behind a login | ❌ The link must be public |
| SVG, HEIC, AVIF, RAW, PDF | ❌ Convert to JPG or PNG first |
How fast is it?
A photo is usually ready in 5–15 seconds. Several images run in parallel.
Input
| Field | Type | Description |
|---|---|---|
imageUrls | Array of URLs (strings or {"url": ...}) | Direct links to the images. Required. |
outputFormat | png · webp · jpg | Format of the results. Default png. The price is the same for every format; WebP output stops at 8 MP, so it is never more. |
backgroundColor | String | Empty for transparent. Otherwise a hex color (#FFFFFF) or a color name (white). JPG uses white when it is empty. |
cropToSubject | Boolean | Trim the empty space around the subject. Default false. |
squareCanvas | Boolean | Center the subject on a 1:1 canvas. Default false. |
marginPercent | Integer 0–40 | Space around the subject when cropping or squaring, in % of its longer side. Default 5. |
maxConcurrency | Integer 1–10 | Images processed at the same time. Default 5. No effect on price. |
{"imageUrls": ["https://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Coffee_Mug_%28Unsplash%29.jpg/1280px-Coffee_Mug_%28Unsplash%29.jpg"],"outputFormat": "jpg","squareCanvas": true,"marginPercent": 8}
Output
This is the row for the prefilled sample, a CC0 product photo of an enamel mug on a wooden table:
{"url": "https://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Coffee_Mug_%28Unsplash%29.jpg/1280px-Coffee_Mug_%28Unsplash%29.jpg","status": "success","imageUrl": "https://api.apify.com/v2/key-value-stores/.../records/0001-1280px-Coffee_Mug_-Unsplash-no-bg.png","kvsKey": "0001-1280px-Coffee_Mug_-Unsplash-no-bg.png","outputFormat": "png","outputWidth": 1280,"outputHeight": 720,"outputMB": 0.11,"transparentBackground": true,"backgroundColor": null,"subjectFound": true,"subjectCoverage": 0.0778,"croppedToSubject": false,"squareCanvas": false,"inputFormat": "JPEG","inputWidth": 1280,"inputHeight": 720,"processedWidth": 1280,"processedHeight": 720,"downscaledToFit": false,"firstFrameOnly": false,"billedMegapixels": 1,"error": null}
Every link you submit gets a row:
- Failed: images that could not be processed have
status: "failed"and anerrorexplaining why. - Skipped: images left out by a run cost limit or a free-plan allowance, and repeats of a link already in the input, have
status: "skipped".
Neither is charged. When no foreground subject is found, for example in a plain texture or an empty landscape, the image is still delivered with subjectFound: false.
How much does it cost?
$0.0010 per image + $0.0003 per started megapixel (1024 × 1024 pixels) of your image as processed. The price is the same for PNG, WebP and JPG, with or without a background color, crop or square canvas. WebP output is capped at 8 MP, so with WebP an image costs at most $0.0034.
The megapixels are counted on your image itself, capped at 16 MP, not on the cropped result.
| Your image | Megapixels billed | Price |
|---|---|---|
| 800 × 800 product photo | 1 | $0.0013 |
| 1000 × 1000 (typical marketplace image) | 1 | $0.0013 |
| 1280 × 720 | 1 | $0.0013 |
| 1920 × 1080 (Full HD) | 2 | $0.0016 |
| 2000 × 2000 | 4 | $0.0022 |
| 4000 × 3000 (12 MP camera photo) | 12 | $0.0046 |
| 6000 × 4000 (scaled to 16 MP) | 16 | $0.0058 |
| 1,000 product photos of 1000 × 1000 | 1 each | $1.30 |
Images that fail are never charged: unreachable, not an image, damaged or too large. Neither are images skipped by a run cost limit or a free-plan allowance.
Set maximum cost per run to cap your spend. The Actor checks each image before it processes it and skips anything the remaining budget cannot cover.
Free plan: 10 images per run and 50 per calendar month (resets at 00:00 UTC on the 1st), within a daily capacity shared by all free users. Any paid Apify plan removes the free-plan limits.
Use cases
| Use case | Why remove the background |
|---|---|
| Amazon, Walmart and eBay listings | Amazon and Walmart require a pure white background for the main product image, and eBay recommends one. Use JPG, a square canvas and a small margin. |
| Shopify, WooCommerce and Etsy stores | A consistent white or gray background across the whole catalog, or transparent WebP for your theme. |
| Product catalogs from a scraper | Clean up thousands of supplier or competitor product photos in the same workflow that scraped them. |
| Marketing and social media | Cutouts for ads, banners, thumbnails, Instagram posts and YouTube thumbnails. |
| Profile photos and team pages | Portraits on one brand color for a company website or LinkedIn. |
| Car dealers and real estate | Vehicles and objects without a distracting background. |
| Design and print-on-demand | Transparent PNG artwork for T-shirts, stickers, mugs and mock-ups. |
| Datasets and AI pipelines | Foreground masks and cutouts for training data, or for compositing with generated images. |
Tutorial: remove backgrounds with the API
1. One image in the Console
Open the Actor, keep the prefilled mug photo and click Start. About ten seconds later, the Images without background view shows the transparent PNG with a preview. Click the link to download it.
2. White background product photos for a marketplace
Paste your product image URLs into Image URLs, one per line. Set Output format to JPG and turn on Square canvas (1:1), then start. Every row has a download link. Export the view as CSV to map the new files back to your products.
3. From Python
from apify_client import ApifyClientclient = ApifyClient("<YOUR_APIFY_TOKEN>")run = client.actor("deapi/background-remover").call(run_input={"imageUrls": ["https://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Coffee_Mug_%28Unsplash%29.jpg/1280px-Coffee_Mug_%28Unsplash%29.jpg",],"outputFormat": "png",})store = client.key_value_store(run["defaultKeyValueStoreId"])for row in client.dataset(run["defaultDatasetId"]).iterate_items():if row["status"] == "success":record = store.get_record(row["kvsKey"])with open(row["kvsKey"], "wb") as handle:handle.write(record["value"])print(row["kvsKey"], row["outputWidth"], "x", row["outputHeight"])
4. From JavaScript or cURL
import { ApifyClient } from 'apify-client';const client = new ApifyClient({ token: '<YOUR_APIFY_TOKEN>' });const run = await client.actor('deapi/background-remover').call({imageUrls: ['https://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Coffee_Mug_%28Unsplash%29.jpg/1280px-Coffee_Mug_%28Unsplash%29.jpg'],outputFormat: 'webp',});const { items } = await client.dataset(run.defaultDatasetId).listItems();console.log(items[0].imageUrl);
curl -X POST "https://api.apify.com/v2/acts/deapi~background-remover/run-sync-get-dataset-items?token=<YOUR_APIFY_TOKEN>" \-H "Content-Type: application/json" \-d '{"imageUrls": ["https://upload.wikimedia.org/wikipedia/commons/thumb/1/1f/Coffee_Mug_%28Unsplash%29.jpg/1280px-Coffee_Mug_%28Unsplash%29.jpg"], "outputFormat": "jpg", "squareCanvas": true}'
The synchronous endpoint waits at most 5 minutes. For large batches, start the run with POST /v2/acts/deapi~background-remover/runs and read the dataset when it finishes. Or use the Python and JavaScript clients above, which wait for you.
5. Remove backgrounds from what another Actor scraped
Chain the Actor after a product or image scraper with an Apify integration:
- Pass the scraped image URLs into
imageUrls. Plain strings and objects with aurlfield both work. - Send the results on with a webhook, Make, Zapier, n8n or Google Drive.
Background removal API and integrations
Every Apify Actor has:
- a REST API;
- a scheduler;
- webhooks;
- official JavaScript and Python clients.
It also runs from Make, Zapier and n8n, and as a tool for AI agents through the Apify MCP server.
FAQ
How do I remove the background from an image?
Paste the image link into Image URLs and click Start. The result is a PNG with a transparent background. For a white background, choose JPG.
How do I make a picture's background transparent?
Use PNG or WebP output (PNG is the default). Everything behind the subject becomes transparent and the subject keeps its soft edges, so you can place it on any design.
How do I get a white background for Amazon product photos?
Choose JPG output, which puts the product on pure white (#FFFFFF). Turn on Square canvas (1:1) and set Margin to about 8 %, so the product fills roughly 85 % of the frame; Amazon asks for 85 % or more. For any other color, set Background color.
Can I remove backgrounds from images in bulk?
Yes. Paste as many links as you like, or pass a list from another Actor. Images run in parallel, 5 at a time by default and up to 10, and each one gets its own row and file. 1,000 product photos of 1000 × 1000 cost about $1.30.
Is there a background remover API? Do I need an API key?
The Actor is the API. Call it with your Apify token from Python, JavaScript, cURL or any HTTP client, as in the tutorial above. You do not need an account or a key with any AI provider.
How do I change the background color of a photo?
Set Background color to a hex code (#FFFFFF, #000000, #F5F5F5, #1E40AF) or a color name (white, black), and pick PNG, WebP or JPG. The background is removed and the subject is put on that color, at the same price.
PNG or WebP — which should I choose?
PNG is lossless and opens everywhere (Canva, Photoshop, Figma, Office), so it is the safe default for design work. WebP keeps the same transparent background in files about five times smaller, which is better for websites, online shops and anything you serve to browsers.
Is there a free background remover API?
You can try it for free: on the Apify free plan you get 10 images per run and 50 per calendar month, paid from Apify's free monthly credit, through the same API. Beyond that it is pay per image from $0.0013, with no subscription.
Can I use the results commercially?
Yes. The files are yours and we claim no rights to them; you only need the right to use the original images you send.
Does it work with Shopify, WooCommerce, Make, Zapier or n8n?
Yes. Pass product image URLs from your store export, a scraper or an automation tool into imageUrls, and send the results back with Make, Zapier, n8n, a webhook or the API. Apify has ready integrations for all of them.
Is it a remove.bg alternative?
Yes, for bulk and automated work. You get transparent PNG, WebP or a solid background, the full resolution of your image up to 16 MP, crop and square layout, and pay-per-image pricing from about $0.0013. There is no subscription and no credit packs.
Does it keep the original resolution?
Yes, up to 16 megapixels (8 MP for WebP output). A 4000 × 3000 photo comes back at 4000 × 3000. Larger images are scaled down to 16 MP, keeping their proportions, and the row then shows downscaledToFit: true.
Does it work on hair, fur and fine details?
The AI keeps soft, semi-transparent edges, so hair, fur and fuzzy outlines look natural. Very fine strands against a background of a similar color can lose some detail.
Which images work best?
Images with a clear main subject: products, people, pets, cars, food and logos. When there is no obvious foreground, such as a landscape, a texture or a crowded scene, the result may be empty or partial. An empty result is marked subjectFound: false.
Can I remove the background from a logo or a signature?
Yes. Logos and graphics on a plain background come out as transparent PNGs. For signatures, use a clear scan or photo on plain paper.
Which image formats are supported?
| Formats | |
|---|---|
| In | JPG/JPEG, PNG, WebP, BMP, GIF, TIFF |
| Out | PNG, WebP, JPG |
For an animated GIF, the first frame is used. HEIC, AVIF and RAW files must be converted to JPG or PNG first.
What does an image that already has transparency do?
The areas that are already transparent stay transparent, and the background around the subject is removed as usual.
Is it free to try?
Yes. On the Apify free plan you can process 10 images per run and 50 per calendar month. They are charged against the free monthly platform credit.
Can I upload an image from my computer?
The Actor needs a link. Put the image anywhere that gives a direct public link and paste that link: your website, a cloud bucket, or an Apify key-value store record.
How long are the result files kept?
They are stored in the run's key-value store in your own Apify account, under your plan's data retention. If you need them for longer, download them or copy them to your own storage with an integration.
Why did an image fail?
Usually for one of these reasons:
- the link opens a web page rather than the image itself;
- the image is behind a login;
- the file is damaged or incomplete;
- the format is not supported.
Failures are never charged. The reason is in the row's error field.
Support / feedback
Found a bug, hit an image that comes out wrong, or want a feature? Open a ticket in the Issues tab of this Actor's Apify Store page. Include the image URL and the run ID where you can.