Object Remover API

Erase Unwanted Objects from Images with AI Inpainting.

hero banner

Code Examples in Popular Languages

Integrate our Object Remover API easily into your apps with comprehensive code examples in popular languages to get started quickly.

CURL Request
curl --location 'https://theonlineconverter.com/api/v1/object-remover' \
--header 'Content-Type: application/json' \
--header 'x-api-key: enter_your_api_key' \
--form 'original_image=@"/D:/data/Images/jpg/person.jpg"' \
--form 'mask_image=@"/D:/data/Images/jpg/person.jpg"'
JavaScript Fetch
const myHeaders = new Headers();
myHeaders.append("Content-Type", "application/json");
myHeaders.append("x-api-key", "enter_your_api_key");

const formdata = new FormData();
formdata.append("original_image", fileInput.files[0], "/D:/data/Images/jpg/person.jpg");
formdata.append("mask_image", fileInput.files[0], "/D:/data/Images/jpg/person.jpg");

const requestOptions = {
  method: "POST",
  headers: myHeaders,
  body: formdata,
  redirect: "follow"
};

fetch("https://theonlineconverter.com/api/v1/object-remover", requestOptions)
  .then((response) => response.text())
  .then((result) => console.log(result))
  .catch((error) => console.error(error));
Ruby Net::HTTP
import requests
import json

url = "https://theonlineconverter.com/api/v1/object-remover"

