# remove.bg API Alternative: Drop-in Background Removal (`digitalni.produkty.pro.zivot/removebg-api-dropin`) Actor

Same endpoint, parameters and responses as the remove.bg API (POST /v1.0/removebg). Change the base URL, keep your code. Transparent PNG, bg_color, crop, ZIP, alpha matte. $0.005 per image, no subscription.

- **URL**: https://apify.com/digitalni.produkty.pro.zivot/removebg-api-dropin.md
- **Developed by:** [Digitální produkty pro život](https://apify.com/digitalni.produkty.pro.zivot) (community)
- **Categories:** AI, Developer tools, E-commerce
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $5.00 / 1,000 image processeds

This Actor is paid per event and usage. You are charged both the fixed price for specific events and for Apify platform usage.

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

## remove.bg API Alternative: Drop-in Background Removal

**The remove.bg API stops on December 1, 2026.** This Actor gives you **the same endpoint, the same parameters and the same responses** (`POST /v1.0/removebg`). Point your existing code at a new base URL, swap the API key header, and you are done. No rewrite, no SDK, no monthly plan.

```diff
- https://api.remove.bg/v1.0/removebg          X-Api-Key: <REMOVE_BG_KEY>
+ https://digitalni-produkty-pr--removebg-api-dropin.apify.actor/v1.0/removebg
+                                               Authorization: Bearer <APIFY_TOKEN>
```

Pay per image: **$0.005 per processed image** plus a small amount of Apify platform usage. No subscription, no monthly minimum. Failed requests are never charged. `roi` and `crop_margin` work too, which some replacements silently ignore.

![Product photo: original vs. background removed](https://api.apify.com/v2/key-value-stores/uxnNYX56a3qdadmXf/records/remover-camera.jpg)

<sub>Real result of the model used by this Actor. Example photo: Wikimedia Commons, CC0.</sub>

### Quick start

1. Create a free Apify account and copy your API token from **Settings → API & Integrations**.
2. Replace the remove.bg URL with the URL above, and the `X-Api-Key` header with `Authorization: Bearer <APIFY_TOKEN>` (or append `?token=<APIFY_TOKEN>` to the URL).
3. Keep everything else: form fields, file uploads, `Accept: application/json`, the response headers and the error handling.

#### curl

```bash
curl -H "Authorization: Bearer $APIFY_TOKEN" \
     -F "image_file=@/path/to/file.jpg" \
     -F "size=auto" \
     -o no-bg.png \
     https://digitalni-produkty-pr--removebg-api-dropin.apify.actor/v1.0/removebg
```

#### Python (requests): the remove.bg sample with two lines changed

```python
import requests

response = requests.post(
    "https://digitalni-produkty-pr--removebg-api-dropin.apify.actor/v1.0/removebg",  # changed
    files={"image_file": open("/path/to/file.jpg", "rb")},
    data={"size": "auto"},
    headers={"Authorization": "Bearer <APIFY_TOKEN>"},                            # changed
)
if response.status_code == requests.codes.ok:
    with open("no-bg.png", "wb") as out:
        out.write(response.content)
else:
    print("Error:", response.status_code, response.text)
```

#### JavaScript (Node 18+)

```js
const form = new FormData();
form.append('image_url', 'https://example.com/product.jpg');
form.append('size', 'full');
form.append('bg_color', 'ffffff');
const res = await fetch('https://digitalni-produkty-pr--removebg-api-dropin.apify.actor/v1.0/removebg', {
    method: 'POST',
    headers: { Authorization: `Bearer ${process.env.APIFY_TOKEN}` },
    body: form,
});
console.log(res.status, res.headers.get('x-width'), res.headers.get('x-height'));
```

#### Using a remove.bg client library

- **PHP (`mtownsend/remove-bg`, Laravel):** the endpoint is a public property, so no library change is needed:

```php
$removebg = new RemoveBg('unused');
$removebg->endpoint = 'https://digitalni-produkty-pr--removebg-api-dropin.apify.actor/v1.0/removebg';
$removebg->header('Authorization', 'Bearer ' . $apifyToken)
         ->url('https://example.com/image.jpg')
         ->save('no-bg.png');
```

- **Python (`removebg`) and Node.js (`remove.bg`):** we have proposed a configurable endpoint upstream (`api_endpoint` / `apiEndpoint` plus `headers`): [Python pull request](https://github.com/brilam/remove-bg/pull/31), [Node.js pull request](https://github.com/EddyVerbruggen/remove.bg/pull/15). Until they are released, use the snippets above.
- **Other libraries:** if the base URL is hard-coded, fork the library and change it. Everything else stays the same.

### Compatibility

| remove.bg parameter | Supported | Notes |
|---|---|---|
| `image_file` (multipart), `image_file_b64`, `image_url` | ✅ | Exactly one source per request, same as remove.bg |
| `size`: `preview` (default), `small`, `regular`, `medium`, `hd`, `full`, `4k`, `auto` | ✅ | Same megapixel limits, up to 25 MP. Same price for every size |
| `format`: `auto` (default), `png`, `jpg`, `webp`, `zip` | ✅ | `zip` contains `color.jpg` + `alpha.png` |
| `channels`: `rgba`, `alpha` | ✅ | `alpha` returns the matte |
| `bg_color` (hex 3/4/6/8 digits or color name), `bg_image_url`, `bg_image_file` | ✅ | Semi-transparent colors keep PNG transparency |
| `crop`, `crop_margin` (`30px`, `10%`, 1–4 values) | ✅ | |
| `roi`, `scale`, `position` | ✅ | |
| `type`, `type_level` | ⚠️ accepted, ignored | One general model for products, people, animals and objects. `X-Type` is always `other` |
| `add_shadow`, `shadow_type`, `shadow_opacity`, `semitransparency` | ⚠️ accepted, ignored | No artificial shadows |

**Responses.** Binary image with `Content-Type`, `X-Width`, `X-Height`, `X-Foreground-Top/Left/Width/Height`, `X-Type` and `X-Credits-Charged`. With `Accept: application/json` you get `{"data": {"result_b64": "...", "foreground_top": ..., ...}}`. Errors use the remove.bg shape `{"errors": [{"title": "...", "code": "..."}]}` with HTTP 400. When your spending limit is reached you get **402**, like running out of credits. `GET /v1.0/account` is available so account checks do not crash.

**Accepted request bodies:** `multipart/form-data`, `application/x-www-form-urlencoded` and `application/json`. Maximum image size is 30 MB and 100 MP input.

### Pricing

- **$0.005 per successfully processed image**, any size. Errors and failed downloads are free.
- **Plus Apify platform usage** for the time the API server runs (2 GB memory). It is roughly $0.0005 per image when you send images back to back. The server starts on the first request (about 10 seconds) and stops after 60 seconds without requests, and that idle minute is also usage.
- No subscription, no monthly minimum and no credit packs that expire. For comparison, many hosted alternatives charge $0.02–0.04 per image or require a monthly plan.
- Apify's free plan includes $5 of platform credit every month, enough to process several hundred images without paying anything.

For **bulk jobs** (thousands of URLs), the sister Actor [AI Background Remover](https://apify.com/digitalni.produkty.pro.zivot/background-remover) runs as a batch job with a flat $0.005 per image, takes a list of URLs or another Actor's dataset, and has no idle time.

### No-code: Zapier, Make, n8n

If your scenario used the remove.bg module, replace it with an **HTTP request** module:

- **Method:** POST, **URL:** `https://digitalni-produkty-pr--removebg-api-dropin.apify.actor/v1.0/removebg`
- **Header:** `Authorization: Bearer <APIFY_TOKEN>`
- **Body:** form fields `image_url`, `size=full`, plus any other remove.bg parameters
- **Response:** the image file (binary), or JSON with `result_b64` if you send `Accept: application/json`

### Batch mode in the Console

You can also run the Actor normally with a list of image URLs (input form). Results are saved to the dataset with links to the processed images.

### Quality

The Actor uses **ISNet (DIS, Dichotomous Image Segmentation)**, an open-source high-accuracy segmentation model (Apache-2.0), at full resolution on CPU, about 3–4 seconds per image. It works best when the subject clearly stands out from the background, which is typical for product, catalogue, car and object photos. Hard cases include a dark product on a dark background or a very blurred background in similar colors. remove.bg's proprietary model is more polished on fine hair and glass, so **test 20–50 of your own images first**. It costs a few cents.

### FAQ

**Do I need to change my code?**
Only the base URL and the auth header (or add `?token=` to the URL). Request fields, response headers, JSON and error formats stay the same.

**Is the default output size the same?**
Yes. Like remove.bg, the default `size` is `preview` (0.25 MP). Send `size=full` or `size=auto` for full resolution, at the same price.

**How fast is it?**
About 3–5 seconds per image when the server is warm. The first request after a pause takes about 10 seconds longer while the server starts. Up to 4 requests are handled per server instance, and more instances start automatically under load.

**Can I limit my spending?**
Yes. Apify lets you set a maximum cost per Actor run. When it is reached, the API answers 402.

**Where are my images stored?**
In API mode, images are processed in memory and returned in the HTTP response. Nothing is stored. In batch mode, results go to your own Apify storage.

**Is this an official remove.bg product?**
No. See the disclaimer below.

### More tools from the same developer

All tools with code examples: [github.com/Phenixik/apify-actors](https://github.com/Phenixik/apify-actors)

- [AI Background Remover](https://apify.com/digitalni.produkty.pro.zivot/background-remover): bulk transparent PNGs, white backgrounds and masks
- [Product Photo Prep](https://apify.com/digitalni.produkty.pro.zivot/product-photo-prep): white-background, square photos for Shopify, Amazon and Etsy
- [AI Image Upscaler](https://apify.com/digitalni.produkty.pro.zivot/ai-image-upscaler): 2x / 4x Real-ESRGAN upscaling, no GPU
- [App Icon & Screenshot Generator](https://apify.com/digitalni.produkty.pro.zivot/app-icon-generator): every iOS, Android and PWA icon size from one image
- [Website Screenshot](https://apify.com/digitalni.produkty.pro.zivot/website-screenshot): full-page, mobile and PDF screenshots
- [Sitemap URL Extractor](https://apify.com/digitalni.produkty.pro.zivot/sitemap-url-extractor): every URL from a website's sitemaps
- [Broken Link Checker](https://apify.com/digitalni.produkty.pro.zivot/broken-link-checker): find 404s and dead links on your site
- [PageSpeed & Lighthouse Audit](https://apify.com/digitalni.produkty.pro.zivot/pagespeed-audit): bulk Core Web Vitals and SEO scores
- [Domain WHOIS & DNS Lookup](https://apify.com/digitalni.produkty.pro.zivot/domain-whois-lookup): expiry, DNS, SPF/DMARC and SSL for many domains
- [PDF Text Extractor](https://apify.com/digitalni.produkty.pro.zivot/pdf-text-extractor): text, Markdown and RAG chunks from PDFs
- [E-book Converter](https://apify.com/digitalni.produkty.pro.zivot/ebook-converter): Word, Google Docs or Markdown to PDF and EPUB
- [RSS Feed Reader & Monitor](https://apify.com/digitalni.produkty.pro.zivot/rss-feed-reader): only-new-items feed monitoring
- [Career Site Jobs API](https://apify.com/digitalni.produkty.pro.zivot/ats-jobs): search 400,000+ jobs from 11,000+ company career sites
- [App Store Reviews](https://apify.com/digitalni.produkty.pro.zivot/app-store-reviews): iOS reviews from 50+ countries

**Need a custom tool?** I build custom Apify Actors, scrapers, data feeds and automations, and adapt existing Actors to your workflow. Write to digitalniproduktyprozivot@email.cz or open an issue on the Issues tab.

### Disclaimer

This Actor is an independent, API-compatible alternative. It is **not affiliated with, endorsed by or connected to remove.bg, Kaleido AI, Canva or Leonardo.Ai**. "remove.bg" is a trademark of its owner and is used here only to describe API compatibility.

### Support

Missing a parameter your integration relies on, or found a response that differs from remove.bg? Open an issue with a sample request and we will fix it quickly.

# Actor input Schema

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

Links to JPEG, PNG, WebP, GIF, TIFF or AVIF images, one per line.

## `size` (type: `string`):

Output resolution, as in remove.bg: preview (0.25 MP), medium (1.5 MP), hd (4 MP), full / auto (up to 25 MP).

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

png (transparent), jpg, webp, zip (color.jpg + alpha.png) or auto (PNG if transparent, otherwise JPG).

## `bg_color` (type: `string`):

Optional solid background: hex (81d4fa, fff, 81d4fa80) or a color name (white). Empty = transparent.

## `crop` (type: `boolean`):

Crop off empty regions around the subject.

## `crop_margin` (type: `string`):

Margin around the cropped subject, e.g. 30px or 10% (1–4 values like CSS).

## `channels` (type: `string`):

rgba = finished image, alpha = black-and-white matte only.

## Actor input object example

```json
{
  "imageUrls": [
    "https://api.apify.com/v2/key-value-stores/uxnNYX56a3qdadmXf/records/sample-camera-cc0.jpg"
  ],
  "size": "full",
  "format": "png",
  "crop": false,
  "channels": "rgba"
}
```

# Actor output Schema

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

Source URL, result image link, format, size and foreground box.

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

Processed and failed images with error codes.

# 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://api.apify.com/v2/key-value-stores/uxnNYX56a3qdadmXf/records/sample-camera-cc0.jpg"
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("digitalni.produkty.pro.zivot/removebg-api-dropin").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://api.apify.com/v2/key-value-stores/uxnNYX56a3qdadmXf/records/sample-camera-cc0.jpg"] }

# Run the Actor and wait for it to finish
run = client.actor("digitalni.produkty.pro.zivot/removebg-api-dropin").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://api.apify.com/v2/key-value-stores/uxnNYX56a3qdadmXf/records/sample-camera-cc0.jpg"
  ]
}' |
apify call digitalni.produkty.pro.zivot/removebg-api-dropin --silent --output-dataset

```

## MCP server setup

```json
{
    "mcpServers": {
        "apify": {
            "type": "http",
            "url": "https://mcp.apify.com/?tools=fetch-actor-details,digitalni.produkty.pro.zivot/removebg-api-dropin"
        }
    }
}
```

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/yWMRq2TZZOUCP5GrN/builds/KBhQotUX58mdkBkhe/openapi.json
