create_mask
Generates a black-and-white subject mask for an image, marking the subject in white and the background in black. Use it to isolate subjects for background removal, replacement, or compositing.
Instructions
Create a black-and-white subject mask (white = subject, black = background) for an image.
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_path": "<image_path>"
},
"name": "create_mask"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| model | No | Segmentation model. 'falcon' is the default and works well for most images. | falcon |
| image_path | Yes | Path to a local JPG, PNG, WEBP, BMP or GIF image (1 KB to 10 MB). | |
| output_path | No | Where to save the result. Defaults to '<name>_<operation>.<ext>' next to the input image. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| result | Yes |