# Background Remover API: Transparent PNG, $6/1K Images (`conserving_celerytop/background-remover-api`) Actor

Remove the background of images from public URLs. Get a transparent PNG per image in the key-value store, with a link, width, height, size in bytes and processing seconds in each dataset row. Runs the open u2net model. Independent tool, no login.

- **URL**: https://apify.com/conserving_celerytop/background-remover-api.md
- **Developed by:** [Don Mangu](https://apify.com/conserving_celerytop) (community)
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $4.20 / 1,000 images

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.
Since this Actor supports Apify Store discounts, the price gets lower the higher subscription plan you have.

Learn more: https://docs.apify.com/actors/running/actors-in-store.md#pay-per-event

## What's an Apify Actor?

An Actor is a serverless cloud program that runs on the Apify platform. It has two run modes.
In Batch mode, an Actor accepts a well-defined JSON input, performs an action which can take anything from a few seconds to a few hours,
and optionally produces a well-defined JSON output, datasets with results, or files in key-value store.
In Standby mode, an Actor provides a web server which can be used as a website, API, or an MCP server.

Apify vocabulary and the platform model are defined once, in the agent quickstart at https://apify.com/agents.md.

## How to integrate an Actor?

If asked about integration, you help developers integrate Actors into their projects.
You adapt to their stack and deliver integrations that are safe, well-documented, and production-ready.

Do not guess an integration path. Every one of them is in the agent quickstart at https://apify.com/agents.md: the Apify MCP server, Agent Skills with the Apify CLI, the JavaScript and Python clients, the REST API, and the account-free path for an agent with no human to sign in. It also carries the rule on stating cost before the first paid run.

For examples already wired to this Actor's own input schema, see the [API](#api) section below.

Each client library has reference documentation the quickstart does not restate: [JavaScript/TypeScript](https://docs.apify.com/api/client/js/docs.md) (`npm install apify-client`) and [Python](https://docs.apify.com/api/client/python/docs.md) (`pip install apify-client`).

# README

Use this background remover API to remove the background from images by URL and get a transparent PNG for each one, for $6.00 per 1,000 images ($0.006 per image).

Enter public image links. The Actor downloads each image, cuts out the main subject with the open u2net model, and saves a PNG with a transparent background in the key-value store of the run. Every dataset row holds the link to the PNG, its width, height and size in bytes, the share of pixels removed, and the processing time. You need no login, no API key and no proxy. The PNG holds no EXIF data and no GPS position, even when the source photo had them.

This is an independent tool. It is not affiliated with or endorsed by the authors of rembg or U-2-Net, or by the sites that host the images you process.

### How to use the background remover

1. Click **Try for free**.
2. In **Image URLs**, enter one public image link per line. Use the direct link to a JPEG, PNG, WebP, GIF, BMP or TIFF file.
3. Set **Max images** if the list is long. The default is 100 and the limit is 1,000 per run.
4. Switch on **Trim to subject** if you want each PNG cropped to the box around the subject.
5. Click **Start**. Open the **Images** view to see the rows. Click a link in the **Output PNG** column to open the image, or download the files from the **Storage** tab, key-value store.
6. Call the Actor from your own code with the Apify API when you need it in a pipeline. Fetch a PNG with the `outputKey` of a row.

Typical uses:

- Cut out product photos for a shop, a marketplace listing or a catalogue.
- Prepare images for design templates, slides, thumbnails and collages.
- Add a background remover step to an AI agent or a no-code flow in Make, Zapier or n8n.
- Clean up a batch of portraits or objects once, instead of editing them one by one.

### Bulk lists

For a long list, you do not have to paste every link into the form. You can give the Actor a Dataset or a file, or use all three together.

1. **Dataset:** pick a Dataset in **Dataset with the list** (`listDatasetId`). Each item holds one image link. Type the name of the field in **Field in the dataset** (`listDatasetField`), for example `imageUrl`. If you leave it empty, the Actor takes the first text field it finds in each item, and looks for `url` and `imageUrl` first.
2. **File:** paste the web address of a `.txt`, `.csv` or `.json` file in **List file URL** (`listFileUrl`). A `.txt` file has one link per line. In a `.csv` file the first column is the link. A `.json` file is an array of links, or an array of objects that hold a `url`. A header row is skipped. The file can be up to 10 MB and must be on a public web address.
3. **Form:** the links typed in **Image URLs** are still processed. The Actor reads the typed links first, then the Dataset, then the file.

The Actor joins the three lists into one and removes repeated links (links are compared without regard to upper or lower case). **Max images** (`maxImages`) and the limit of 1,000 links per run apply to the joined list, and the first links in that order are processed. The price stays the same: each PNG that is saved is one Image event, and a link that fails is listed with its reason and is free. If the Dataset or the file cannot be read, the run stops before any image is processed, with a message, and nothing is charged.

Large lists: the Actor processes one image at a time, saves each PNG and each row at once, and keeps only the list of links in memory (at most 1,000 links). In local tests an image took about 1.3 seconds on one core, and the speed on the Apify platform was not measured (see the FAQ). Run a small batch first and read the run time before you start 1,000 images. If a run moves to another server, it continues from the list it resolved at the start, so a changed Dataset or file does not shift the images that are already done.

### What you get

| Field | Meaning |
|---|---|
| sourceUrl | The image link as you entered it |
| resultStatus | ok when a PNG was saved. Other values: invalid_url, blocked_host, download_failed, too_large, too_many_pixels, unsupported_image, no_foreground, processing_failed |
| message | The reason for a row that is not ok |
| outputUrl, outputKey | Link to the PNG, and its record key in the default key-value store of the run |
| width, height, bytes | Size of the PNG in pixels and bytes |
| sourceWidth, sourceHeight, sourceBytes, sourceFormat | Size and format of the downloaded image |
| removedPercent | Share of the pixels removed as background, from 0 to 100 |
| processingSeconds | Seconds spent on decoding, background removal and PNG encoding. Download time is not included |
| model | u2net |
| processedAt | Time of the row, ISO 8601 UTC |

The image is decoded, turned upright by its EXIF orientation, and processed at its own size. A source image with a transparent area is laid on white before the model sees it. A GIF or TIFF with several frames uses the first frame.

### Background remover pricing

Pay per event: **$0.006 per image** on the Free plan, which is $6.00 per 1,000 images. Bronze, Silver and Gold plans pay $0.0054, $0.0048 and $0.0042 per image. The start of a run costs $0.00005.

An image is charged after its PNG is saved. A URL that fails is listed in the dataset with a reason and costs nothing. This covers a broken link, a file that is not an image, a file over the limits, and a blocked host. If you set a maximum cost per run, the Actor stops at that limit.

Worked example: 250 product photos cost 250 x $0.006 = $1.50, plus $0.00005 for the start. If 4 of the 250 links are broken, 246 x $0.006 = $1.476 plus $0.00005 is charged.

### Input example

Remove the background of two images and keep the original size:

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/scikit-image/scikit-image/v0.25.0/skimage/data/chelsea.png",
    "https://raw.githubusercontent.com/scikit-image/scikit-image/v0.25.0/skimage/data/coffee.png"
  ],
  "maxImages": 10
}
```

Crop each result to the subject:

```json
{
  "imageUrls": ["https://example.com/photos/shoe-01.jpg"],
  "trimToSubject": true
}
```

### Output example

This row comes from a real run of the Actor code on 9 October 2026, with local storage, on a CC0 photo (the cat photo "chelsea" from the scikit-image test data). In the local run, outputUrl is a file path. On the platform it is an https link to the key-value store, shown here as the pattern.

```json
{
  "sourceUrl": "https://raw.githubusercontent.com/scikit-image/scikit-image/v0.25.0/skimage/data/chelsea.png",
  "resultStatus": "ok",
  "message": null,
  "outputUrl": "https://api.apify.com/v2/key-value-stores/<STORE_ID>/records/cutout-281adf6d2a42.png",
  "outputKey": "cutout-281adf6d2a42.png",
  "width": 451,
  "height": 300,
  "bytes": 180066,
  "sourceWidth": 451,
  "sourceHeight": 300,
  "sourceBytes": 240512,
  "sourceFormat": "PNG",
  "removedPercent": 39.4,
  "processingSeconds": 0.8,
  "model": "u2net",
  "processedAt": "2026-10-09T13:55:10.991Z"
}
```

A link that cannot be downloaded returns a row like this one, from the same run, and is not charged:

```json
{
  "sourceUrl": "https://raw.githubusercontent.com/scikit-image/scikit-image/v0.25.0/skimage/data/does_not_exist.png",
  "resultStatus": "download_failed",
  "message": "The host answered HTTP 404.",
  "outputUrl": null,
  "outputKey": null,
  "width": null,
  "height": null,
  "bytes": null,
  "sourceWidth": null,
  "sourceHeight": null,
  "sourceBytes": null,
  "sourceFormat": null,
  "removedPercent": null,
  "processingSeconds": null,
  "model": null,
  "processedAt": "2026-10-09T13:55:13.397Z"
}
```

### Related Actors

The same author has other image tools. Use [Bulk Image Converter & Compressor](https://apify.com/conserving_celerytop/image-converter-compressor) to change the format or the file size of the PNG files. Use [AI Image Upscaler 4x](https://apify.com/conserving_celerytop/ai-image-upscaler) to enlarge small images before or after the cut-out. Use [Bulk Image Downloader API](https://apify.com/conserving_celerytop/bulk-image-downloader) to collect images from pages into a ZIP file. Use [Image to Text OCR](https://apify.com/conserving_celerytop/image-to-text-ocr) to read the text in an image.

### FAQ

**Which model does the background remover use?** It uses u2net, a general-purpose salient object model from the U-2-Net project, through the open-source rembg library, version 2.0.85, and ONNX Runtime on the CPU. The model file is part of the Actor image, so a run makes no model download. The default model of rembg, bria-rmbg, is not used, because its weights need a paid agreement for commercial use.

**Is it legal to use?** The code and the model come with open licences. The rembg licence file reads: "Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software". The U-2-Net repository is under the Apache License 2.0, which grants "a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare Derivative Works of, publicly display, publicly perform, sublicense, and distribute the Work and such Derivative Works in Source or Object form." The images are yours: you must have the right to download and edit every image you enter. The Actor does not check copyright, trademarks or the terms of the site that hosts an image. Do not use it on images you may not copy.

**Does it handle personal data?** The Actor does not detect or identify faces, and it does not look at who or what is in an image. Photos of people are personal data under many laws, so process them only when you have a lawful basis. The dataset rows hold links, sizes and timings, and no names. The PNG files hold no EXIF data, so a GPS position in the source photo is not copied.

**What are the limits?** One file up to 15 MB and up to 16 megapixels (for example 4000 x 4000 pixels). Formats: JPEG, PNG, WebP, GIF, BMP and TIFF. Up to 1,000 URLs per run. The link must be public and must open without a log-in or a cookie. SVG, HEIC and PDF files are not supported. A link that answers with an HTML page is listed as unsupported_image.

**How fast is it?** In local tests on 9 October 2026 with a CPU, images of 0.14 to 0.27 megapixels took about 0.8 seconds each on two cores and about 1.3 seconds each on one core, and a 16 megapixel image took 5.3 seconds on one core. A one-image run took about 4.4 seconds from start to end on two cores, of which about 0.8 seconds was the image. The speed on the Apify platform was not measured. Apify gives a container a CPU share that grows with its memory, so more memory can shorten the run.

**How does the Actor treat the image hosts?** Each image is downloaded once with a plain HTTP request that names the tool in the User-Agent header. It opens at most 2 connections to one host at the same time. On HTTP 429 or 5xx it waits and tries again, up to 3 attempts in total, and it honours the Retry-After header up to 30 seconds. It follows up to 5 redirects. It does not use proxies, it does not solve CAPTCHAs and it does not try to get around blocks. Links that point to private or internal network addresses are refused (blocked_host).

**Why is a result not perfect?** The u2net model gives firmer and blockier edges than newer and larger models, and it can lose thin parts such as an antenna or a rocket. Fine details such as whiskers can be cut off, as the cat sample shows. The Actor applies a mask clean-up step, which removes small specks. Check the result of your own image type before you run a large batch. The removedPercent field shows how much of the image became transparent, so a row with a very high or very low value is worth a look.

**Why is the PNG larger than my JPEG?** A PNG is lossless and carries an alpha channel. Use the image converter linked above if you need a smaller file in another format.

**How long are the files kept, and who can open the link?** The PNG files live in the key-value store of the run, so they follow the data retention of your Apify plan. Download the files you need before they expire. The link in outputUrl is made by the Apify SDK. If your account limits access to storages, open the file from the Storage tab or fetch the record with your API token and the outputKey.

**What if a URL fails?** Read the message field. download_failed with HTTP 403 or 404 means the host refuses the request or the file is gone: open the link in a private browser window to check that it is public. too_large and too_many_pixels mean the file is over the limits above: resize it first. unsupported_image means the file is not a JPEG, PNG, WebP, GIF, BMP or TIFF image. no_foreground means the model found no subject. Failed URLs are never charged.

**What if the whole run fails?** The Actor keeps one bad image from stopping the others. If the run is stopped by a platform migration, it continues from the first URL that was not finished. Start it again with the failed URLs if you need them.

I built this Actor myself as an independent developer. Models and code: rembg (MIT), U-2-Net (Apache 2.0).

# Actor input Schema

## `imageUrls` (type: `array`):

Enter one public image link per line. Use JPEG, PNG, WebP, GIF, BMP or TIFF files up to 15 MB and 16 megapixels. Use the direct link to the image file.

## `listDatasetId` (type: `string`):

Pick an Apify Dataset that holds your list, one entry per item. It is added to the entries typed above.

## `listDatasetField` (type: `string`):

Name of the dataset field that holds the entry. Leave empty to use the first text field it finds.

## `listFileUrl` (type: `string`):

Web address of a .txt, .csv or .json file with one entry per line. A header row is skipped. Up to 10 MB.

## `maxImages` (type: `integer`):

Process at most this many image URLs in one run. Each PNG saved is one charged image. A URL that fails is listed with its reason and is free.

## `trimToSubject` (type: `boolean`):

Crop each PNG to the box around the subject, so the transparent border is removed. Leave it off to keep the size of the original image.

## Actor input object example

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/scikit-image/scikit-image/v0.25.0/skimage/data/chelsea.png",
    "https://raw.githubusercontent.com/scikit-image/scikit-image/v0.25.0/skimage/data/coffee.png"
  ],
  "maxImages": 10,
  "trimToSubject": false
}
```

