# Chimney & Flue API
> Chimney and flue sizing maths as an API, computed locally and deterministically — the draft and dimension numbers a stove installer, sweep or builder runs so a fire pulls cleanly and safely. The flue-size endpoint gives the minimum flue cross-section for a fireplace opening: at least a tenth of the opening area for a square or rectangular liner, a twelfth for a round one (which draws better) — a 36 × 30 inch opening needs about 108 square inches of rectangular flue, or a 10.7-inch round. The draft endpoint gives the theoretical draft from the stack effect, ΔP ≈ 3465 × height × (1/T_outside − 1/T_flue) with temperatures in kelvin, so a 6-metre chimney with 200 °C flue gas on a freezing day pulls about 32 pascals (0.13 inches of water column) — taller and hotter draws harder. The height endpoint applies the 3-2-10 rule: a chimney must finish at least 3 feet above where it pierces the roof and at least 2 feet above anything within 10 feet, whichever is higher. Everything is computed locally and deterministically, so it is instant and private. Ideal for hearth and stove-installer apps, chimney-sweep and inspection tools, building-design calculators, and DIY-safety sites. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. Educational estimates — verify against your appliance listing and adopted code.

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

## Pricing
- **Free** (Free) — 420 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 11,000 calls/Mo, 6 req/s
- **Pro** ($17/Mo) — 72,000 calls/Mo, 15 req/s
- **Mega** ($52/Mo) — 245,000 calls/Mo, 36 req/s

## Endpoints

### Chimney

#### `GET /v1/draft` — Theoretical stack-effect draft

**Parameters:**
- `height_m` (query, required, string) — Chimney height in metres Example: `6`
- `flue_temp_c` (query, required, string) — Flue gas temperature °C Example: `200`
- `outside_temp_c` (query, required, string) — Outside air temperature °C Example: `0`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/chimney-api/v1/draft?height_m=6&flue_temp_c=200&outside_temp_c=0"
```

**Response:**
```json
{
    "data": {
        "note": "Theoretical draft ≈ 3465 × height × (1/T_outside − 1/T_flue), with temperatures in kelvin — taller chimneys and hotter flue gas pull harder, and a cold outside boosts it. Real draft is lower after friction and bends. Most appliances want roughly 10–30 Pa (0.04–0.12 in w.c.); too much draft wastes heat up the flue.",
        "inputs": {
            "height_m": 6,
            "flue_temp_c": 200,
            "outside_temp_c": 0
        },
        "draft_pa": 32.2,
        "draft_in_wc": 0.1292
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:41.880Z",
        "request_id": "21f1b41c-e3b4-4c79-9b3e-74dd185615e4"
    },
    "status": "ok",
    "message": "Draft",
    "success": true
}
```

#### `GET /v1/flue-size` — Minimum flue size for an opening

**Parameters:**
- `opening_width_in` (query, required, string) — Fireplace opening width in inches Example: `36`
- `opening_height_in` (query, required, string) — Fireplace opening height in inches Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/chimney-api/v1/flue-size?opening_width_in=36&opening_height_in=30"
```

**Response:**
```json
{
    "data": {
        "note": "A fireplace flue should be at least 1/10 of the fireplace opening area for a rectangular/square liner, or 1/12 for a round one (round draws better). Too small and smoke spills into the room; far too large and the flue gases cool and the draft stalls. Match a stove's flue to its collar, not the room.",
        "inputs": {
            "opening_width_in": 36,
            "opening_height_in": 30
        },
        "opening_area_sqin": 1080,
        "min_rect_flue_area_sqin": 108,
        "min_round_flue_area_sqin": 90,
        "min_round_flue_diameter_in": 10.7
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:41.957Z",
        "request_id": "73bffebd-741f-49b8-8e7e-c51652fd788b"
    },
    "status": "ok",
    "message": "Flue size",
    "success": true
}
```

#### `GET /v1/height` — 3-2-10 minimum height

**Parameters:**
- `penetration_height_ft` (query, required, string) — Roof-penetration elevation in feet Example: `20`
- `tallest_within_10ft_ft` (query, optional, string) — Tallest roof/structure within 10 ft (default 0) Example: `24`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/chimney-api/v1/height?penetration_height_ft=20&tallest_within_10ft_ft=24"
```

**Response:**
```json
{
    "data": {
        "note": "The 3-2-10 rule: a chimney must terminate at least 3 ft above where it passes through the roof AND at least 2 ft above any roofline or structure within 10 ft horizontally — whichever is higher governs. A short chimney near a tall ridge drafts poorly and backs up; when in doubt, go taller.",
        "inputs": {
            "penetration_height_ft": 20,
            "tallest_within_10ft_ft": 24
        },
        "governing_rule": "2 ft above obstruction within 10 ft",
        "required_top_elevation_ft": 26,
        "min_height_above_penetration_ft": 6
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:42.029Z",
        "request_id": "b54e6d17-a1a4-48cb-9f09-4219ecb34109"
    },
    "status": "ok",
    "message": "Height rule",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Flue ≥ 1/10 of opening (1/12 round); draft = 3465·h·(1/To−1/Ti) in kelvin; 3-2-10 height rule. Educational estimates — verify against your fuel/appliance listing and adopted code.",
        "service": "chimney-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/draft": "Theoretical draft (Pa and in w.c.) from height and temperatures.",
            "GET /v1/height": "Minimum chimney top height by the 3-2-10 rule.",
            "GET /v1/flue-size": "Minimum flue cross-section for a fireplace opening (1/10 or 1/12)."
        },
        "description": "Chimney & flue maths: minimum flue size for a fireplace opening, theoretical stack-effect draft, and the 3-2-10 minimum-height rule."
    },
    "meta": {
        "timestamp": "2026-06-06T15:30:42.112Z",
        "request_id": "c010f374-79fc-412b-b976-3e02a47c91bd"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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