# Air Compressor API
> Compressed-air maths as an API, computed locally and deterministically — the receiver, pump-up and SCFM numbers a pneumatics tech or shop owner sizes a system with. The receiver-size endpoint gives the tank you need to ride out a demand burst: volume = demand (free-air CFM) × minutes × 14.7 ÷ the usable pressure window (max − min) — pulling 20 CFM for a minute over a 175-to-100 psi window wants about a 30-gallon receiver, the buffer that lets the pump catch up. The pumpup endpoint gives the time to raise a receiver from one pressure to another: volume × pressure rise ÷ (14.7 × compressor CFM), so a 60-gallon tank from 100 to 175 psi on a 15 CFM compressor takes about 2.7 minutes. The scfm endpoint corrects actual CFM to standard CFM for the inlet conditions — SCFM = ACFM × (inlet pressure ÷ 14.696) × (528 ÷ inlet temperature in Rankine) — so a compressor at 5,000 feet delivers about 17 % fewer SCFM than at sea level, the reason you size tools on SCFM, not the nameplate. Everything is computed locally and deterministically, so it is instant and private. Ideal for pneumatics and shop-air apps, compressor-sizing and tool-demand tools, industrial-air calculators, and trade aids. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. Estimates — duty cycle and the pump curve shift real numbers.

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

## Pricing
- **Free** (Free) — 460 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 12,400 calls/Mo, 6 req/s
- **Pro** ($18/Mo) — 79,000 calls/Mo, 15 req/s
- **Mega** ($54/Mo) — 256,000 calls/Mo, 36 req/s

## Endpoints

### Compressor

#### `GET /v1/pumpup` — Pump-up time

**Parameters:**
- `receiver_gallons` (query, required, string) — Receiver size in gallons Example: `60`
- `start_pressure_psi` (query, required, string) — Start pressure psi Example: `100`
- `end_pressure_psi` (query, required, string) — End pressure psi Example: `175`
- `compressor_cfm` (query, required, string) — Compressor free-air CFM Example: `15`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/compressor-api/v1/pumpup?receiver_gallons=60&start_pressure_psi=100&end_pressure_psi=175&compressor_cfm=15"
```

**Response:**
```json
{
    "data": {
        "note": "Pump-up time = receiver volume × the pressure rise ÷ (14.7 × compressor free-air CFM). The compressor delivers less CFM as tank pressure climbs, so the real time runs a bit longer near the top. Frequent short cycles mean the tank is too small or the duty too high for the pump.",
        "inputs": {
            "compressor_cfm": 15,
            "end_pressure_psi": 175,
            "receiver_gallons": 60,
            "start_pressure_psi": 100
        },
        "pumpup_minutes": 2.73,
        "pumpup_seconds": 164
    },
    "meta": {
        "timestamp": "2026-06-06T23:54:00.732Z",
        "request_id": "89ddc279-67c1-45ec-96df-ffb57b74f812"
    },
    "status": "ok",
    "message": "Pump-up time",
    "success": true
}
```

#### `GET /v1/receiver-size` — Receiver size for a demand burst

**Parameters:**
- `demand_cfm` (query, required, string) — Demand in free-air CFM Example: `20`
- `supply_minutes` (query, required, string) — Minutes to supply Example: `1`
- `max_pressure_psi` (query, required, string) — Max (cut-out) pressure psi Example: `175`
- `min_pressure_psi` (query, required, string) — Min (usable) pressure psi Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/compressor-api/v1/receiver-size?demand_cfm=20&supply_minutes=1&max_pressure_psi=175&min_pressure_psi=100"
```

**Response:**
```json
{
    "data": {
        "note": "Receiver size = demand (free-air CFM) × minutes × 14.7 ÷ the usable pressure window (max − min) — bigger when the demand burst is large, long or the pressure window is narrow. A receiver buys time for the pump to catch up and smooths pulsing tools; size for the worst burst, not the average.",
        "inputs": {
            "demand_cfm": 20,
            "supply_minutes": 1,
            "max_pressure_psi": 175,
            "min_pressure_psi": 100
        },
        "required_volume_ft3": 3.92,
        "required_volume_gallons": 29.3
    },
    "meta": {
        "timestamp": "2026-06-06T23:54:00.810Z",
        "request_id": "b8c874f2-e6b4-4f9c-8fea-e5b3d5f60073"
    },
    "status": "ok",
    "message": "Receiver size",
    "success": true
}
```

#### `GET /v1/scfm` — ACFM to SCFM correction

**Parameters:**
- `acfm` (query, required, string) — Actual CFM at the inlet Example: `100`
- `inlet_pressure_psia` (query, optional, string) — Inlet pressure psia (default 14.696) Example: `12.2`
- `inlet_temp_f` (query, optional, string) — Inlet temperature °F (default 68) Example: `68`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/compressor-api/v1/scfm?acfm=100&inlet_pressure_psia=12.2&inlet_temp_f=68"
```

**Response:**
```json
{
    "data": {
        "note": "SCFM = ACFM × (inlet pressure ÷ 14.696) × (528 ÷ inlet temperature in Rankine) — it normalises real air to standard conditions. At altitude the inlet pressure is lower, so the same compressor delivers fewer SCFM (≈ 17 % less at 5,000 ft). Always compare and size tools on SCFM, not ACFM.",
        "scfm": 83.02,
        "inputs": {
            "acfm": 100,
            "inlet_temp_f": 68,
            "inlet_pressure_psia": 12.2
        }
    },
    "meta": {
        "timestamp": "2026-06-06T23:54:00.879Z",
        "request_id": "9d4f71fc-7a2e-4e38-9c2f-426d8b665a90"
    },
    "status": "ok",
    "message": "SCFM",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "US units (gallons, ft³, CFM, psi). Receiver ft³ = CFM × min × 14.7 ÷ ΔP; pump-up = V × ΔP ÷ (14.7 × CFM); SCFM = ACFM × (P/14.696) × (528/Rankine). 1 ft³ = 7.48 gal. Estimates — duty cycle and pump curve vary.",
        "service": "compressor-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/scfm": "Convert actual CFM at the inlet to standard CFM.",
            "GET /v1/pumpup": "Time for a compressor to raise a receiver from one pressure to another.",
            "GET /v1/receiver-size": "Receiver volume to supply a demand for a time over a pressure window."
        },
        "description": "Compressed-air maths: receiver size for a demand burst, pump-up time, and the ACFM→SCFM correction for inlet conditions."
    },
    "meta": {
        "timestamp": "2026-06-06T23:54:00.955Z",
        "request_id": "e154943e-91fb-43dd-9a92-348e7c966002"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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