Background Removal
bg-removeRemove the background from any image, at the image's own size or a smaller one you choose. Returns a transparent PNG. Returns the cut-out as base64 and as a hosted URL, with its format, width and height: a PNG with a transparent background, or WebP (transparent) or JPG (set on white) when you ask for them. Use to isolate the subject of an existing image. To create a new image use images. Cost: 2 credits, charged only when a call succeeds.
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": {
"image_url": "<image_url>"
},
"name": "bg-remove"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| size | No | Size of the cut-out: auto is the image's own (up to 25 megapixels), small at most 0.25 megapixels, hd at most 4. Never larger than the image. | auto |
| format | No | Image format of the cut-out. | png |
| image_url | Yes | Public URL of the image (JPEG, PNG or WebP, up to 22 MB). |