# VO2 Max API
> Aerobic-capacity (VO2 max) estimation as an API, computed locally and deterministically. The cooper endpoint estimates VO2 max from the Cooper 12-minute run test, VO2max = (distance − 504.9)/44.73, from the distance covered in twelve minutes. The resting endpoint uses the resting heart-rate (Uth-Sørensen) method, VO2max = 15.3 × (HRmax/HRrest), with the maximum heart rate taken directly or as 220 − age — a lower resting pulse signals better fitness. The rockport endpoint applies the Rockport one-mile walk test, a multiple-regression formula on age, weight, sex, walk time and the heart rate at the finish, the most accessible sub-maximal field test. Each result comes with a broad fitness rating from poor to superior and the value in mL/kg/min. Everything is computed locally and deterministically, so it is instant and private. Ideal for fitness, running and endurance-training app developers, coaching and assessment tools, sports-science and wellness dashboards. Pure local computation — no key, no third-party service, instant. Live, nothing stored. Estimates only, not medical advice. 3 endpoints. This is aerobic-capacity estimation; for heart-rate zones use a heart-rate API and for basal metabolism use 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/vo2max-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, 15 req/s
- **Mega** ($39/Mo) — 1,528,000 calls/Mo, 40 req/s

## Endpoints

### VO2 Max

#### `GET /v1/cooper` — Cooper 12-minute test

**Parameters:**
- `distance` (query, required, string) — Distance run in 12 minutes (m) Example: `2400`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/vo2max-api/v1/cooper?distance=2400"
```

**Response:**
```json
{
    "data": {
        "note": "Cooper 12-minute test: VO2max = (distance − 504.9)/44.73, distance in metres run in 12 minutes.",
        "inputs": {
            "distance_m": 2400
        },
        "rating": "good",
        "vo2max_ml_kg_min": 42.3675
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:21.150Z",
        "request_id": "f48bae17-d128-440a-a5f9-29dfae672594"
    },
    "status": "ok",
    "message": "Cooper test",
    "success": true
}
```

#### `GET /v1/resting` — Resting heart-rate method

**Parameters:**
- `resting_heart_rate` (query, required, string) — Resting heart rate (bpm) Example: `60`
- `max_heart_rate` (query, optional, string) — Max heart rate (bpm)
- `age` (query, optional, string) — Or age (for 220 − age) Example: `30`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/vo2max-api/v1/resting?resting_heart_rate=60&age=30"
```

**Response:**
```json
{
    "data": {
        "note": "VO2max = 15.3 × (HRmax/HRrest). HRmax from input or 220 − age. A lower resting HR raises the estimate.",
        "inputs": {
            "max_heart_rate": 190,
            "resting_heart_rate": 60
        },
        "rating": "good",
        "vo2max_ml_kg_min": 48.45
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:21.257Z",
        "request_id": "b76a1e12-3f47-4286-9d5a-4951e04e89a2"
    },
    "status": "ok",
    "message": "Resting HR method",
    "success": true
}
```

#### `GET /v1/rockport` — Rockport 1-mile walk test

**Parameters:**
- `sex` (query, required, string) — male | female Example: `male`
- `age` (query, required, string) — Age (years) Example: `30`
- `weight` (query, required, string) — Weight (kg) Example: `80`
- `walk_time` (query, required, string) — Time to walk 1 mile (minutes) Example: `13`
- `heart_rate` (query, required, string) — Heart rate at finish (bpm) Example: `140`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/vo2max-api/v1/rockport?sex=male&age=30&weight=80&walk_time=13&heart_rate=140"
```

**Response:**
```json
{
    "data": {
        "note": "Rockport 1-mile walk: VO2max = 132.853 − 0.0769·lb − 0.3877·age + 6.315·sex − 3.2649·time − 0.1565·HR (sex: male 1, female 0).",
        "inputs": {
            "age": 30,
            "sex": "male",
            "weight_kg": 80,
            "heart_rate": 140,
            "walk_time_min": 13
        },
        "rating": "good",
        "vo2max_ml_kg_min": 49.6205
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:21.345Z",
        "request_id": "dd12fe89-959d-4cf0-bd37-eeac894fd6f9"
    },
    "status": "ok",
    "message": "Rockport walk test",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "VO2max in mL/kg/min. Distances in metres, weight in kg, time in minutes, heart rate in bpm. Ratings are broad bands — true fitness norms depend on age and sex. Estimates only, not medical advice.",
        "service": "vo2max-api",
        "formulae": {
            "cooper": "VO2 = (distance − 504.9)/44.73",
            "resting": "VO2 = 15.3 × HRmax/HRrest",
            "rockport": "VO2 = 132.853 − 0.0769·lb − 0.3877·age + 6.315·sex − 3.2649·time − 0.1565·HR"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/cooper": "VO2max from the Cooper 12-minute run distance.",
            "GET /v1/resting": "VO2max from the ratio of max to resting heart rate.",
            "GET /v1/rockport": "VO2max from the Rockport 1-mile walk test (age, weight, sex, time, HR)."
        },
        "description": "VO2 max (aerobic capacity) estimator: Cooper 12-minute run, resting heart-rate method and Rockport 1-mile walk test."
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:21.444Z",
        "request_id": "870773b8-bd4c-4993-b330-d8d22b3ba843"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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