# AI Background Remover – Bulk Transparent PNG Cutouts (`chesapeake/background-remover`) Actor

Remove image backgrounds in bulk with AI. Get transparent PNG/WEBP cutouts, a solid background color for product photos, or a black-and-white mask. Optional crop to subject. Runs locally, no API key. Pay per image.

- **URL**: https://apify.com/chesapeake/background-remover.md
- **Developed by:** [Chesapeake Commerce](https://apify.com/chesapeake) (community)
- **Categories:** AI, For creators
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

$3.00 / 1,000 image processeds

This Actor is paid per event. You are not charged for the Apify platform usage, but only a fixed price for specific events.

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

## AI Background Remover – Bulk Transparent PNG Cutouts

Remove the background from **product photos, portraits, pets, cars and logos** in bulk. You get transparent **PNG/WebP cutouts**, black-and-white **masks**, or images on a **solid color** (for example white for Amazon or Shopify listings). It runs the open-source **IS-Net** segmentation model inside the Actor, so there are no remove.bg credits or third-party API keys. Price: **$3 per 1,000 images**.

### Why use it

- **remove.bg alternative at a fraction of the price.** You pay $0.003 per image and there's no subscription.
- **High-quality alpha matte** from IS-Net (DIS), with soft edges for hair and fur. A hard-edge **mask threshold** is available if you need it.
- **E-commerce ready.** Put products on white (`#FFFFFF`) or any color, **crop to the subject** with padding, and export JPEG, PNG or WebP.
- **Bulk and API.** Process thousands of images per run and call it from Make, Zapier, n8n or code.
- **Fair.** If no subject is found, the image isn't charged, and neither are failed downloads.

### How to use it

1. Add image URLs under **Images**, or upload a list.
2. Choose **Output**: *Cutout* (transparent) or *Mask*. Optionally set **Background color**, **Crop to subject** and **Output format**.
3. Click **Start**, then download files using `outputUrl`.

#### Input example

```json
{
  "images": [{ "url": "https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg" }],
  "output": "cutout",
  "outputFormat": "png"
}
```

#### Output example

```json
{
  "url": "https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg",
  "status": "OK",
  "outputUrl": "https://api.apify.com/v2/key-value-stores/…/records/animal-1-1-nobg.png",
  "output": "cutout",
  "originalWidth": 1000,
  "originalHeight": 667,
  "outputWidth": 1000,
  "outputHeight": 667,
  "foregroundCoverage": 0.2438,
  "subjectBox": [64, 139, 918, 581],
  "outputFormat": "png",
  "processingSeconds": 3.4
}
```

`status` values: `OK`, `NO_SUBJECT_FOUND` (free), `FAILED`, `HTTP_ERROR`, `SKIPPED_ROBOTS_TXT`.

### Pricing (pay per event)

| Event | Price |
|---|---|
| Image processed (background removed) | **$0.003** ($3 per 1,000 images) |

Images are processed at full resolution up to **Max input megapixels** (16 MP by default). The price is the same for any size.

### FAQ

**How good is it compared to remove.bg?** It's excellent on products, animals, cars and single people against a clear background. Very fine hair and glass or transparent objects can be less perfect than paid editors. Try a few images first, since small runs cost cents.

**Can I get a white background for marketplace listings?** Yes. Set **Background color** to `#FFFFFF` and **Output format** to `jpeg`.

**What does Mask output give me?** A grayscale image where white is the subject. You can use it in Photoshop, Figma or your own pipeline.

**Do you keep my images?** No. Outputs are stored only in your own run storage.

# Actor input Schema

## `images` (type: `array`):

Public links to JPG, PNG, WEBP, GIF, BMP or TIFF images. For your own files, upload them to an Apify key-value store, Google Drive (public link), Dropbox or S3 and paste the links. You can also upload a text/CSV file of URLs.

## `output` (type: `string`):

Masks are handy for your own compositing or inpainting pipelines.

## `backgroundColor` (type: `string`):

Leave empty for a transparent background. Or a hex color, e.g. #ffffff for white e-commerce product photos.

## `outputFormat` (type: `string`):

Format of the result files saved to the key-value store.

## `quality` (type: `integer`):

Only used for WEBP and JPEG output.

## `cropToSubject` (type: `boolean`):

Trim the empty area around the detected subject.

## `cropPadding` (type: `integer`):

Extra pixels kept around the subject when cropping.

## `maskThreshold` (type: `integer`):

0 = soft natural edges (recommended). 1–254 = make the mask hard (pixels above the value become fully opaque), useful for logos and products.

## `maxInputMegapixels` (type: `number`):

Bigger images are shrunk to this size first (flagged inputResized).

## `maxFileSizeMb` (type: `integer`):

Bigger downloads are skipped (not charged).

## `respectRobotsTxt` (type: `boolean`):

Skip image URLs whose site disallows automated access (not charged).

## Actor input object example

```json
{
  "images": [
    {
      "url": "https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg"
    }
  ],
  "output": "cutout",
  "outputFormat": "png",
  "quality": 92,
  "cropToSubject": false,
  "cropPadding": 0,
  "maskThreshold": 0,
  "maxInputMegapixels": 16,
  "maxFileSizeMb": 25,
  "respectRobotsTxt": true
}
```

# Actor output Schema

## `results` (type: `string`):

One item per image with the outputUrl of the cutout or mask, dimensions, subject coverage and status.

## `files` (type: `string`):

Cutout/mask PNG, WEBP or JPEG files in the run's default key-value store (also contains the run INPUT record).

# 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 = {
    "images": [
        {
            "url": "https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg"
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("chesapeake/background-remover").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 = { "images": [{ "url": "https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg" }] }

# Run the Actor and wait for it to finish
run = client.actor("chesapeake/background-remover").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 '{
  "images": [
    {
      "url": "https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg"
    }
  ]
}' |
apify call chesapeake/background-remover --silent --output-dataset

```

## MCP server setup

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

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/7Isk5EExzQdA1bcGn/builds/8KHox85r3vNLeZPeg/openapi.json
