API & MCP
Everything a person can do on Layer Transform & Bounds Planner, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://luminalayertransform.usefulweb.site/api/v1/calculate– run Layer Transform & Bounds PlannerGET https://luminalayertransform.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Layer Transform & Bounds Planner
Enter canvas and layer dimensions, center position, rotation and flips. Get the affine matrix for normalized layer coordinates plus exact corner and bounding-box coordinates.
| Field | Type | Default | Description |
|---|---|---|---|
canvasWidth | integer | 1000 | Canvas width (px) |
canvasHeight | integer | 700 | Canvas height (px) |
width | integer | 600 | Layer width (px) |
height | integer | 400 | Layer height (px) |
x | number | 500 | Layer center X (px) |
y | number | 350 | Layer center Y (px) |
rotation | number | 20 | Rotation (degrees) |
flipX | boolean | false | Flip horizontally |
flipY | boolean | false | Flip vertically |
Example request
A rotated photo on a cover
curl -X POST https://luminalayertransform.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"canvasWidth":1000,"canvasHeight":700,"width":600,"height":400,"x":500,"y":350,"rotation":20}'
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://luminalayertransform.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
lumina_layer_transform - Local stdio connector:
node src/mcp-stdio.ts --tool=lumina-layer-transform
{
"mcpServers": {
"lumina-layer-transform": { "type": "http", "url": "https://luminalayertransform.usefulweb.site/mcp" }
}
}