API & MCP
Everything a person can do on Focus Stacking (Combine Photos Focused at Different Distances), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://luminafocusstack.usefulweb.app/api/v1/calculate– run Focus Stacking (Combine Photos Focused at Different Distances)GET https://luminafocusstack.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Focus Stacking (Combine Photos Focused at Different Distances)
Upload a ZIP of 2–5 photos of the same subject taken at different focus distances, for macro, product or landscape shots. The photos are aligned (including the small size change from refocusing), a sharpness map picks the sharpest photo for every area, and a Laplacian pyramid blends the seams. Download the result and a colour map that shows which photo each area came from. Photo Lab in Lumina runs the same engine on your device.
| Field | Type | Default | Description |
|---|---|---|---|
images (required) | file | — | ZIP of 2–5 photos (PNG, JPEG or WebP; 12 megapixels together). All photos must have the same size. ZIP order is kept; the middle photo is the alignment reference. |
align | boolean | true | Align the photos (shift, rotation and scale) |
crop | boolean | true | Crop to the area every photo covers |
model | select (similarity, affine) | "similarity" | Alignment transform |
radius | integer | 4 | Sharpness window radius (pixels). Larger windows give calmer seams on noisy photos; smaller windows follow fine edges. |
blend | select (select, weighted) | "select" | Blend |
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://luminafocusstack.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
lumina_focus_stack - Local stdio connector:
node src/mcp-stdio.ts --tool=lumina-focus-stack
{
"mcpServers": {
"lumina-focus-stack": { "type": "http", "url": "https://luminafocusstack.usefulweb.app/mcp" }
}
}