Migration guide

Move off the remove.bg API before 1 December 2026

The remove.bg API service stops on 1 December 2026. lassocut accepts the same requests and returns the same responses, so for most integrations the move is two edits: the base URL and the API key.

1. Get a lassocut key

Sign in with GitHub or Google in your account and create a key. Every account gets 50 free previews per month.

2. Change the base URL and the key

- https://api.remove.bg/v1.0/
+ https://api.lassocut.com/v1.0/

The key still goes in the X-Api-Key header. Paths, form fields, JSON bodies and response formats do not change.

curl

curl -H "X-Api-Key: $LASSOCUT_API_KEY" \
     -F "image_file=@photo.jpg" \
     -F "size=auto" \
     -o no-bg.png \
     https://api.lassocut.com/v1.0/removebg

Python (requests)

import os, requests

r = requests.post(
    "https://api.lassocut.com/v1.0/removebg",
    headers={"X-Api-Key": os.environ["LASSOCUT_API_KEY"]},
    files={"image_file": open("photo.jpg", "rb")},
    data={"size": "auto"},
)
r.raise_for_status()
open("no-bg.png", "wb").write(r.content)
print("credits charged:", r.headers["X-Credits-Charged"])

Node.js (18 or later)

import { readFile, writeFile } from "node:fs/promises";

const form = new FormData();
form.append("image_file", new Blob([await readFile("photo.jpg")]), "photo.jpg");
form.append("size", "auto");

const res = await fetch("https://api.lassocut.com/v1.0/removebg", {
  method: "POST",
  headers: { "X-Api-Key": process.env.LASSOCUT_API_KEY },
  body: form,
});
if (!res.ok) throw new Error(JSON.stringify(await res.json()));
await writeFile("no-bg.png", Buffer.from(await res.arrayBuffer()));

PHP (cURL)

$ch = curl_init("https://api.lassocut.com/v1.0/removebg");
curl_setopt_array($ch, [
    CURLOPT_HTTPHEADER => ["X-Api-Key: " . getenv("LASSOCUT_API_KEY")],
    CURLOPT_POSTFIELDS => ["image_file" => new CURLFile("photo.jpg"), "size" => "auto"],
    CURLOPT_RETURNTRANSFER => true,
]);
file_put_contents("no-bg.png", curl_exec($ch));

3. Check your balance

curl -H "X-Api-Key: $LASSOCUT_API_KEY" https://api.lassocut.com/v1.0/account

The response has the same shape as before: data.attributes.credits and data.attributes.api.free_calls.

What stays the same

AreaStatusNotes
EndpointsSamePOST /removebg, GET /account, POST /improve
Image sourcesSameimage_file, image_file_b64, image_url
Sizes and creditsSamepreview 0.25 credit, full, 50MP and the legacy aliases 1 credit, auto
OutputSameformat png, jpg, webp, zip; channels rgba or alpha
FramingSamecrop, crop_margin, scale, position, roi
BackgroundsSamebg_color, bg_image_url, bg_image_file
Response headersSameX-Width, X-Height, X-Credits-Charged, X-Type, X-Foreground-*, rate-limit headers
ErrorsSameHTTP status, errors[].code and errors[].title as documented
Rate limitSame500 megapixel-images per minute, 429 with Retry-After
JSON responseSameAccept: application/json returns data.result_b64

Libraries and the CLI

Python: removebg package

The endpoint is a module constant; set it once before creating the client.

import removebg.removebg
removebg.removebg.API_ENDPOINT = "https://api.lassocut.com/v1.0/removebg"

from removebg import RemoveBg
RemoveBg(LASSOCUT_API_KEY, "errors.log").remove_background_from_img_file("photo.jpg")

PHP: mtownsend/remove-bg

The endpoint is a public property of the client.

$removebg = new \Mtownsend\RemoveBg\RemoveBg($lassocutApiKey);
$removebg->endpoint = 'https://api.lassocut.com/v1.0/removebg';
$removebg->file('photo.jpg')->save('no-bg.png');

Command line: the lassocut CLI

Same flags as the remove.bg command-line tool, results keep the -removebg suffix, and REMOVE_BG_API_KEY is still read. Needs Node.js 18 or later.

export LASSOCUT_API_KEY=your-key
npm install -g lassocut-cli
lassocut --output-directory out/ photos/

Source and full flag list: github.com/jaupin94/lassocut-cli.

Node.js: remove.bg package

Its address is built in. Call the API with fetch as shown above; it takes a few lines.

What is different

  • Shadows. add_shadow and shadow_type are accepted. The drop shadow is drawn; the car and 3D shadow styles are not drawn yet.
  • The cut-out itself. Our models are not remove.bg's, so edges will not be pixel-identical. Test a sample of your own images before switching production traffic.
  • Detected type. With type=auto, X-Type comes from our own classifier and can disagree with what you saw before on borderline images.
  • Existing credits. remove.bg credits cannot be used on lassocut.

Questions

Is lassocut part of remove.bg?

No. lassocut is an independent service operated by JAUPIN Design LLC. It implements the publicly documented remove.bg API so existing code keeps working.

Do you keep my images?

No. Images sent to /removebg are processed in memory and discarded. Only images you send yourself to /improve are kept, to improve the models.

Something doesn't match?

Send the request and the response you got to hello@lassocut.com. Compatibility bugs are fixed first.