# 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.

> Index of these docs: https://wavegrain.com/developers/llms.txt

**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](/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](/developers/authentication) shows how to make one.

```json
{
  "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`](/developers/mcp-tools/copy_post): Copy a post
- [`create_tailored_slideshow`](/developers/mcp-tools/create_tailored_slideshow): Make a tailored slideshow
- [`generate_image`](/developers/mcp-tools/generate_image): Make an AI image
- [`generate_slideshow`](/developers/mcp-tools/generate_slideshow): Make a slideshow
- [`create_brand_from_website`](/developers/mcp-tools/create_brand_from_website): Make a brand from a website
- [`resume_automation`](/developers/mcp-tools/resume_automation): Resume an automation
- [All 79 tools](/developers/mcp-tools)
