# Flow Rate API
> Pipe-flow maths as an API, computed locally and deterministically. The flow endpoint relates the three quantities of pipe flow — volumetric flow rate, fluid velocity and pipe diameter — through the continuity relation Q = A·v (with A = π/4·D²): give any two and it returns the third, with the flow rate expressed in litres per second and minute, cubic metres per hour, US gallons per minute and cubic feet per minute, plus the velocity and the pipe cross-section. The reynolds endpoint computes the Reynolds number from velocity, diameter and the fluid (water, air, oil and more, or a custom kinematic viscosity) and classifies the flow as laminar, transitional or turbulent. The convert endpoint converts a flow rate between litres per second and minute, cubic metres per hour, US gallons per minute, cubic feet per minute and per second. Everything is computed locally and deterministically, so it is instant and private. It is computed in SI internally; Reynolds uses the kinematic viscosity at about 20°C. Ideal for plumbing and HVAC tools, pump and irrigation sizing, process and fluid-engineering software, and hydraulics calculators. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is fluid flow in pipes; for plain volume or unit conversion use a unit-conversion 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/flowrate-api/..."
```

## Pricing
- **Free** (Free) — 11,135 calls/Mo, 2 req/s
- **Starter** ($13/Mo) — 20,750 calls/Mo, 8 req/s
- **Pro** ($33/Mo) — 257,500 calls/Mo, 20 req/s
- **Mega** ($71/Mo) — 1,330,000 calls/Mo, 50 req/s

## Endpoints

### Flow

#### `GET /v1/convert` — Convert flow-rate units

**Parameters:**
- `value` (query, required, string) — Flow rate value Example: `1`
- `from` (query, required, string) — m3s|ls|lmin|m3h|gpm|cfm|cfs Example: `m3s`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/flowrate-api/v1/convert?value=1&from=m3s"
```

**Response:**
```json
{
    "data": {
        "note": "Flow-rate unit conversion relative to m³/s.",
        "input": {
            "from": "m3s",
            "value": 1
        },
        "flow_rate": {
            "cfm": 2118.88,
            "gph_us": 951019.39,
            "gpm_us": 15850.3231,
            "m3_per_s": 1,
            "m3_per_hour": 3600,
            "litres_per_s": 1000,
            "litres_per_min": 60000
        }
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:18.523Z",
        "request_id": "585c6397-b7cc-4d03-b8c6-2421142bf9ec"
    },
    "status": "ok",
    "message": "Flow unit conversion",
    "success": true
}
```

#### `GET /v1/flow` — Flow rate / velocity / diameter (Q=A·v)

**Parameters:**
- `flow` (query, optional, string) — Flow rate (with flow_unit)
- `flow_unit` (query, optional, string) — ls|lmin|m3h|gpm|cfm Example: `ls`
- `velocity` (query, optional, string) — Velocity m/s Example: `2`
- `diameter` (query, optional, string) — Pipe diameter Example: `100`
- `diameter_unit` (query, optional, string) — mm|cm|m|in (default mm) Example: `mm`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/flowrate-api/v1/flow?flow_unit=ls&velocity=2&diameter=100&diameter_unit=mm"
```

**Response:**
```json
{
    "data": {
        "note": "Q = A · v, with A = π/4 · D². Provide any two of flow, velocity and diameter to get the third.",
        "input": {
            "flow": null,
            "flow_unit": null,
            "diameter_mm": 100,
            "velocity_mps": 2
        },
        "flow_rate": {
            "cfm": 33.2833,
            "gph_us": 14938.58,
            "gpm_us": 248.9763,
            "m3_per_s": 0.01570796,
            "m3_per_hour": 56.54867,
            "litres_per_s": 15.70796,
            "litres_per_min": 942.478
        },
        "diameter_mm": 100,
        "pipe_area_m2": 0.00785398,
        "diameter_inch": 3.937,
        "velocity_m_per_s": 2,
        "velocity_ft_per_s": 6.56168
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:18.623Z",
        "request_id": "7db65496-4108-4d23-bd7a-3a64a3fc6b35"
    },
    "status": "ok",
    "message": "Flow / velocity / diameter",
    "success": true
}
```

#### `GET /v1/reynolds` — Reynolds number & flow regime

**Parameters:**
- `velocity` (query, required, string) — Velocity m/s Example: `2`
- `diameter` (query, required, string) — Pipe diameter Example: `100`
- `diameter_unit` (query, optional, string) — mm|cm|m|in Example: `mm`
- `fluid` (query, optional, string) — water|air|oil|seawater|… Example: `water`
- `kinematic_viscosity` (query, optional, string) — Or m²/s

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/flowrate-api/v1/reynolds?velocity=2&diameter=100&diameter_unit=mm&fluid=water"
```

**Response:**
```json
{
    "data": {
        "note": "Re = v·D/ν. Laminar < 2300, transitional 2300–4000, turbulent > 4000 (pipe flow).",
        "input": {
            "fluid": "water",
            "diameter_mm": 100,
            "velocity_mps": 2,
            "kinematic_viscosity_m2s": 1.004e-6
        },
        "flow_regime": "turbulent",
        "reynolds_number": 199203.2
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:18.708Z",
        "request_id": "40023a29-ebde-4989-b0fb-5c6067d72a36"
    },
    "status": "ok",
    "message": "Reynolds number",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "note": "Internally SI (m³/s, m/s, m). Reynolds uses kinematic viscosity at ~20°C.",
        "fluids": [
            "water",
            "seawater",
            "air",
            "ethanol",
            "glycerin",
            "oilsae30",
            "oil",
            "milk",
            "honey"
        ],
        "service": "flowrate",
        "endpoints": {
            "/v1/flow": "Solve flow rate, velocity or pipe diameter from any two of the three.",
            "/v1/convert": "Convert a flow rate between L/s, L/min, m³/h, US gpm, cfm, cfs, etc.",
            "/v1/reynolds": "Reynolds number and flow regime from velocity, diameter and fluid."
        },
        "flow_units": [
            "m3s",
            "m3persec",
            "ls",
            "lpersec",
            "lmin",
            "lpermin",
            "lhr",
            "lh",
            "m3h",
            "m3hr",
            "m3min",
            "gpm",
            "gpmus",
            "gph",
            "cfm",
            "cfs",
            "gpmuk"
        ],
        "description": "Pipe-flow maths: flow rate / velocity / diameter (Q = A·v), Reynolds number & regime, and flow-rate unit conversion."
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:18.797Z",
        "request_id": "fbaef258-edc8-43ff-82a3-d2b6b2691a7c"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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