API & MCP
Everything a person can do on Image Shape Mask & Feather, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://luminaimagemask.usefulweb.site/api/v1/calculate– run Image Shape Mask & FeatherGET https://luminaimagemask.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Image Shape Mask & Feather
Upload a photo and apply a rectangular or elliptical alpha mask with adjustable bounds, inward feathering and inversion. Download a transparent PNG while preserving the original image dimensions.
| Field | Type | Default | Description |
|---|---|---|---|
image (required) | file | — | Photo (PNG, JPEG, WebP or GIF) |
shape | select (ellipse, rect) | "ellipse" | Mask shape |
x | number | 0 | Mask left (%) |
y | number | 0 | Mask top (%) |
width | number | 100 | Mask width (%) |
height | number | 100 | Mask height (%) |
feather | number | 0 | Inward feather (normalized %) |
invert | boolean | false | Invert mask |
Example request
A circular transparent cutout
curl -X POST https://luminaimagemask.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"image":{"filename":"sample.png","contentType":"image/png","contentBase64":"iVBORw0KGgoAAAANSUhEUgAAACAAAAAgAQMAAABJtOi3AAAABlBMVEX/////AADrWueTAAAAEklEQVQI12NgIBb8/09dgjgAAPcnH+GApkH4AAAAAElFTkSuQmCC"},"shape":"ellipse","feather":3}'
Every result contains
inputs (normalised, defaults applied), summary, result (validated against the published schema), units, assumptions, sources, warnings, computedAt and links.
MCP (Model Context Protocol)
- Streamable HTTP endpoint:
https://luminaimagemask.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
lumina_image_mask - Local stdio connector:
node src/mcp-stdio.ts --tool=lumina-image-mask
{
"mcpServers": {
"lumina-image-mask": { "type": "http", "url": "https://luminaimagemask.usefulweb.site/mcp" }
}
}