Example Outputs
Evaluate the quality in various categories. Additionally, you can upload your photos, and inspect the result.












Test it
Pricing
We provide comfortable rates. Go as you pay.
Package | Credits | Price | Price per Credit | Validity |
---|---|---|---|---|
Free trial* | 50 | € 0 | € 0.00 | 30 days |
Package XS | 100 | € 10 | € 0.10 | 30 days |
Package S | 500 | € 40 | € 0.08 20% off | 30 days |
Package M | 1,000 | € 70 | € 0.07 30% off | 90 days |
Package L | 5,000 | € 300 | € 0.06 40% off | 180 days |
Package XL | 10,000 | € 500 | € 0.05 50% off | 360 days |
* Create account and get your API Key with 50 free credits.
Easy Integration
Our API is easy to integrate into your existing workflows. Here are some examples in various languages.
import requests
headers = {
'accept': 'application/json',
'X-API-Key': 'YOUR_API_KEY',
# requests won't add a boundary if this header is set when you pass files=
# 'Content-Type': 'multipart/form-data',
}
files = {
'file': open('input-image.jpg', 'rb'),
}
response = requests.post('https://api.withoutbg.com/v1.0/image-without-background', headers=headers, files=files)
import java.io.IOException;
import java.io.InputStream;
import java.net.HttpURLConnection;
import java.net.URL;
import java.util.Scanner;
class Main {
public static void main(String[] args) throws IOException {
URL url = new URL("https://api.withoutbg.com/v1.0/image-without-background");
HttpURLConnection httpConn = (HttpURLConnection) url.openConnection();
httpConn.setRequestMethod("POST");
httpConn.setRequestProperty("accept", "application/json");
httpConn.setRequestProperty("X-API-Key", "YOUR_API_KEY");
httpConn.setRequestProperty("Content-Type", "multipart/form-data");
InputStream responseStream = httpConn.getResponseCode() / 100 == 2
? httpConn.getInputStream()
: httpConn.getErrorStream();
Scanner s = new Scanner(responseStream).useDelimiter("\\A");
String response = s.hasNext() ? s.next() : "";
System.out.println(response);
}
}
<?php
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.withoutbg.com/v1.0/image-without-background');
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'POST');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'accept: application/json',
'X-API-Key: YOUR_API_KEY',
'Content-Type: multipart/form-data',
]);
curl_setopt($ch, CURLOPT_POSTFIELDS, [
'file' => new CURLFile('input-image.jpg'),
]);
$response = curl_exec($ch);
curl_close($ch);
extern crate reqwest;
use reqwest::{header, blocking::multipart};
fn main() -> Result<(), Box> {
let mut headers = header::HeaderMap::new();
headers.insert("accept", "application/json".parse().unwrap());
headers.insert("X-API-Key", "YOUR_API_KEY".parse().unwrap());
headers.insert("Content-Type", "multipart/form-data".parse().unwrap());
let form = multipart::Form::new()
.file("file", "input-image.jpg")?;
let client = reqwest::blocking::Client::builder()
.redirect(reqwest::redirect::Policy::none())
.build()
.unwrap();
let res = client.post("https://api.withoutbg.com/v1.0/image-without-background")
.headers(headers)
.multipart(form)
.send()?
.text()?;
println!("{}", res);
Ok(())
}
const form = new FormData();
form.append('file', File([''], 'input-image.jpg'));
fetch('https://api.withoutbg.com/v1.0/image-without-background', {
method: 'POST',
headers: {
'accept': 'application/json',
'X-API-Key': 'YOUR_API_KEY',
'Content-Type': 'multipart/form-data'
},
body: form
});
package main
import (
"bytes"
"fmt"
"io"
"log"
"mime/multipart"
"net/http"
"os"
"path/filepath"
)
func main() {
form := new(bytes.Buffer)
writer := multipart.NewWriter(form)
fw, err := writer.CreateFormFile("input-image.jpg", filepath.Base("input-image.jpg"))
if err != nil {
log.Fatal(err)
}
fd, err := os.Open("input-image.jpg")
if err != nil {
log.Fatal(err)
}
defer fd.Close()
_, err = io.Copy(fw, fd)
if err != nil {
log.Fatal(err)
}
writer.Close()
client := &http.Client{}
req, err := http.NewRequest("POST", "https://api.withoutbg.com/v1.0/image-without-background", form)
if err != nil {
log.Fatal(err)
}
req.Header.Set("accept", "application/json")
req.Header.Set("X-API-Key", "YOUR_API_KEY")
req.Header.Set("Content-Type", writer.FormDataContentType())
resp, err := client.Do(req)
if err != nil {
log.Fatal(err)
}
defer resp.Body.Close()
bodyText, err := io.ReadAll(resp.Body)
if err != nil {
log.Fatal(err)
}
fmt.Printf("%s\n", bodyText)
}
curl -X 'POST' \
https://api.withoutbg.com/v1.0/image-without-background \
-H 'X-API-Key: YOUR_API_KEY' \
-F 'file=@input-image.jpg' \
-o output-image.png
using System.Net.Http;
using System.Net.Http.Headers;
HttpClient client = new HttpClient();
HttpRequestMessage request = new HttpRequestMessage(HttpMethod.Post, "https://api.withoutbg.com/v1.0/image-without-background");
request.Headers.Add("accept", "application/json");
request.Headers.Add("X-API-Key", "YOUR_API_KEY");
MultipartFormDataContent content = new MultipartFormDataContent();
content.Add(new ByteArrayContent(File.ReadAllBytes("input-image.jpg")), "file", Path.GetFileName("input-image.jpg"));
request.Content = content;
request.Content.Headers.ContentType = new MediaTypeHeaderValue("multipart/form-data");
HttpResponseMessage response = await client.SendAsync(request);
response.EnsureSuccessStatusCode();
string responseBody = await response.Content.ReadAsStringAsync();
To see alternative endpoints, check the documentation page.
FAQ
API
You can use any programming language. You can find several examples on the documentation page.
Yes. 7 requests / minute.
Technology
It is a supervised machine learning algorithm, meaning that it is learning from the examples we provide.
Our image background removal model is designed to handle complex backgrounds, including those with gradients or textures. In most cases, our model is able to successfully remove the background while preserving the foreground object. However, for the best results, we recommend using the service with images that have smooth and solid backgrounds, if possible. This can help to ensure that the image background removal is as accurate and seamless as possible and that the final output meets your expectations.
While your service aims to preserve the original quality of the foreground object as much as possible, it is important to note that there may still be some minor loss of detail or resolution in certain cases. If you prefer, you may request only the alpha channel, and process it on your side.
Pricing
Yes. When you sign up, you get 50 free credits.
We provide an endpoint for getting available credits and expiration dates. Every processing costs 1 credit.
When you run out of credits or exceed your monthly credit limit, the API will respond with a 403 Forbidden
status code along with a JSON payload specifying an Insufficient Credit
error. To continue using the service, you can purchase additional credits on your account dashboard.
Privacy
We process your images in memory. We do not store them.
No tracking code on our website. Your browsing habits are not tracked.
Company
Frankfurt, Germany
Privacy by Design
We truly care about your privacy. Here is how: