API & MCP
Everything a person can do on Depth of Field, Field of View & Exposure Calculator, a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://luminadepthoffield.usefulweb.site/api/v1/calculate– run Depth of Field, Field of View & Exposure CalculatorGET https://luminadepthoffield.usefulweb.site/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Depth of Field, Field of View & Exposure Calculator
Enter the sensor, focal length, aperture and focus distance to get the near and far limits of acceptable sharpness, the total depth of field and the hyperfocal distance, with the circle of confusion taken from the sensor size, from a print and viewing distance or from your own value. The same input gives the horizontal, vertical and diagonal angle of view, the scene width covered, the full-frame equivalent focal length and aperture, the magnification, the exposure value, ND filter conversions (stops, optical density, filter factor) and the 500 and NPF rules for sharp stars. Part of the Lumina photo studio.
| Field | Type | Default | Description |
|---|---|---|---|
sensor | select (medium-format, full-frame, aps-c, aps-c-canon, mft, one-inch, type-1-1.3, type-1-1.7, type-1-2.3, type-1-3, custom) | "full-frame" | Sensor size. Typical dimensions from the manufacturers; “inch” types are a historical naming, not a measurement. |
sensorWidth | number | — | Custom sensor width. Only with “Custom size”. |
sensorHeight | number | — | Custom sensor height. Only with “Custom size”. |
focalLength (required) | number | 50 | Focal length. The real focal length printed on the lens (not the 35 mm equivalent). |
fNumber (required) | number | 8 | Aperture (f-number) |
focusDistance (required) | number | 3 | Focus distance. Distance from the lens to the subject in focus. |
cocMode | select (standard, print, custom) | "standard" | Sharpness criterion |
cocDivisor | integer | 1500 | Diagonal divisor. Classic standard only: 1500 gives 0.029 mm on full frame; Zeiss uses 1730, stricter users 3000. |
printWidth | number | 25.4 | Print width |
printHeight | number | 20.3 | Print height |
viewingDistance | number | 25 | Viewing distance |
acuity | number | 5 | Visual acuity at 25 cm. 5 line pairs per millimetre at 25 cm is the usual assumption for normal eyesight. |
cocCustom | number | — | Circle of confusion. Only with “My own circle of confusion”. |
imageWidthPx | integer | — | Image width. Optional: long side of the full-resolution photo in pixels, for the pixel pitch (NPF rule). |
shutter | text | — | Shutter time. For the exposure value and the ND filter: 1/125, 0.5 or 30 (seconds). Leave empty to skip that part. |
iso | number | 100 | ISO |
ndValue | number | 0 | ND filter strength |
ndUnit | select (stops, density, factor) | "stops" | ND filter given as |
declination | number | 0 | Star declination. For the full NPF rule: 0° at the celestial equator (fastest trails), near ±90° at the celestial poles. |
Example request
50 mm at f/8 on full frame, focused at 3 m
curl -X POST https://luminadepthoffield.usefulweb.site/api/v1/calculate -H 'content-type: application/json' -d '{"sensor":"full-frame","focalLength":50,"fNumber":8,"focusDistance":3,"shutter":"1/125","iso":100}'
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://luminadepthoffield.usefulweb.site/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
lumina_depth_of_field - Local stdio connector:
node src/mcp-stdio.ts --tool=lumina-depth-of-field
{
"mcpServers": {
"lumina-depth-of-field": { "type": "http", "url": "https://luminadepthoffield.usefulweb.site/mcp" }
}
}