# Actor output Schema

## `images` (type: `string`):

No description

## `stats` (type: `string`):

No description

# API

You can run this Actor programmatically using our API. Below are code examples in JavaScript, Python, and CLI, as well as the OpenAPI specification and MCP server setup.

## JavaScript example

```javascript
import { ApifyClient } from 'apify-client';

// Initialize the ApifyClient with your Apify API token
// Replace the '<YOUR_API_TOKEN>' with your token
const client = new ApifyClient({
    token: '<YOUR_API_TOKEN>',
});

// Prepare Actor input
const input = {
    "imageUrls": [
        "https://raw.githubusercontent.com/scikit-image/scikit-image/v0.25.0/skimage/data/chelsea.png",
        "https://raw.githubusercontent.com/scikit-image/scikit-image/v0.25.0/skimage/data/coffee.png"
    ],
    "maxImages": 10
};

// Run the Actor and wait for it to finish
const run = await client.actor("conserving_celerytop/background-remover-api").call(input);

// Fetch and print Actor results from the run's dataset (if any)
console.log('Results from dataset');
console.log(`💾 Check your data here: https://console.apify.com/storage/datasets/${run.defaultDatasetId}`);
const { items } = await client.dataset(run.defaultDatasetId).listItems();
items.forEach((item) => {
    console.dir(item);
});

