API & MCP
Everything a person can do on Photo Crop & Resize Planner, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://luminaresizeplanner.usefulweb.site/api/v1/calculate– run Photo Crop & Resize PlannerGET https://luminaresizeplanner.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Photo Crop & Resize Planner
Calculate a centered crop, final pixel dimensions and scale for a target box. Fit keeps the whole image; fill crops to the requested aspect ratio. Upscaling is optional.
| Field | Type | Default | Description |
|---|---|---|---|
width | integer | 6000 | Source width (px) |
height | integer | 4000 | Source height (px) |
targetWidth | integer | 1080 | Target width (px) |
targetHeight | integer | 1080 | Target height (px) |
mode | select (contain, cover) | "cover" | Fit mode |
upscale | boolean | false | Allow enlargement |
Example request
Square social photo
curl -X POST https://luminaresizeplanner.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"width":6000,"height":4000,"targetWidth":1080,"targetHeight":1080,"mode":"cover","upscale":false}'
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://luminaresizeplanner.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
lumina_resize_planner - Local stdio connector:
node src/mcp-stdio.ts --tool=lumina-resize-planner
{
"mcpServers": {
"lumina-resize-planner": { "type": "http", "url": "https://luminaresizeplanner.usefulweb.site/mcp" }
}
}