# Baking Pan Scaler API
> Baking-pan maths as an API, computed locally and deterministically — the area and scale-factor numbers a baker resizes a recipe between pans with. The trick everyone gets wrong is that a recipe scales by the pan’s AREA, not its diameter, so a 10-inch round holds far more batter than a 9-inch. The area endpoint gives the surface area of any pan — round and springform as π/4·d², square as s², rectangle as length × width, and bundt or tube pans as the ring (the outer circle minus the centre hole) — so a 9-inch round is 63.6 in², an 8-inch square 64 and a 9×13 is 117; add a depth and it returns the volume in cubic inches and cups. The convert endpoint gives the scale factor to move a recipe from one pan to another, factor = target area ÷ source area: a 9-inch round to a 9×13 is ×1.84, and two 8-inch rounds really do equal one 9×13. Pass an ingredient amount and it scales it for you, with a note to keep the batter depth similar and adjust the bake time. Everything is computed locally and deterministically, so it is instant and private. Ideal for baking, recipe, meal-prep and kitchen app developers, recipe-scaling and substitution tools, and culinary software. Pure local computation — no key, no third-party service, instant. Inches. Live, nothing stored. 2 compute endpoints. For ingredient unit conversion use a cooking 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/panscale-api/..."
```

## Pricing
- **Free** (Free) — 7,240 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 57,700 calls/Mo, 6 req/s
- **Pro** ($11/Mo) — 237,600 calls/Mo, 15 req/s
- **Mega** ($36/Mo) — 1,366,000 calls/Mo, 40 req/s

## Endpoints

### Pan

#### `GET /v1/area` — Pan area + volume

**Parameters:**
- `shape` (query, required, string) — round, square, rectangle, springform, bundt/tube Example: `round`
- `diameter` (query, optional, string) — Diameter (round/springform/bundt) Example: `9`
- `side` (query, optional, string) — Side (square)
- `length` (query, optional, string) — Length (rectangle)
- `width` (query, optional, string) — Width (rectangle)
- `hole_diameter` (query, optional, string) — Centre hole (bundt/tube)
- `depth` (query, optional, string) — Depth for volume

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/panscale-api/v1/area?shape=round&diameter=9"
```

#### `GET /v1/convert` — Recipe scale factor between pans

**Parameters:**
- `from_shape` (query, required, string) — Source pan shape Example: `round`
- `from_diameter` (query, optional, string) — Source diameter Example: `9`
- `from_side` (query, optional, string) — Source side
- `from_length` (query, optional, string) — Source length
- `from_width` (query, optional, string) — Source width
- `to_shape` (query, required, string) — Target pan shape Example: `rectangle`
- `to_diameter` (query, optional, string) — Target diameter
- `to_side` (query, optional, string) — Target side
- `to_length` (query, optional, string) — Target length Example: `13`
- `to_width` (query, optional, string) — Target width Example: `9`
- `amount` (query, optional, string) — An ingredient amount to scale

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/panscale-api/v1/convert?from_shape=round&from_diameter=9&to_shape=rectangle&to_length=13&to_width=9"
```

### Meta

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

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


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