Remove the background
Cutting a subject out of its background used to mean a patient hour with a lasso tool and a lot of zooming in on hair and fur. This endpoint does the masking automatically and hands back an image with a transparent background, ready to drop onto a product page, a slide, or a new scene.
Run it online
Run this on our servers with your account. Free tools run in your browser; this one bills your KIT balance per the price above.
The part of photo editing nobody enjoys
Isolating a subject from its background is one of the oldest chores in image editing, and it stayed manual for decades because the hard part isn't the flat regions, it's the edges — flyaway hair, blurred motion, semi-transparent fabric, the thin gap between an arm and a torso. image.remove_background targets exactly that hard part, producing a mask that respects fine detail instead of a rough outline that clips it away.
What comes back from the API
POST /image/remove-background with your file, receive a task_id right away, and get the cut-out image by webhook or a signed link valid for 24 hours once processing finishes. The output is the original subject on a transparent background, so it layers cleanly into any design tool or gets composited straight into a new backdrop without a visible seam.
Where edge quality is won or lost
The images that come out best have reasonable contrast between subject and background and a subject that isn't itself half-transparent or the same color as what's behind it; product photography on a plain backdrop is close to the ideal case. Wispy hair, glass, smoke and complex overlapping objects are the genuinely hard cases in this field, and while the model handles them, edges around fine, translucent detail deserve a quick visual check before they go into a high-stakes asset.
Why this stopped being a design-only task
Automatic background removal moved from a niche photo-editing feature to infrastructure the moment catalogs, marketplaces and ad platforms started requiring thousands of consistent, background-free product shots — a volume no design team processes by hand. Treating it as an API call rather than a manual step is what makes that volume possible.
How teams wire it into a pipeline
E-commerce teams run every new product photo through the endpoint the moment it's uploaded, standardizing an entire catalog onto white or transparent backgrounds without a designer touching each image. Marketing teams isolate a subject to place it into a new campaign layout in seconds. Because it's billed per request plus per image and runs async, a batch of a thousand uploads is just a thousand tasks collected by webhook, not a queue for a human.
What you can do with it
Catalog standardization
An online store runs every new product photo through the endpoint on upload, so the entire catalog lands on a uniform white background automatically.
Marketplace listing compliance
A seller strips busy backgrounds from phone-shot product images to meet a marketplace's plain-background listing requirement.
Campaign composites
A marketing designer cuts a model out of a stock photo to place them into a new seasonal banner layout without manual masking.
Profile photo cleanup
An HR platform lets employees upload any headshot and automatically removes the background for a consistent team directory.
FAQ
How do I remove a background with the API?
Send the image to POST /image/remove-background, save the returned task_id, and receive the cut-out image by webhook or a signed link valid for 24 hours.
Is the background remover API free?
No, there's no free tier or trial. It costs $0.061 per request plus $0.0039 per image, and a failed job is never charged.
What format does the output come in?
A cut-out image on a transparent background, ready to layer into design software or composite onto a new backdrop; check the endpoint reference for supported output formats.
How does it handle hair and fine detail?
It's built to preserve fine edges like hair and semi-transparent fabric rather than clipping them into a rough silhouette, though very complex cases like glass or smoke deserve a quick visual check.
Is the endpoint available now?
It's completing deployment and should be accepting jobs soon, following the same async contract as the rest of the API.
Can I process a whole catalog of photos at once?
Yes, submit each image as its own async task and collect results by webhook as they finish, which is how bulk catalog jobs are typically run.
Does it work on photos with busy or cluttered backgrounds?
Yes, though results are strongest when there's reasonable contrast between the subject and what's behind it.
What happens to my images after processing?
Uploaded images and results are deleted after the retention window and are never used to train any model.
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, and soon from our app, email and Telegram.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/image/remove-background \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"image":"https://ejemplo.com/producto.jpg"}'const res = await fetch("https://api.kit.forhosting.com/image/remove-background", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"image": "https://ejemplo.com/producto.jpg"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/image/remove-background",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"image": "https://ejemplo.com/producto.jpg"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/image/remove-background", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"image":"https://ejemplo.com/producto.jpg"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"image":"https://ejemplo.com/producto.jpg"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/image/remove-background", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"image": "https://ejemplo.com/producto.jpg"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "image.remove_background",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_mb | 15 |
max_megapixels | 12 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |