Public APIs
Change Image Background API favicon

Change Image Background API

Photography

This API helps you change the background of any image.

Change Image Background API's website screenshot

About Change Image Background API

Change Image Background API is a hosted service from ApyHub that places a subject image onto a new background and returns a composited PNG. It accepts either multipart file uploads or image URLs, removes the subject's background server-side, and composites it onto a solid background color or a background image. Optional parameters control subject sizing, rotation angle, opacity, and placement, as well as background canvas sizing and opacity.

The API exposes both download and signed-link response modes: download endpoints return the generated PNG as binary data directly, while link endpoints return a JSON object containing a time-limited pre-signed URL to the result. Requests are capped at 100MB total per call across all combined files, with URL-based endpoints suggested as an alternative for larger inputs.

The service is aimed at developers building product shots, profile images, marketplace listings, and social media assets who need programmatic background replacement without handling image segmentation themselves.

Key features

  • Composites a subject image onto a new background and returns a PNG
  • Removes the subject's background server-side before compositing
  • Choose a solid background color or a background image for compositing
  • Adjust subject sizing, rotation, and opacity, plus placement position
  • Adjust background canvas size and opacity
  • Accepts multipart file uploads or image URLs, with binary download or signed-URL response options

Frequently asked questions

What does the API do?

It places a subject image onto a new background, either a solid color or another image, and returns a composited PNG. The subject's background is removed server-side before compositing.

What input and output options are supported?

You can send multipart file uploads or reference images by URL, and get results back either as a direct binary PNG download or as a time-limited pre-signed URL.

Is there a file size limit?

Multipart requests support up to 100MB total across all combined files; larger files should use the URL-based endpoint instead.

Who is this API useful for?

It's aimed at developers generating product shots, profile images, marketplace listings, and social media assets.

Can I control positioning and styling of the composite?

Yes, you can set image size, rotation angle, opacity, and placement position for the subject, plus size and opacity for the background layer.

Advertise here

Featured products

  • SerpApi - Search API favicon
  • Screenshot Scout favicon
  • TalorData favicon
  • CoreClaw favicon

Show your product to thousands of developers

· 100k monthly pageviews
· 7k newsletter subscribers

Advertise your product