# Photography Exposure API
> Photographic exposure maths as an API, computed locally and deterministically — the exposure-value, equivalent-exposure and Sunny-16 numbers a photographer, camera-app developer or educator works the exposure triangle with. The exposure-value endpoint gives EV = log₂(aperture² ÷ shutter) and the ISO-100-normalised EV100 (subtracting log₂(ISO/100)) — every one-EV step is a stop, a doubling or halving of light — so bright sun reads about EV 15 and a typical interior EV 6–8, and equal-EV settings give the same exposure. The equivalent endpoint applies the reciprocity at the heart of the triangle: exposure ∝ shutter × ISO ÷ f-number², so when you close the aperture or drop the ISO it returns the new shutter that keeps the brightness constant — going from f/2.8 to f/5.6 needs four times the shutter time. The sunny16 endpoint gives the classic meterless rule: in bright sun shoot f/16 at about 1/ISO (1/125 s at ISO 100), opening up in stops for softer light — slight overcast f/11, overcast f/8, heavy overcast f/5.6, open shade f/4, and f/22 on snow or sand — solving the shutter for your chosen ISO and aperture. Everything is computed locally and deterministically, so it is instant and private. Ideal for camera and photography apps, exposure-calculator and teaching tools, and metering and automation utilities. Pure local computation — no key, no third-party service, instant. 3 compute endpoints. For depth of field and hyperfocal distance use a photography (optics) API.

## Authentication
All requests require your oanor API key in the `x-oanor-key` header. Get one at https://www.oanor.com/developer/keys.

```bash
curl -H "x-oanor-key: oanor_live_…" "https://api.oanor.com/exposure-api/..."
```

## Pricing
- **Free** (Free) — 8,800 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 86,000 calls/Mo, 6 req/s
- **Pro** ($27/Mo) — 352,000 calls/Mo, 15 req/s
- **Mega** ($83/Mo) — 1,620,000 calls/Mo, 40 req/s

## Endpoints

### Exposure

#### `GET /v1/equivalent` — Equivalent-exposure shutter

**Parameters:**
- `aperture` (query, required, string) — Base aperture (f-number) Example: `2.8`
- `shutter_s` (query, required, string) — Base shutter (seconds) Example: `0.01`
- `iso` (query, optional, string) — Base ISO (default 100) Example: `100`
- `new_aperture` (query, required, string) — New aperture (f-number) Example: `5.6`
- `new_iso` (query, optional, string) — New ISO (default = base) Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/exposure-api/v1/equivalent?aperture=2.8&shutter_s=0.01&iso=100&new_aperture=5.6&new_iso=100"
```

#### `GET /v1/exposure-value` — EV and EV100

**Parameters:**
- `aperture` (query, required, string) — Aperture (f-number) Example: `16`
- `shutter_s` (query, required, string) — Shutter time (seconds) Example: `0.01`
- `iso` (query, optional, string) — ISO (default 100) Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/exposure-api/v1/exposure-value?aperture=16&shutter_s=0.01&iso=100"
```

#### `GET /v1/sunny16` — Sunny-16 settings

**Parameters:**
- `iso` (query, optional, string) — ISO (default 100) Example: `100`
- `aperture` (query, optional, string) — Aperture (f-number, default 16) Example: `16`
- `condition` (query, optional, string) — snow_sand|sunny|slight_overcast|overcast|heavy_overcast|open_shade Example: `sunny`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/exposure-api/v1/sunny16?iso=100&aperture=16&condition=sunny"
```

### Meta

#### `GET /v1/meta` — Spec

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/exposure-api/v1/meta"
```


---
Marketplace page: https://www.oanor.com/api/exposure-api
OpenAPI spec: https://www.oanor.com/api/exposure-api/openapi.json
