Method signature
Parameters
The image data in base64-encoded string format. You need to encode your image file to base64 before passing it to this method
Returns
The processed image data with background removed in bytes format, decoded from base64data. The output image will have a transparent background. You can save this to a file or process it further
Example
Notes
- The image_data parameter must be a base64-encoded string
- The method returns processed image data in bytes format, which is automatically decoded from the base64data response
- The output image will have a transparent background, making it suitable for compositing
- Works best with images that have clear foreground subjects (people, objects, products)
- Supported image formats include JPEG, PNG, and other common image formats
- Make sure to encode your image file to base64 before passing it to this method
- Save the output as PNG to preserve transparency