payload = {}
files=[
  ('original_image',('person.jpg',open('/D:/data/Images/jpg/person.jpg','rb'),'image/jpeg')),
  ('mask_image',('person.jpg',open('/D:/data/Images/jpg/person.jpg','rb'),'image/jpeg'))
]
headers = {
  'Content-Type': 'application/json',
  'x-api-key': 'enter_your_api_key'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
Python Requests
import requests
import json

url = "https://theonlineconverter.com/api/v1/object-remover"

payload = {}
files=[
  ('original_image',('person.jpg',open('/D:/data/Images/jpg/person.jpg','rb'),'image/jpeg')),
  ('mask_image',('person.jpg',open('/D:/data/Images/jpg/person.jpg','rb'),'image/jpeg'))
]
headers = {
  'Content-Type': 'application/json',
  'x-api-key': 'enter_your_api_key'
}

response = requests.request("POST", url, headers=headers, data=payload, files=files)

print(response.text)
PHP Guzzle
<?php
$client = new Client();
$headers = [
  'Content-Type' => 'application/json',
  'x-api-key' => 'enter_your_api_key'
];
$options = [
  'multipart' => [
    [
      'name' => 'original_image',
      'contents' => Utils::tryFopen('/D:/data/Images/jpg/person.jpg', 'r'),
      'filename' => '/D:/data/Images/jpg/person.jpg',
      'headers'  => [
        'Content-Type' => '<Content-type header>'
      ]
    ],
    [
      'name' => 'mask_image',
      'contents' => Utils::tryFopen('/D:/data/Images/jpg/person.jpg', 'r'),
      'filename' => '/D:/data/Images/jpg/person.jpg',
      'headers'  => [
        'Content-Type' => '<Content-type header>'
      ]
    ]
]];
$request = new Request('POST', 'https://theonlineconverter.com/api/v1/object-remover', $headers);
$res = $client->sendAsync($request, $options)->wait();
echo $res->getBody();
Java HttpURLConnection
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/json");
RequestBody body = new MultipartBody.Builder().setType(MultipartBody.FORM)
  .addFormDataPart("original_image","/D:/data/Images/jpg/person.jpg",
    RequestBody.create(MediaType.parse("application/octet-stream"),
    new File("/D:/data/Images/jpg/person.jpg")))
  .addFormDataPart("mask_image","/D:/data/Images/jpg/person.jpg",
    RequestBody.create(MediaType.parse("application/octet-stream"),
    new File("/D:/data/Images/jpg/person.jpg")))
  .build();
Request request = new Request.Builder()
  .url("https://theonlineconverter.com/api/v1/object-remover")
  .method("POST", body)
  .addHeader("Content-Type", "application/json")
  .addHeader("x-api-key", "enter_your_api_key")
  .build();
Response response = client.newCall(request).execute();
Go net/http
package main

import (
  "fmt"
  "bytes"
  "mime/multipart"
  "os"
  "path/filepath"
  "net/http"
  "io"
)

func main() {

  url := "https://theonlineconverter.com/api/v1/object-remover"
  method := "POST"

  payload := &bytes.Buffer{}
  writer := multipart.NewWriter(payload)
  file, errFile1 := os.Open("/D:/data/Images/jpg/person.jpg")
  defer file.Close()
  part1,
         errFile1 := writer.CreateFormFile("original_image",filepath.Base("/D:/data/Images/jpg/person.jpg"))
  _, errFile1 = io.Copy(part1, file)
  if errFile1 != nil {
    fmt.Println(errFile1)
    return
  }
  file, errFile2 := os.Open("/D:/data/Images/jpg/person.jpg")
  defer file.Close()
  part2,
         errFile2 := writer.CreateFormFile("mask_image",filepath.Base("/D:/data/Images/jpg/person.jpg"))
  _, errFile2 = io.Copy(part2, file)
  if errFile2 != nil {
    fmt.Println(errFile2)
    return
  }
  err := writer.Close()
  if err != nil {
    fmt.Println(err)
    return
  }


  client := &http.Client {
  }
  req, err := http.NewRequest(method, url, payload)

  if err != nil {
    fmt.Println(err)
    return
  }
  req.Header.Add("Content-Type", "application/json")
  req.Header.Add("x-api-key", "enter_your_api_key")

  req.Header.Set("Content-Type", writer.FormDataContentType())
  res, err := client.Do(req)
  if err != nil {
    fmt.Println(err)
    return
  }
  defer res.Body.Close()

  body, err := io.ReadAll(res.Body)
  if err != nil {
    fmt.Println(err)
    return
  }
  fmt.Println(string(body))
}
C# HttpClient
var options = new RestClientOptions("https://theonlineconverter.com")
{
  MaxTimeout = -1,
};
var client = new RestClient(options);
var request = new RestRequest("/api/v1/object-remover", Method.Post);
request.AddHeader("Content-Type", "application/json");
request.AddHeader("x-api-key", "enter_your_api_key");
request.AlwaysMultipartFormData = true;
request.AddFile("original_image", "/D:/data/Images/jpg/person.jpg");
request.AddFile("mask_image", "/D:/data/Images/jpg/person.jpg");
RestResponse response = await client.ExecuteAsync(request);
Console.WriteLine(response.Content);

Key Features & Capabilities

Our API is powered by a sophisticated generative AI model to deliver clean, realistic, and professional image edits.

Simple User Interface

AI-Powered Inpainting

Utilizes a state-of-the-art AI model that doesn't just erase but intelligently reconstructs and fills in the background with context-aware, realistic details.

Simple Data Format

Remove Any Object

Effectively remove people, text, logos, watermarks, trash cans, or any other distracting element from your photographs.

Time

AI Background Reconstruction

The AI analyzes the surrounding pixels, textures, and lighting to generate a background that blends perfectly, leaving no trace of the removed object.

Secure Data

High-Quality, Natural Results

Achieve professional-grade edits that look completely natural, avoiding the blurry or smudged artifacts common with older tools.

Universal Access

Clean Up Product Photos

Perfect for e-commerce, allowing you to remove props, dust, or unwanted reflections to create flawless product imagery.

Freedom

Secure & Confidential

All images are processed over encrypted connections. We guarantee confidentiality with a strict data privacy policy and do not store your files.

Frequently Asked Questions

Find answers to common questions about our Object Remover API to understand how our AI cleans up your images.

This process is called "inpainting." The AI has been trained on millions of images and has learned the context of different scenes. When you mask an object, it analyzes the surrounding area (e.g., sand, sky, grass) and generates new pixels that realistically match the existing pattern, texture, and lighting.

You provide a "mask" image along with your source image. This is a simple black-and-white image where the area of the object you want to remove is painted white, and the rest is black. This gives you precise control over the removal area.

The technology works on a wide variety of images. It performs exceptionally well when the background has a recurring or natural pattern (like sky, water, walls, or fields). Very complex, non-repeating backgrounds can be more challenging but still yield impressive results.

The AI is incredibly powerful and produces near-perfect results for most common use cases. For extremely large or complex objects that cover a significant portion of the image, minor artifacts may occasionally appear, but it provides a professional-grade starting point for any edit.

The output format will typically be a high-quality PNG or JPG, preserving the quality of the original image while incorporating the seamlessly reconstructed background.

AI inpainting is computationally intensive. The process typically takes several seconds, depending on the image resolution and the complexity of the area to be reconstructed.

Absolutely. We use end-to-end TLS encryption for all data transfers. Your image files are processed securely and are permanently deleted from our servers immediately after the job is complete.