Background removal, built to scale

Cut out one image or ten thousand. Call it once for a single result, or run it async with webhooks for batch pipelines. The same API key also unlocks upscaling, scene generation, and more.

MORE VOLUME THAN A BROWSER TAB CAN HANDLE?

Removing backgrounds individually or in small batches works fine with browser tools - until you need scale. For big batches or ongoing pipelines, the Leonardo API runs background removal automatically inside your on product or workflow.

Clean subject isolation

Remove backgrounds from your generated images in seconds, creating transparent PNG outputs ready for further editing or export.

Stay in your workflow

Remove backgrounds directly within Leonardo’s image generation environment, without switching tools or re-uploading files.

Refine without starting over

Adjust and regenerate as needed while preserving the core composition and subject integrity.

THE BASICS, COVERED

Input

Use base64 for images up to ~7.5 MB, or a URL or uploaded file for any size up to 25 MB.

Subject detection

Auto-detects people, products, cars, animals, and more.

Flexible format and resolution

PNG, JPG, or WebP - from quick preview up to full 50MP outputs.

Background

Transparent, solid color, or your own image.

Extra controls

Shadows, cropping, semi-transparency, alpha-only output.

One Key, many capabilities

Sync or async, your choice

One call for a single image, or async with webhook callbacks for batches and pipelines. Both APIs accept base64 input, file upload or an image URL

Chain it into one call

Combine steps like remove background, place in scene, and upscale into one reusable workflow (called a Blueprint), then trigger them all with a single request.

Generate new scenes

Drop cutouts into new backgrounds, creating realistic scenes with perspective-aware background matching, so your subject fits naturally into any setting.

Upscale automatically

Sharpen and enlarge with Leonardo's Pro Upscaler

Turn stills into video

Animate a product image with start and end frame control.

Keep results, or don't

Results save to your Leonardo account by default, so you can find them again later. Set 'ephemeral = true' if you'd rather nothing is kept.

For Growing Teams and Enterprise

As your volume grows, so does what you need from an API. Work with our team to fine-tune models, build tailored integrations, and scale background removal with confidence.

Custom model support: Partner with us to fine-tune models for your use case.

End-to-end implementation help: Our experts help you design, implement, and optimize.

Tailored API integrations: Custom API workflows built around your product.

Dedicated Customer Success Manager: One point of contact for production deployments, higher usage limits, and model-based discounts.

Security and compliance: SOC 2 Type I and Type II accredited, GDPR compliant.

Before
After
BeforeAfter

Flexible API pricing
that removes friction

Start fast, pay only for what you use, and scale when you’re ready. Leonardo’s API pricing is designed to support experimentation first, without limiting where you can go next.

Pay as you go

Ideal if you’re moving quickly from early experiments to production

No commitments – pay only for what you use
Automatic top ups to keep production running smoothly
Access to the latest models from day one
Access to remove.bg background removal APIs
Up to 10 concurrent generations
API credit doesn’t expire

API Custom

Built for running higher-volume workloads or planning long-term scale.

Everything from Pay as you go
Custom concurrent generation limits
Model-based discounts
Dedicated support for production deployments

Please be aware that all API requests will cost API Credit. For help, please see our API documentation here

Getting started

Getting your first API call working only takes a few minutes.

1

Create account

2

Generate API key

Navigate to the API menu and generate an API key.

3

Try the API

Call the background removal endpoint with a file, an image URL, or an uploaded image ID.

4

Expand your use

Add upscaling, scene generation, or Blueprints whenever you're ready.

Speed Up edits with blueprints

Object Remover

Remove unwanted elements while preserving natural detail.

Background Change

Replace or modify backgrounds within your generated images.

Bulk Resize

Adapt multiple images for different formats in seconds.

Blueprints help you apply common image edits quickly and consistently.

FAQS

What is an AI background remover?

An AI background remover uses machine learning to automatically separate a subject from its background. Leonardo applies this to images generated within the platform.

How does AI background removal work?

Leonardo analyzes the generated image and detects subject boundaries, removing the background while preserving subject detail.

How accurate are background removers?

Accuracy depends on image complexity and subject contrast. Clear subjects with defined edges typically produce the best results.

How do I perfectly remove a background?

For best results, use images with clear subject separation and minimal visual clutter.

Do you store my images?

By default, results save to your Leonardo library. If you'd rather nothing is kept, set ephemeral = true and results return as a short-lived link instead (deleted after 30 minutes).

Do I need to use the Sync or Async API?

Sync is simplest for one-off calls, a single request returns the result. Async suits batches, large images, or pipelines that shouldn't hold a connection open, with optional webhook callbacks.

Is this the same technology remove.bg used?

Yes. This is the same background removal model that previously powered remove.bg, now available directly through Leonardo's API, alongside upscaling, scene generation, and more.

BACKGROUND REMOVAL THAT SCALES WITH YOU

Generate, refine, and export clean images directly within Leonardo’s workflow.

Explore

More than just an AI image generator

Leonardo is a complete creative suite. Go beyond image generation with tools designed to help you edit, animate, and scale your ideas.

AI Image Generator

AI Image Generator

Generate high-quality images from text or references. Explore styles, refine results, and maintain consistency across creative outputs.

Learn more
AI Video Generator

AI Video Generator

Create motion content from text or images. Animate stills, control pacing, and build short video sequences with clarity and intent.

Learn more
AI Photography

AI Photography

Uplift your portfolio with Leonardo’s flexible suite of creative AI tools, including image generation, photo editing, and upscaling.

Learn more
AI Graphic Design

AI Graphic Design

Design layouts, visuals, and branded assets with Leonardo’s AI graphic design tools. Shape color, typography, and visual style while using AI to move faster, from concept to polished design.

Learn more
AI Image Editor

AI Image Editor

Refine images with AI using prompts and targeted edits. Adjust details while preserving composition and style.

Learn more

Trusted by creators worldwide

From freelancers to global brands, millions use Leonardo to create and refine high-quality visuals.