# AI Background Remover: Transparent PNG, White Background (`tidelane/ai-background-remover`) Actor

Remove the background from product photos, animals, cars and portraits with an AI model (IS-Net). Paste image URLs, get transparent PNG/WebP or images on a white or custom color background, optionally cropped to the object. Pay per image, no API key or subscription.

- **URL**: https://apify.com/tidelane/ai-background-remover.md
- **Developed by:** [Tidelane Data](https://apify.com/tidelane) (community)
- **Categories:** AI, E-commerce, Automation
- **Security:** Limited permissions
- **Stats:** 2 total users, 1 monthly users, 100.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $1.40 / 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

## AI Background Remover: Transparent PNG, White Background

Remove the background from photos automatically. This Actor cuts out the main object, such as a product, animal, car, person or food, with the **IS-Net** segmentation model and gives you a **transparent PNG/WebP**, the object on a **white or custom color background**, or a **black and white mask**.

- ✅ **Transparent, solid color or mask** output
- ✅ **PNG, WebP or JPG**, with adjustable quality
- ✅ **Crop to the object** with optional padding, and optional maximum size
- ✅ **Keeps the original resolution** (up to 50 megapixels), applies EXIF rotation, keeps existing transparency
- ✅ **Batch processing:** paste hundreds of image URLs; one broken link never stops the others and is not charged
- ✅ **Private:** images are processed inside the Actor and stored only in your own Apify storage. No third-party API, no API key, no subscription

### What can you use it for?

- **E-commerce:** white-background product photos for Amazon, eBay, Etsy, Shopify or Zalando listings
- **Marketing:** cut-outs for banners, thumbnails, social posts and ads
- **Catalogs and marketplaces:** clean, consistent images for car dealers, real estate, food delivery and second-hand listings
- **Design:** masks and transparent layers for Photoshop, Figma or Canva
- **Automation:** call it from Make, Zapier, n8n or your own code via the Apify API, for example after every product upload

### How to use it

1. Paste direct image links into **Image URLs**.
2. Choose the **Result** (transparent, solid color or mask) and the **Output format**.
3. Optionally turn on **Crop to the object** and set a **Max width/height**.
4. Click **Start**. Each result has a download link in the `outputUrl` field, and the files are also in the run's key-value store.

#### Input example

```json
{
    "imageUrls": [
        "https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg",
        "https://example.com/products/shoe.jpg"
    ],
    "output": "color",
    "backgroundColor": "#ffffff",
    "format": "jpg",
    "cropToObject": true,
    "cropPaddingPercent": 5
}
```

#### Output example

Real output for the first image with the default settings (transparent PNG):

```json
{
    "imageUrl": "https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg",
    "outputUrl": "https://api.apify.com/v2/key-value-stores/<store-id>/records/animal-1-no-bg.png?signature=<signature>",
    "fileName": "animal-1-no-bg.png",
    "output": "transparent",
    "format": "png",
    "width": 1000,
    "height": 667,
    "originalWidth": 1000,
    "originalHeight": 667,
    "foregroundPercent": 24.5,
    "objectBox": [65, 156, 918, 580],
    "cropped": false,
    "bytes": 1028152,
    "seconds": 1.05,
    "model": "IS-Net general-use (DIS)"
}
```

`foregroundPercent` is the share of the image covered by the object, and `objectBox` is its bounding box `[left, top, right, bottom]` in the original image, useful to check results automatically (for example, a very small value usually means no clear main object). The `outputUrl` is a signed link that works without logging in. A run summary with the status of every image is saved as `OUTPUT` in the key-value store.

### Pricing

You pay **per processed image**, at any size up to 50 megapixels. Images that fail to download or are not images are not charged. Set a run spending limit to cap the cost of a run.

Paid Apify plans pay less: 10% off on Starter, 20% on Scale and 30% on Business and higher plans.

### Speed and limits

- The first images of a run take about 1.5 seconds each, plus a few seconds to start the run. In longer runs Apify limits the CPU to the run's share of memory, so with the default 2 GB each further image takes about 10 to 15 seconds (1 to 12 megapixels).
- More memory means more CPU: with 4 GB a long run of 4 megapixel photos was about 1.8 times as fast in our test. The price per image is the same.
- Input images up to 50 megapixels and 50 MB.
- GIFs and multi-page TIFFs: the first frame is used.

### Tips for the best results

- Works best on photos with one clear main object. Busy scenes with many objects are harder.
- Fine hair and fur get soft edges, which look natural on most backgrounds. Glass and very thin objects (wires, chair legs) can lose parts.
- For marketplace photos, use **Solid color background** with `#ffffff`, **Crop to the object** and 5-10 % padding.

### FAQ

**Can I upload files instead of URLs?** Use any public or signed link, for example from Google Drive (direct download link), Dropbox (`?dl=1`), S3, or an Apify key-value store.

**What about the license?** The IS-Net (DIS) model is published under the Apache-2.0 license, which allows commercial use. You need the rights to the images you process.

**Does it work for people?** Yes, portraits work well. Please only process photos you have the right to use.

### More tools from Tidelane Data

- [AI Image Upscaler](https://apify.com/tidelane/ai-image-upscaler): upscale images 2x, 3x or 4x with Real-ESRGAN
- [Image Converter & Compressor](https://apify.com/tidelane/image-converter): WebP, AVIF, JPG and PNG, resize and compress
- [Bulk Image Downloader](https://apify.com/tidelane/bulk-image-downloader): all images from web pages, also as one ZIP

All our tools: [apify.com/tidelane](https://apify.com/tidelane)

***

#### Impressum

Levi Griesinger, Tidelane Data\
Besigheimer Straße 18\
74369, Löchgau, Deutschland\
E-Mail: LeviGriesinger@gmail.com

# Actor input Schema

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

Direct links to JPG, PNG, WebP, BMP, TIFF or GIF images, one per line. Each image is processed separately; a broken link does not stop the others and is not charged.

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

Transparent: the object on a transparent background. Color: the object on a solid background (white by default, good for marketplaces). Mask: a black and white mask (white = object) for your own editing.

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

Hex color for the "Solid color background" result, e.g. #ffffff (white) or #f2f2f2. Also used when the format is JPG.

## `format` (type: `string`):

PNG is lossless. WebP is much smaller and also keeps transparency. JPG has no transparency, so the solid color background is used.

## `cropToObject` (type: `boolean`):

Cut away the empty area around the object.

## `cropPaddingPercent` (type: `integer`):

Space left around the object when cropping, in percent of the object's longer side.

## `maxSide` (type: `integer`):

Optional. Shrinks results whose longer side is bigger than this. Leave empty to keep the original size.

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

Compression quality for JPG and WebP (1-100). Ignored for PNG.

## Actor input object example

```json
{
  "imageUrls": [
    "https://raw.githubusercontent.com/danielgatis/rembg/main/examples/animal-1.jpg"
  ],
  "output": "transparent",
  "backgroundColor": "#ffffff",
  "format": "png",
  "cropToObject": false,
  "cropPaddingPercent": 5,
  "quality": 90
}
```

# Actor output Schema

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

All results of the run as dataset items.

## `summary` (type: `string`):

Summary per input with status (ok, error and the reason).

# 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/danielgatis/rembg/main/examples/animal-1.jpg"
    ]
};

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

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

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,tidelane/ai-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/S7rzdjZwxYmfilfyX/builds/F8zgk5L26zuy4Wquk/openapi.json
