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

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.

Inputs of Layer Transform & Bounds Planner
FieldTypeDefaultDescription
canvasWidthinteger1000Canvas width (px)
canvasHeightinteger700Canvas height (px)
widthinteger600Layer width (px)
heightinteger400Layer height (px)
xnumber500Layer center X (px)
ynumber350Layer center Y (px)
rotationnumber20Rotation (degrees)
flipXbooleanfalseFlip horizontally
flipYbooleanfalseFlip 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)

{
  "mcpServers": {
    "lumina-layer-transform": { "type": "http", "url": "https://luminalayertransform.usefulweb.site/mcp" }
  }
}