remove_background
Cut out a photo with Wavegrain's MCP server: the remove_background tool needs the generate permission. Inputs, outputs and an example call.
Cut out a photo. Permission: generate. Changes saved work.
Cut out a photo's background as a new image; the photo stays. Answers its imageId for an image slot. Costs 1 credit; state the cost first.
Inputs
| Input | Type | Required | Notes |
|---|---|---|---|
image | object | yes | Exactly one image source. |
maxCredits | integer | yes | Most credits this call may spend; refused, spending nothing, if it could cost more. 0 to 1000 |
The fields inside an object or a list are in the JSON Schema at /developers/mcp-tools.json.
Returns
| Field | Type | Notes |
|---|---|---|
imageId | string | The new image's id. |
image | object | The image object: put it in a slide's image slot as is. |
width | number | Width in pixels. |
height | number | Height in pixels. |
creditsCharged | number | Credits this call spent. |
Example call
Send it to POST https://wavegrain.com/api/mcp with an access key that has the generate permission; Authentication shows how to make one.
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/call",
"params": {
"name": "remove_background",
"arguments": {
"image": {
"candidate": "<candidate>"
},
"maxCredits": 1
}
}
}
The call shows only the required inputs, with placeholder values: put your own in.
Related tools
copy_post: Copy a postcreate_tailored_slideshow: Make a tailored slideshowgenerate_image: Make an AI imagegenerate_slideshow: Make a slideshowcreate_brand_from_website: Make a brand from a websiteresume_automation: Resume an automation- All 79 tools
Something wrong or missing? Write to support@wavegrain.com.