---
title: Remove Background from Image File API
slug: background-removal
url: https://apyhub.com/dosvak/service/background-removal
provider: Dosvak LLC
categories: [Smart Generation]
tags: [background-removal, image-segmentation, transparent-png, e-commerce-images, image-processing]
auth: api_key
---

# Remove Background from Image File API

Remove image backgrounds with SAM-2 auto-segmentation. Send an image file up to 20 MB and get a transparent PNG back for editing or publishing.

## Endpoints

| Method | Path | Description | Atoms |
| --- | --- | --- | --- |
| POST | `` | What it does Removes the background from an uploaded image using SAM-2 auto-segmentation and return… | 100 |

## About

## What it does
Background Removal removes the background from a single image and returns a transparent PNG. Send an image file in the request body, and get back the cut-out image as binary output.

Use it when you need product photos on clean white or transparent backgrounds, profile images with consistent framing, or source images prepared for compositing in design and e-commerce workflows. The endpoint uses SAM-2 auto-segmentation to isolate the foreground without requiring masks, coordinates, or manual region selection.

The API accepts one input: `file`, an image file up to 20 MB. The response is a binary PNG with transparency preserved, so you can store it, pass it to another image pipeline, or display it directly in your app.

Background Removal is a good fit for apps that batch-process user uploads, generate marketplace-ready listings, or automate simple image cleanup before publishing.

## Usage

Authenticate with an ApyHub API key in the `apy-token` header.
Full docs and a live playground: https://apyhub.com/dosvak/service/background-removal
