API & MCP
Everything a person can do on Pocketlab Light & Exposure Converter (lux ↔ EV ↔ shutter), a program or AI agent can do with the same inputs and get the identical result.
HTTP API
POST https://pocketlablightexposure.usefulweb.app/api/v1/calculate– run Pocketlab Light & Exposure Converter (lux ↔ EV ↔ shutter)GET https://pocketlablightexposure.usefulweb.app/api/v1/tool– inputs, output schema, examples- OpenAPI 3.1: /openapi.json · /openapi.yaml
- Errors:
application/problem+json;422includes per-fielderrors.
Pocketlab Light & Exposure Converter (lux ↔ EV ↔ shutter)
Converts an illuminance in lux into the photographic exposure value (EV at ISO 100) and back, or works out the EV of camera settings, with a table of shutter speeds for common apertures and an everyday comparison. It is the arithmetic behind the Pocketlab light meter, which estimates lux from the phone camera or a light sensor.
| Field | Type | Default | Description |
|---|---|---|---|
mode | select (lux, ev, camera) | "lux" | I have |
lux | number | 500 | Illuminance |
ev | number | 10 | Exposure value |
fNumber | number | 2.8 | f-number. Camera mode: the aperture used. The shutter table always uses ISO below. |
shutter | number | 0.008 | Exposure time. Camera mode: e.g. 0.008 for 1/125 s. |
iso | number | 100 | ISO |
Example request
Office desk at 500 lx
curl -X POST https://pocketlablightexposure.usefulweb.app/api/v1/calculate -H 'content-type: application/json' -d '{"mode":"lux","lux":500,"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://pocketlablightexposure.usefulweb.app/mcp– protocol revisions 2026-07-28 (stateless) and 2025-11-25 / 2025-06-18 / 2025-03-26 (initialize handshake). - Tools:
pocketlab_light_exposure - Local stdio connector:
node src/mcp-stdio.ts --tool=pocketlab-light-exposure
{
"mcpServers": {
"pocketlab-light-exposure": { "type": "http", "url": "https://pocketlablightexposure.usefulweb.app/mcp" }
}
}