// 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/js/docs

```

## Python example

```python
from apify_client import ApifyClient

# Initialize the ApifyClient with your Apify API token
# Replace '<YOUR_API_TOKEN>' with your token.
client = ApifyClient("<YOUR_API_TOKEN>")

# Prepare the Actor input
run_input = {
    "imageUrls": [
        "https://raw.githubusercontent.com/scikit-image/scikit-image/v0.25.0/skimage/data/chelsea.png",
        "https://raw.githubusercontent.com/scikit-image/scikit-image/v0.25.0/skimage/data/coffee.png",
    ],
    "maxImages": 10,
}

# Run the Actor and wait for it to finish
run = client.actor("conserving_celerytop/background-remover-api").call(run_input=run_input)

# Fetch and print Actor results from the run's dataset (if there are any)
print(f"💾 Check your data here: https://console.apify.com/storage/datasets/{run.default_dataset_id}")
for item in client.dataset(run.default_dataset_id).iterate_items():
    print(item)

# 📚 Want to learn more 📖? Go to → https://docs.apify.com/api/client/python/docs/quick-start

```

## CLI example

```bash
echo '{
  "imageUrls": [
    "https://raw.githubusercontent.com/scikit-image/scikit-image/v0.25.0/skimage/data/chelsea.png",
    "https://raw.githubusercontent.com/scikit-image/scikit-image/v0.25.0/skimage/data/coffee.png"
  ],
  "maxImages": 10
}' |
apify call conserving_celerytop/background-remover-api --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,conserving_celerytop/background-remover-api"
        }
    }
}
```

The hosted server signs you in with OAuth on first connect, so no API token belongs in this config. Clients without OAuth support can send an `Authorization: Bearer <APIFY_API_TOKEN>` header instead, using a token from API & Integrations in Apify Console (https://console.apify.com/settings/integrations).

## OpenAPI specification

Download the OpenAPI definition: https://api.apify.com/v2/actors/P6Ft0wdaaOrwKgtVo/builds/He52ErKh2oV1axI2x/openapi.json
