Skip to content
Catalog

cn8/studio-background-image

Send the URL of an image and get it back with the background removed or replaced.

Learn more about Image Background Remove / Replace
ImagesyncInstant previewimageprocessingstudio

Try it

Source image
New background
#10b981

Result

The result shows up here

Upload your image on the left and hit Run.

Overview

Send the URL of an image and get it back with the background removed or replaced. The subject is cut out with clean edges — including fine detail like hair — and composited over a base of your choice:

  • Omit the background spec → subject on a white background
  • A hex colour (#RRGGBB) → solid colour fill
  • An image URL → your replacement background

The response is synchronous: you get the URL of the finished PNG directly in the reply, at the same resolution as the source image.

Key capabilities

Remove or replace

Remove the background to place the subject on white, or replace it with a solid hex colour or your own image. If you don't pass a background, the background is removed (white).

Clean edges and hair

The cutout is refined for crisp edges and fine detail like hair before compositing, so the result looks natural. Output resolution matches the input.

Synchronous response

No job to poll — the finished image URL comes back directly in the response body.

When to use it

Profile and product images

Remove clutter from headshots or product shots for a clean, consistent look.

Thumbnail and banner creation

Swap a background for a brand colour or graphic before assembling a layout.

Pipeline preprocessing

Clean the background before passing an image to generation or embedding services.

Input & output

input

Source image URL; optional background spec (hex colour or replacement image URL)

JSON body

output

Output image URL (PNG) returned synchronously

JSON

Guides & tips

How it works

  • Send the URL of your source image and, optionally, a background spec.
  • The subject is cut out with refined edges and fine detail like hair, then composited over the base you chose: white (remove), a solid colour, or your replacement image.
  • The finished PNG is returned as a URL in the response — ready to download or use straight away.

Supported image formats

  • Input: jpg, jpeg, png, webp.
  • Output: always PNG, which preserves full quality.

Background modes

  • Remove (default): omit back_ground or send null → subject on white.
  • Solid colour: back_ground = "#RRGGBB" (e.g. "#1E90FF").
  • Image replacement: imageBackgroundUrl = "https://…" (or back_ground = "https://…") → the image is fitted to the source dimensions.

Specs

Latency
Synchronous; typically 1–5 seconds depending on image resolution
Async
false
Rate Limit
Per API key
Max Input
Standard photo and product-image resolutions; very large images may be downscaled for processing

Schema

Request body

imageUrlrequiredstring

Public URL of the source image (jpg, png, webp, etc.)

back_groundstring

Omit or null to remove the background (white). A hex colour (#RRGGBB) fills with a solid colour. A URL replaces the background with that image.

imageBackgroundUrlstring

Replacement background image URL. Takes precedence over back_ground when both are set.

Pricing

Billed per image processed.

ServiceUnitPrice
Image Background Remove/Replaceimage5 credits/image

One image is charged per request, regardless of output size or background mode.

FAQ

Related models