# Telescope Optics API
> Telescope optics maths as an API, computed locally and deterministically — the magnification, exit-pupil and resolving-power numbers an amateur astronomer or stargazing-app developer picks gear and eyepieces with. The magnification endpoint gives magnification = the telescope's focal length ÷ the eyepiece focal length (a 1000 mm scope with a 10 mm eyepiece is 100×), the focal ratio, and — from the aperture — the useful range from about the aperture in mm ÷ 7 (lowest useful, a 7 mm exit pupil) up to roughly 2× the aperture in mm, beyond which the image only dims and blurs; pass an eyepiece apparent field and it returns the true field of view. The exit-pupil endpoint gives aperture ÷ magnification, the width of the light beam leaving the eyepiece — a big 4–7 mm exit pupil for bright wide views of nebulae, a small 0.5–2 mm for the Moon and planets at high power. The resolution endpoint gives the Dawes limit ≈ 116 ÷ aperture(mm) and the slightly stricter Rayleigh limit ≈ 138 ÷ aperture in arcseconds, plus the limiting magnitude ≈ 2.7 + 5·log₁₀(aperture mm) — bigger glass splits finer doubles and reaches fainter stars, though seeing usually caps real resolution near 1 arcsecond. Everything is computed locally and deterministically, so it is instant and private. Ideal for astronomy and stargazing apps, telescope-shop and eyepiece-calculator tools, and observing-planner utilities. Pure local computation — no key, no third-party service, instant. 3 compute endpoints. For camera/thin-lens imaging use a lens API; for stellar magnitudes a star-magnitude 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/telescope-api/..."
```

## Pricing
- **Free** (Free) — 9,200 calls/Mo, 2 req/s
- **Starter** ($7/Mo) — 90,000 calls/Mo, 6 req/s
- **Pro** ($26/Mo) — 366,000 calls/Mo, 15 req/s
- **Mega** ($79/Mo) — 1,680,000 calls/Mo, 40 req/s

## Endpoints

### Telescope

#### `GET /v1/exit-pupil` — Exit pupil

**Parameters:**
- `aperture_mm` (query, required, string) — Aperture (mm) Example: `200`
- `magnification` (query, required, string) — Magnification Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/telescope-api/v1/exit-pupil?aperture_mm=200&magnification=100"
```

#### `GET /v1/magnification` — Magnification and useful range

**Parameters:**
- `scope_focal_length_mm` (query, required, string) — Telescope focal length (mm) Example: `1000`
- `eyepiece_focal_length_mm` (query, required, string) — Eyepiece focal length (mm) Example: `10`
- `aperture_mm` (query, optional, string) — Aperture (mm) for useful range & f-ratio Example: `200`
- `apparent_fov_deg` (query, optional, string) — Eyepiece apparent field (deg) for true FOV Example: `52`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/telescope-api/v1/magnification?scope_focal_length_mm=1000&eyepiece_focal_length_mm=10&aperture_mm=200&apparent_fov_deg=52"
```

#### `GET /v1/resolution` — Resolving power and limiting magnitude

**Parameters:**
- `aperture_mm` (query, required, string) — Aperture (mm) Example: `200`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/telescope-api/v1/resolution?aperture_mm=200"
```

### Meta

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

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


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