# Home Canning API
> Home-canning maths as an API, computed locally and deterministically — the altitude adjustments that keep a batch of preserves safe, the numbers a canner, homesteader or recipe app processes a jar by. Because water boils cooler the higher you are, every tested sea-level recipe has to run longer or hotter, and this API does that arithmetic. The waterbath endpoint applies the USDA boiling-water-bath and steam-canner rule: for a base process of 20 minutes or less add 5, 10, 15 or 20 minutes by altitude band, and for more than 20 minutes add 10, 20, 30 or 40 — so a 15-minute pickle recipe at 4,000 feet processes 25 minutes, and a 30-minute one runs 50. The pressure endpoint adjusts the canner: a dial gauge gains 1 psi per 2,000 feet, turning an 11 psi recipe into 12, 13, 14 or 15, while a weighted gauge simply steps from 10 psi up to 1,000 feet to 15 above it, since it only has 5/10/15 settings. The boilingpoint endpoint gives the underlying reason — water boils about 1.84 °F lower per 1,000 feet, so 5,000 feet boils at 202.8 °F instead of 212. Everything is computed locally and deterministically, so it is instant and private. Ideal for canning, food-preservation, homesteading, recipe and kitchen app developers, preserving-calculator and pantry tools, and cooking-class software. Pure local computation — no key, no third-party service, instant. USDA tables — always follow a tested recipe. Live, nothing stored. 3 compute endpoints.

## 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/canning-api/..."
```

## Pricing
- **Free** (Free) — 7,150 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 58,500 calls/Mo, 6 req/s
- **Pro** ($11/Mo) — 237,000 calls/Mo, 15 req/s
- **Mega** ($36/Mo) — 1,358,000 calls/Mo, 40 req/s

## Endpoints

### Canning

#### `GET /v1/boilingpoint` — Boiling point at altitude

**Parameters:**
- `altitude` (query, required, string) — Altitude Example: `5000`
- `unit` (query, optional, string) — ft or m Example: `ft`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/canning-api/v1/boilingpoint?altitude=5000&unit=ft"
```

**Response:**
```json
{
    "data": {
        "note": "Water boils about 1.84 °F (1 °C per ~290 m) lower per 1,000 ft of altitude, so boiling-water canning is cooler and must run longer — and pressure canning is required for low-acid foods to reach a safe temperature.",
        "inputs": {
            "unit": "ft",
            "altitude_ft": 5000
        },
        "boiling_point_c": 94.9,
        "boiling_point_f": 202.8
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:02.960Z",
        "request_id": "c79d6776-5df6-4769-a519-6e92c32a27c8"
    },
    "status": "ok",
    "message": "Boiling point",
    "success": true
}
```

#### `GET /v1/pressure` — Altitude canner pressure

**Parameters:**
- `altitude` (query, required, string) — Altitude Example: `5000`
- `gauge` (query, optional, string) — dial or weighted (default dial) Example: `dial`
- `sea_level_psi` (query, optional, string) — Recipe sea-level psi (dial default 11) Example: `11`
- `unit` (query, optional, string) — ft or m Example: `ft`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/canning-api/v1/pressure?altitude=5000&gauge=dial&sea_level_psi=11&unit=ft"
```

**Response:**
```json
{
    "data": {
        "note": "Pressure-canner adjustment. Dial gauge: add 1 psi per 2,000 ft above 2,000 (so an 11 psi recipe becomes 12/13/14/15). Weighted gauge: 10 psi up to 1,000 ft, otherwise 15 psi (it only has 5/10/15 settings). Always process at or above the recommended pressure.",
        "inputs": {
            "unit": "ft",
            "gauge": "dial",
            "altitude_ft": 5000
        },
        "altitude_band": "4,001–6,000 ft",
        "recommended_psi": 13
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:03.066Z",
        "request_id": "f92a0af4-ba79-4811-8408-e86f53878d03"
    },
    "status": "ok",
    "message": "Canner pressure",
    "success": true
}
```

#### `GET /v1/waterbath` — Altitude water-bath time

**Parameters:**
- `base_minutes` (query, required, string) — Sea-level process time (min) Example: `15`
- `altitude` (query, required, string) — Altitude Example: `4000`
- `unit` (query, optional, string) — ft or m (default ft) Example: `ft`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/canning-api/v1/waterbath?base_minutes=15&altitude=4000&unit=ft"
```

**Response:**
```json
{
    "data": {
        "note": "USDA boiling-water-bath / steam adjustment. For a base process of 20 minutes or less add 5/10/15/20 min by altitude band; for more than 20 minutes add 10/20/30/40. Water boils cooler with altitude, so it must process longer.",
        "inputs": {
            "unit": "ft",
            "altitude_ft": 4000,
            "base_minutes": 15
        },
        "added_minutes": 10,
        "altitude_band": "3,001–6,000 ft",
        "total_minutes": 25
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:03.176Z",
        "request_id": "ab004300-df17-4d17-9684-b7f39c1aa819"
    },
    "status": "ok",
    "message": "Water-bath time",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Altitude in feet or metres. Water-bath adds 5–20 min (≤20 min base) or 10–40 (>20 min) by band; dial pressure +1 psi per 2,000 ft; weighted 10/15 psi. Food-safety guidance from USDA tables — always follow a tested recipe.",
        "service": "canning-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/pressure": "Altitude-adjusted pressure for a dial or weighted gauge canner.",
            "GET /v1/waterbath": "Altitude-adjusted boiling-water-bath / steam processing time.",
            "GET /v1/boilingpoint": "Boiling point of water at a given altitude."
        },
        "description": "Home-canning maths: USDA altitude adjustments for boiling-water-bath processing time and pressure-canner pressure, plus water's boiling point at altitude."
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:03.274Z",
        "request_id": "d579844c-3fee-40a8-a2c6-35c02ca0bbb2"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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