# AI Object Remover (Erase People, Text, Logos) (`toowl/ai-object-remover`) Actor

Erase unwanted objects from photos in bulk with the MI-GAN inpainting model: people, text, watermarks you own, logos, wires, blemishes. Mark them with a mask image or boxes; the rest of the photo keeps full resolution. Pay per image.

- **URL**: https://apify.com/toowl/ai-object-remover.md
- **Developed by:** [Chalid Ade](https://apify.com/toowl) (community)
- **Features:** Limited permissions
- **Stats:** 1 total users, 0 monthly users, 0.0% runs succeeded, 0 bookmarks
- **User rating**: No ratings yet

## Pricing

from $10.00 / 1,000 cleaned images

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/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 Object Remover — erase people, text, logos and blemishes

Remove unwanted objects from photos in bulk with the **MI-GAN** inpainting model: tourists in the background, text, date stamps, logos you have the rights to remove, power lines, stains, blemishes. Mark what to remove with a **mask image** or **boxes**; the model fills it in with matching background.

### Why use it

- **Mask or boxes**: a black-and-white mask (white = remove; a transparent PNG with opaque strokes works too), or rectangles in pixels or percent.
- **One mask for many photos**: remove the same corner logo or date stamp from a whole folder with one `boxes` setting in percent.
- **Full resolution kept**: only the marked areas (plus a soft edge) change; each area is filled in its own 512 px window with enough context around it.
- **JPG, PNG, WebP** out; one ZIP of all results.
- **No third-party API**: the model runs inside the Actor.
- **Pay per image.** Failed images are free.

### Input

```json
{
  "images": [
    {
      "imageUrl": "https://example.com/beach.jpg",
      "boxes": [{ "x": 690, "y": 410, "width": 180, "height": 320 }]
    },
    { "imageUrl": "https://example.com/product.jpg", "maskUrl": "https://example.com/product-mask.png" }
  ]
}
```

Same corner on every photo (bottom-right 15% × 10%):

```json
{
  "images": ["https://example.com/1.jpg", "https://example.com/2.jpg"],
  "boxes": [{ "x": 85, "y": 90, "width": 15, "height": 10 }],
  "boxUnit": "percent"
}
```

### Output

```json
{
  "imageUrl": "https://example.com/beach.jpg",
  "name": "beach",
  "width": 1600,
  "height": 1000,
  "areas": 1,
  "maskedPercent": 3.6,
  "downloadUrl": "https://api.apify.com/v2/key-value-stores/…/records/0001-beach.jpg"
}
```

### Tips

- Mark a little beyond the object, including its shadow.
- Works best on objects in front of natural, repetitive backgrounds (sky, grass, walls, sand). Large areas over complex scenes are guessed and may look soft.
- Masks covering more than 60% of a photo are rejected.

### Pricing

Pay per event: one event per processed image. Cap any run with "Max cost per run".

### Rights

Only edit images you own or have permission to edit; don't remove watermarks or credits from other people's work.

### Free browser version

Paint over objects by hand at [toowl.my.id/tools/remove-object](https://toowl.my.id/tools/remove-object/) — free, in your browser.

### Call it from your code

```bash
curl -X POST "https://api.apify.com/v2/acts/toowl~ai-object-remover/run-sync-get-dataset-items" \
  -H "Authorization: Bearer $APIFY_TOKEN" \
  -H 'Content-Type: application/json' \
  -d '{"images":[{"imageUrl":"https://example.com/photo.jpg","boxes":[{"x":100,"y":80,"width":200,"height":150}]}]}'
```

The same call works from Python (`apify-client`), JavaScript, Make, Zapier and n8n (Apify app/node or a plain HTTP request).

### Use it from AI agents (MCP)

Add this Actor as a tool to Claude, Cursor, VS Code or any MCP client through Apify's MCP server:

```
https://mcp.apify.com/?actors=toowl/ai-object-remover
```

The agent can then pass file URLs and read the results itself.

### More toowl file APIs

Speech to text & subtitles, AI vocal remover, text to speech, AI object remover, PDF to Markdown, PDF to Word & Excel, HTML/URL to PDF, OCR, Office to PDF, PDF compressor, PDF merge/split, PDF password protect, PDF to image, image to PDF, bulk watermark, image converter and compressor, background remover, AI upscaler, image to SVG, QR code and barcode generators, QR/barcode reader, favicon generator, video compressor, frame extractor and audio converter. All pay per file, all batch-friendly: [toowl.my.id/en/api](https://toowl.my.id/en/api/).

Questions or a format that fails? Open an issue on the Actor's **Issues** tab.

# Actor input Schema

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

One entry per photo: {"imageUrl": "…", "maskUrl": "…"} with a mask image (white or opaque = remove), or {"imageUrl": "…", "boxes": \[{"x": 690, "y": 410, "width": 180, "height": 320}]}. Optional "name" and "boxUnit" ("px" or "percent").

## `maskUrl` (type: `string`):

One mask image used for all photos that have none (e.g. the same logo corner on every frame). It is stretched to each photo.

## `boxes` (type: `array`):

Boxes used for all photos that have neither mask nor boxes, e.g. \[{"x": 85, "y": 90, "width": 15, "height": 10}] with box unit percent for a corner logo.

## `boxUnit` (type: `string`):

Pixels of the original photo, or percent of its width/height.

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

Same as the input (PNG/WebP stay, everything else becomes JPG), or a fixed one.

## `zip` (type: `boolean`):

Bundle every result into images.zip when there are two or more.

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

Larger files are skipped with an error (not charged).

## Actor input object example

```json
{
  "images": [
    {
      "imageUrl": "https://raw.githubusercontent.com/chalidade/tools/main/apify/samples/scene.jpg",
      "boxes": [
        {
          "x": 690,
          "y": 410,
          "width": 180,
          "height": 320
        },
        {
          "x": 70,
          "y": 70,
          "width": 620,
          "height": 100
        }
      ]
    }
  ],
  "boxUnit": "px",
  "format": "auto",
  "zip": true,
  "maxFileSizeMb": 30
}
```

# Actor output Schema

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

One row per input, with download links for the results.

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

Result files in the default key-value store, plus a SUMMARY 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": [
        {
            "imageUrl": "https://raw.githubusercontent.com/chalidade/tools/main/apify/samples/scene.jpg",
            "boxes": [
                {
                    "x": 690,
                    "y": 410,
                    "width": 180,
                    "height": 320
                },
                {
                    "x": 70,
                    "y": 70,
                    "width": 620,
                    "height": 100
                }
            ]
        }
    ]
};

// Run the Actor and wait for it to finish
const run = await client.actor("toowl/ai-object-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": [{
            "imageUrl": "https://raw.githubusercontent.com/chalidade/tools/main/apify/samples/scene.jpg",
            "boxes": [
                {
                    "x": 690,
                    "y": 410,
                    "width": 180,
                    "height": 320,
                },
                {
                    "x": 70,
                    "y": 70,
                    "width": 620,
                    "height": 100,
                },
            ],
        }] }

# Run the Actor and wait for it to finish
run = client.actor("toowl/ai-object-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": [
    {
      "imageUrl": "https://raw.githubusercontent.com/chalidade/tools/main/apify/samples/scene.jpg",
      "boxes": [
        {
          "x": 690,
          "y": 410,
          "width": 180,
          "height": 320
        },
        {
          "x": 70,
          "y": 70,
          "width": 620,
          "height": 100
        }
      ]
    }
  ]
}' |
apify call toowl/ai-object-remover --silent --output-dataset

```

## MCP server setup

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