Remove Image Background
remove_image_backgroundRemove or replace an image background with transparency, a solid color, or a custom image to isolate subjects or prepare product photos.
Instructions
This tool will remove or replace the background of an image, returning a transparent, solid-color, or custom-image background. It spends 1 credit. It takes the following arguments: - media_file or image_url (one required): The image to process, either an uploaded file or a public URL. - output_transparent (bool, optional): Make the background transparent. Defaults to true unless a color or image background is given. - background_color (str, optional): Hex color to fill the background with. - background_image_url (str, optional): Public URL of an image to use as the new background.
Tool call template
This tool declares no required parameters. Add optional parameters from the input schema as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {},
"name": "remove_image_background"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| image_url | No | Public URL of the image to process. Use this or media_file. | |
| media_file | No | Base64-encoded image or image data URI. Use this or image_url. | |
| background_color | No | Hex color (e.g. '#00ff00') to fill the background with instead of transparency. | |
| output_transparent | No | If true, the removed background becomes transparent. Defaults to true unless background_color or background_image_url is given. | |
| background_image_url | No | Public URL of an image to use as the new background. Takes precedence over background_color. |