# Body Metrics API
> Anthropometric body-metrics maths as an API, computed locally and deterministically. The body-surface-area endpoint computes the body surface area in square metres from height and weight by five established formulas — Mosteller √(height·weight/3600), DuBois, Haycock, Gehan-George and Boyd — with their average, the figure used for chemotherapy dosing and cardiac index. The lean-mass endpoint estimates lean body mass from height, weight and sex by the Boer, James and Hume formulas, with the fat mass and body-fat percent that follow. The waist-ratio endpoint computes the waist-to-hip ratio (fat distribution) and the waist-to-height ratio — where keeping your waist under half your height is the simple healthy rule — with WHO-style risk bands. Heights and circumferences are in centimetres, weight in kilograms. Everything is computed locally and deterministically, so it is instant and private. Ideal for health, fitness, clinical, telemedicine and wellness app developers, body-composition and dosing tools, and health education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is body surface area, lean mass and waist ratios; for BMI, body fat and ideal weight use a BMI API and for BMR and TDEE a BMR 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/bodymetrics-api/..."
```

## Pricing
- **Free** (Free) — 3,000 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 40,000 calls/Mo, 5 req/s
- **Pro** ($12/Mo) — 250,000 calls/Mo, 20 req/s
- **Mega** ($39/Mo) — 1,523,000 calls/Mo, 60 req/s

## Endpoints

### Body Metrics

#### `GET /v1/body-surface-area` — Body surface area

**Parameters:**
- `height` (query, required, string) — Height (cm) Example: `180`
- `weight` (query, required, string) — Weight (kg) Example: `75`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bodymetrics-api/v1/body-surface-area?height=180&weight=75"
```

**Response:**
```json
{
    "data": {
        "note": "Body surface area (m²). Mosteller = √(height·weight/3600) is the simplest; used for drug dosing and cardiac index.",
        "unit": "m²",
        "inputs": {
            "height_cm": 180,
            "weight_kg": 75
        },
        "boyd_m2": 1.938,
        "dubois_m2": 1.9424,
        "average_m2": 1.9398,
        "haycock_m2": 1.9381,
        "mosteller_m2": 1.9365,
        "gehan_george_m2": 1.9438
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:02.428Z",
        "request_id": "dcf4ebe3-e1c5-4bf1-b9a5-5af8cb6f3bda"
    },
    "status": "ok",
    "message": "BSA",
    "success": true
}
```

#### `GET /v1/lean-mass` — Lean body mass

**Parameters:**
- `height` (query, required, string) — Height (cm) Example: `180`
- `weight` (query, required, string) — Weight (kg) Example: `75`
- `sex` (query, required, string) — Sex (male or female) Example: `male`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bodymetrics-api/v1/lean-mass?height=180&weight=75&sex=male"
```

**Response:**
```json
{
    "data": {
        "note": "Lean body mass from Boer, James and Hume formulas (sex-specific). Fat mass = weight − average LBM.",
        "inputs": {
            "sex": "male",
            "height_cm": 180,
            "weight_kg": 75
        },
        "fat_mass_kg": 16.397,
        "body_fat_percent": 21.863,
        "lean_body_mass_kg": {
            "boer": 59.385,
            "hume": 56.146,
            "james": 60.278,
            "average": 58.603
        }
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:02.539Z",
        "request_id": "4e47d486-8ccd-4f27-bfc2-600429019038"
    },
    "status": "ok",
    "message": "Lean mass",
    "success": true
}
```

#### `GET /v1/waist-ratio` — Waist ratios

**Parameters:**
- `waist` (query, required, string) — Waist circumference (cm) Example: `80`
- `hip` (query, optional, string) — Hip circumference (cm) Example: `100`
- `height` (query, optional, string) — Height (cm) Example: `180`
- `sex` (query, optional, string) — Sex for the WHR risk band Example: `male`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bodymetrics-api/v1/waist-ratio?waist=80&hip=100&height=180&sex=male"
```

**Response:**
```json
{
    "data": {
        "note": "WHR = waist/hip (fat distribution); WHtR = waist/height (a WHtR under 0.5 is the common 'keep your waist under half your height' rule).",
        "inputs": {
            "sex": "male",
            "hip_cm": 100,
            "waist_cm": 80,
            "height_cm": 180
        },
        "whr_risk": "low",
        "whtr_category": "healthy",
        "waist_to_hip_ratio": 0.8,
        "waist_to_height_ratio": 0.4444
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:02.642Z",
        "request_id": "0be10379-bea5-4563-a13a-0e68824ccf60"
    },
    "status": "ok",
    "message": "Waist ratio",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Height and circumferences in cm, weight in kg. 'sex' (male/female) is required for lean mass and the WHR risk band. Distinct from BMI and ideal-weight calculators.",
        "service": "bodymetrics-api",
        "formulae": {
            "whr": "waist / hip",
            "whtr": "waist / height",
            "bsa_mosteller": "√(height_cm · weight_kg / 3600)",
            "lbm_boer_male": "0.407·W + 0.267·H − 19.2"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/lean-mass": "Lean body mass (Boer/James/Hume), fat mass and body-fat percent.",
            "GET /v1/waist-ratio": "Waist-to-hip and waist-to-height ratios with health-risk bands.",
            "GET /v1/body-surface-area": "Body surface area in m² by Mosteller, DuBois, Haycock, Gehan-George and Boyd."
        },
        "description": "Anthropometric body-metrics calculator: body surface area (five formulas), lean body mass (Boer/James/Hume) with fat mass, and waist-to-hip and waist-to-height ratios with risk bands."
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:02.740Z",
        "request_id": "24c7b040-933a-443e-8227-79ee359e9a5a"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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