Background Remove
Background Remove enables you to cleanly remove backgrounds from images, creating transparent PNG cutouts of foreground subjects. This classic background removal tool automatically detects and preserves the main subject while eliminating the background.
- Model Name:
background-remove - Lifecycle: experimental
- Processing Time: 1-3 seconds
- Supported Resolution: up to 4MP
- Credits: 1
Request
Remove image backgrounds by submitting the source image to the universal /v1/run endpoint:
Request Parameters
Required Parameters
imageRequiredimage URL | base64
Source image to remove the background from. The AI will automatically detect the main subject and create a clean cutout with transparent background.
Base64 images must include the proper prefix (e.g., data:image/jpg;base64,<YOUR_BASE64>)
Optional Parameters
return_base64boolean
When set to true, the API will return the generated image as a base64-encoded string instead of a CDN URL. The base64 string will be prefixed data:image/png;base64,....
This option offers enhanced privacy as user-generated outputs are not stored on our servers when return_base64 is enabled.
Default: false
Response Polling
After submitting your request, poll the status endpoint using the returned prediction ID. See API Fundamentals for complete polling details.
Successful Response
When your background removal completes successfully, the status endpoint will return:
The output array contains either URLs or, if return_base64 is set to true, base64-encoded strings of your processed PNG images with backgrounds removed.
Runtime Errors
Runtime errors for Background Remove use the shared set in Error Handling.
Related Guides
For detailed implementation guidance and best practices:
- Image Preprocessing Best Practices - Optimize your source images for background removal