# Ideal Body Weight API
> Ideal body weight and clinical body-metric maths as an API, computed locally and deterministically. The ideal endpoint computes ideal body weight from height and sex by the four standard formulas — Devine (the clinical standard for drug dosing), Robinson, Miller and Hamwi — each adding a per-inch increment for every inch above 5 ft, plus their average; a 5 ft 10 in (178 cm) man comes out at 73.0 kg by Devine. The adjusted endpoint computes the adjusted body weight used to dose drugs in overweight patients, ABW = IBW + 0.4·(actual − IBW), from height, sex and actual weight. The bsa endpoint computes body surface area — central to chemotherapy and cardiac-index dosing — by the Mosteller (√(height·weight/3600)), Du Bois and Haycock formulas, so a 180 cm, 80 kg adult is about 2.0 m². Height is accepted in centimetres or inches and weight in kilograms. Everything is computed locally and deterministically, so it is instant and private. Ideal for digital-health, EHR, pharmacy, clinical-decision-support, telemedicine and medical-education app developers, dosing and body-metric tools, and health software. These are clinical estimation formulas, not a substitute for professional medical judgement. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is ideal/adjusted weight and body surface area; for body-mass index use a BMI 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/idealweight-api/..."
```

## Pricing
- **Free** (Free) — 4,500 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 44,000 calls/Mo, 6 req/s
- **Pro** ($18/Mo) — 210,000 calls/Mo, 15 req/s
- **Mega** ($54/Mo) — 1,240,000 calls/Mo, 40 req/s

## Endpoints

### BodyWeight

#### `GET /v1/adjusted` — Adjusted body weight

**Parameters:**
- `height_cm` (query, optional, string) — Height (cm) Example: `178`
- `height_inches` (query, optional, string) — Height (inches)
- `sex` (query, required, string) — male or female Example: `male`
- `weight_kg` (query, required, string) — Actual weight (kg) Example: `100`
- `factor` (query, optional, string) — Correction factor (default 0.4)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/idealweight-api/v1/adjusted?height_cm=178&sex=male&weight_kg=100"
```

**Response:**
```json
{
    "data": {
        "note": "Adjusted body weight ABW = IBW + factor·(actual − IBW), with the Devine IBW and a default correction factor of 0.4, used for drug dosing when actual weight exceeds ideal.",
        "inputs": {
            "sex": "male",
            "factor": 0.4,
            "height_cm": 178,
            "weight_kg": 100
        },
        "ideal_body_weight_kg": 73.181,
        "adjusted_body_weight_kg": 83.909
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:24.992Z",
        "request_id": "58a0bd8d-ef94-4b93-8670-d0a1d67694b0"
    },
    "status": "ok",
    "message": "Adjusted body weight",
    "success": true
}
```

#### `GET /v1/bsa` — Body surface area

**Parameters:**
- `height_cm` (query, optional, string) — Height (cm) Example: `180`
- `height_inches` (query, optional, string) — Height (inches)
- `weight_kg` (query, required, string) — Weight (kg) Example: `80`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/idealweight-api/v1/bsa?height_cm=180&weight_kg=80"
```

**Response:**
```json
{
    "data": {
        "note": "Body surface area. Mosteller = √(height_cm·weight_kg/3600); Du Bois = 0.007184·cm^0.725·kg^0.425. A 180 cm, 80 kg adult is ≈2.0 m². Used for chemotherapy and cardiac-index dosing.",
        "inputs": {
            "height_cm": 180,
            "weight_kg": 80
        },
        "du_bois_m2": 1.9964,
        "haycock_m2": 2.0066,
        "mosteller_m2": 2
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:25.069Z",
        "request_id": "6d866726-631d-432e-a6db-1b1bff9cebe7"
    },
    "status": "ok",
    "message": "Body surface area",
    "success": true
}
```

#### `GET /v1/ideal` — Ideal body weight

**Parameters:**
- `height_cm` (query, optional, string) — Height (cm) Example: `178`
- `height_inches` (query, optional, string) — Height (inches)
- `sex` (query, required, string) — male or female Example: `male`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/idealweight-api/v1/ideal?height_cm=178&sex=male"
```

**Response:**
```json
{
    "data": {
        "note": "Ideal body weight formulas (Devine is the clinical standard for drug dosing). Each adds a per-inch increment for every inch of height above 5 ft (60 in). Devine ♂ at 5'10\" (70 in) = 73.0 kg.",
        "inputs": {
            "sex": "male",
            "height_cm": 178
        },
        "hamwi_kg": 75.213,
        "devine_kg": 73.181,
        "miller_kg": 70.411,
        "average_kg": 72.489,
        "robinson_kg": 71.15
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:25.162Z",
        "request_id": "4714aed1-c333-4f55-98e0-92e64cbe5261"
    },
    "status": "ok",
    "message": "Ideal body weight",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Height in cm or inches, weight in kg. Clinical estimation formulas — not a substitute for professional medical judgement. For body-mass index use a BMI API.",
        "service": "idealweight-api",
        "endpoints": {
            "GET /v1/bsa": "Body surface area from height and weight.",
            "GET /v1/meta": "This document.",
            "GET /v1/ideal": "Ideal body weight by four formulas from height and sex.",
            "GET /v1/adjusted": "Adjusted body weight for dosing from height, sex and actual weight."
        },
        "description": "Ideal body weight (Devine, Robinson, Miller, Hamwi), adjusted body weight for dosing, and body surface area (Mosteller, Du Bois, Haycock)."
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:25.273Z",
        "request_id": "c831492a-d9dd-429a-9147-0f45b118b7ea"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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