Skip to content
Immersive AI

BiRefNet — keep the product, change the backdrop

Image BiRefNet v2 by Henri Huotari · Oct 28, 2026

Remove the charcoal studio background while retaining the headphones, their wave mark and the display plinth. The returned PNG has transparency and is ready to place in a new layout. Includes the original image for comparison.

This file couldn't be loaded. The link may have expired.
This file couldn't be loaded. The link may have expired.
Input images
This file couldn't be loaded. The link may have expired.
Output result.png

Run it yourself

Set IMMERSIVE_API_KEY to an API key from your account. Create a free account to get one.

curl -X POST 'https://ai.im.inc/api/v1/image/remove-background' \
  -H "Authorization: Bearer $IMMERSIVE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "image": "https://s3.eu-central-1.amazonaws.com/ai.im.inc/examples/inputs/e79f31a1-5eac-4d5d-96e1-a5ae2c0e0278/input_image.png",
  "model": "birefnet"
}'

# Set JOB_ID to the response's "id", then poll every few seconds until the job has finished:
curl "https://ai.im.inc/api/v1/image/remove-background/$JOB_ID" \
  -H "Authorization: Bearer $IMMERSIVE_API_KEY"

# The finished response has the result at url.
const headers = { Authorization: `Bearer ${process.env.IMMERSIVE_API_KEY}` };

const response = await fetch("https://ai.im.inc/api/v1/image/remove-background", {
  method: "POST",
  headers: { ...headers, "Content-Type": "application/json" },
  body: JSON.stringify({
    "image": "https://s3.eu-central-1.amazonaws.com/ai.im.inc/examples/inputs/e79f31a1-5eac-4d5d-96e1-a5ae2c0e0278/input_image.png",
    "model": "birefnet"
  }),
});
const job = await response.json();

// Poll every few seconds while the job is still running.
const running = ["pending", "queued", "submitted", "starting", "processing", "running", "streaming", "in_queue", "in_progress"];
let result;
do {
  await new Promise((resolve) => setTimeout(resolve, 5000));
  result = await (await fetch(`https://ai.im.inc/api/v1/image/remove-background/${job.id}`, { headers })).json();
} while (running.includes(String(result.status).toLowerCase()));

console.log(result.url);
import os
import time

import requests

headers = {"Authorization": f"Bearer {os.environ['IMMERSIVE_API_KEY']}"}

job = requests.post(
    "https://ai.im.inc/api/v1/image/remove-background",
    headers=headers,
    json={
        "image": "https://s3.eu-central-1.amazonaws.com/ai.im.inc/examples/inputs/e79f31a1-5eac-4d5d-96e1-a5ae2c0e0278/input_image.png",
        "model": "birefnet",
    },
    timeout=300,
).json()

# Poll every few seconds while the job is still running.
running = {"pending", "queued", "submitted", "starting", "processing", "running", "streaming", "in_queue", "in_progress"}
while True:
    time.sleep(5)
    result = requests.get(f"https://ai.im.inc/api/v1/image/remove-background/{job['id']}", headers=headers, timeout=60).json()
    if str(result.get("status", "")).lower() not in running:
        break

print(result["url"])
{
    "id": "01a18184-1d0d-73e3-b748-df6aba2f553d",
    "url": "https://s3.eu-central-1.amazonaws.com/ai.im.inc/examples/outputs/e79f31a1-5eac-4d5d-96e1-a5ae2c0e0278/result.png",
    "status": "succeeded"
}

Your browser blocked the clipboard. Select the text and copy it by hand.

How the job runs

  1. POST returns the job's id and status right away.
  2. Poll GET /api/v1/image/remove-background/{id} every few seconds while the job is running.
  3. When status is succeeded, download url. Failed jobs are refunded automatically.
Endpoint
POST /api/v1/image/remove-background
Model
birefnet
Output
Image · PNG