Design
Apply masking effects to images using shapes, gradients, or custom masks for creative compositions
Call this tool from your code in three languages.
# 1) Upload each file first → returns { filePath }
curl -X POST 'https://api.elysiatools.com/upload/image-add-masking' \
-F 'file=@/path/to/imageFile.ext'
# 2) Call the tool with the returned filePath values
curl -X POST 'https://api.elysiatools.com/en/api/tools/image-add-masking' \
-F 'imageFile=/path/to/file.ext' \
-F 'maskType=shape' \
-F 'maskShape=circle' \
-F 'maskPosition=center' \
-F 'maskSize=80' \
-F 'featherRadius=0' \
-F 'invertMask=false' \
-F 'outputFormat=png' \
-F 'quality=90'Send a POST request with your inputs as JSON. File parameters require a separate upload first.
POST https://api.elysiatools.com/en/api/tools/image-add-masking| Name | Type | Required | Description |
|---|---|---|---|
| imageFile | fileupload required | Yes | Image to apply masking effect |
| maskType | select | No | Type of mask to apply |
| maskShape | select | No | Shape of the mask (when mask type is shape) |
| maskPosition | select | No | Position of the mask |
| maskSize | number | No |
Add this tool to your Model Context Protocol server so AI agents can list and call it.
Add this block to your MCP client configuration:
{
"mcpServers": {
"elysiatools-image-add-masking": {
"name": "image-add-masking",
"description": "Apply masking effects to images using shapes, gradients, or custom masks for creative compositions",
"baseUrl": "https://api.elysiatools.com/mcp/sse?toolId=image-add-masking",
"command": "",
"args": [],
"env": {},
"isActive": true,
"type": "sse"
}
}
}After connecting to the SSE endpoint, list the exposed tools:
{
"jsonrpc": "2.0",
"id": 1,
"method": "tools/list"
}Invoke the tool by its id, passing arguments built from its parameters:
{
"jsonrpc": "2.0",
"id": 2,
"method": "tools/call",
"params": {
"name": "image-add-masking",
"arguments": {
"imageFile": "https://example.com/file.ext",
"maskType": "shape",
"maskShape": "circle",
"maskPosition": "center",
"maskSize": 80,
"featherRadius": 0,
"invertMask": false,
"outputFormat": "png",
"quality": 90
}
}
}| Size of the mask as percentage of image dimensions |
| featherRadius | number | No | Soft edge radius for the mask (0 for hard edges) |
| invertMask | checkbox | No | Invert the mask effect (hide masked area instead of showing it) |
| outputFormat | select | No | Output format for the result image |
| quality | number | No | Output quality for lossy formats |
File result
{
"filePath": "/public/processing/randomid.ext",
"fileName": "output.ext",
"contentType": "application/octet-stream",
"size": 1024,
"metadata": {
"key": "value"
},
"error": "Error message (optional)",
"message": "Notification message (optional)"
}Questions or issues? Contact [email protected]