remove_background_file
Remove the background from a local image file (.png, .jpg, .jpeg, .webp) and save the transparent cutout; large images stream through the remove.ac GPU API without temporary disk use.
Instructions
Remove the background from a local image file (.png, .jpg, .jpeg, .webp) via the stateless remove.ac Cloud GPU API (/v1.0/removebg). Files above 4 MB (up to 25 MB / 50 MP) automatically stream via zero-disk /v1.0/removebg/ticket.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"inputPath": "<inputPath>"
},
"name": "remove_background_file"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| crop | No | Trim empty transparent padding around the foreground subject. | |
| size | No | Output resolution tier. Defaults to 'full'. | |
| type | No | Optional foreground category hint. | |
| format | No | Output file format. Defaults to 'png'. | |
| bgColor | No | Optional solid background hex color (e.g. 'FFFFFF') instead of transparency. | |
| addShadow | No | Render a realistic drop or contact shadow under the cutout. | |
| inputPath | Yes | Path to the local source image file. | |
| overwrite | No | Allow overwriting an existing outputPath. Defaults to false. | |
| bgImageUrl | No | Optional public http(s) background image URL to composite behind the cutout. | |
| outputPath | No | Destination path for the cutout image. Defaults to '<stem>-nobg.<ext>' alongside inputPath. | |
| shadowType | No | Shadow preset when addShadow is enabled. | |
| bgImagePath | No | Optional local background image file path (.png, .jpg, .jpeg, .webp, up to 25 MB / 50 MP) to composite behind the cutout. | |
| bg_image_url | No | Alias for bgImageUrl: public http(s) background image URL. | |
| bg_image_path | No | Alias for bgImagePath: local background image file path (.png, .jpg, .jpeg, .webp, up to 25 MB / 50 MP). |