Images
Remove background from a product image
Standalone background removal via PhotoRoom. This is a separate operation from image enhancement; the service replaces the background without the enhancement step.
How it works:
- Submit product image (URL or base64)
- PhotoRoom segments and replaces the background
- Returns the result as a base64 data URL (default) or S3 URL
Return formats:
- Base64 (default): Return a base64 data URL
- URL: Upload to S3 and return the output URL (set returnFormat: "url")
Output options:
- outputFormat: jpg (default, marketplace-safe), png (transparency-capable), webp
- bgColor: 6-digit hex (default #FFFFFF). Ignored if a transparent PNG is preferred.
- size: preview (0.25MP), medium (1.5MP), hd (4MP), full (up to 36MP, default)
- crop: trim transparent borders to the cutout bounding box
When to choose this vs /v1/images/enhance:
- Use this endpoint when you only need a clean white/coloured background.
- Use /v1/images/enhance for studio-style lighting and full enhancement.
post/v1/images/remove-background
Request
- Base URLhttps://api.shopfront.app
- AuthHTTP bearer
Request body
Example request
{
"options": {
"bgColor": "#FFFFFF"
}
}Response
Background removed successfully
Example response
{
"originalUrl": "https://i.ebayimg.com/images/g/abc/product.jpg",
"outputUrl": "data:image/jpeg;base64,/9j/4AAQSkZJRg...",
"s3Location": {
"bucket": "shopfront-s3-image-upload",
"key": "api-bg-removed/<orgId>/bg_1736817392_a3f9c2.jpg"
},
"processingTime": 312
}Changes
No recorded changes to this operation across all 1 revision of this API.