# Shaft Power API
> Rotational and shaft-power maths as an API, computed locally and deterministically. The power endpoint relates mechanical power, torque and rotational speed — give any two of the power, the torque in newton-metres and the speed in rpm and it returns the third using P = T·ω with ω = 2πN/60, reporting the angular velocity and the power in watts, kilowatts, mechanical horsepower and metric horsepower (PS). The angular endpoint converts a rotational speed freely between rpm, radians per second, degrees per second and hertz (revolutions per second), and — given a radius — the tangential speed and centripetal acceleration at the rim. The units endpoint converts power across watts, kilowatts, mechanical horsepower (745.7 W), metric horsepower or PS (735.5 W), foot-pounds per second and BTU per hour. Everything is computed locally and deterministically, so it is instant and private. Ideal for automotive, motor, drivetrain, robotics and machinery app developers, engine and gearbox tools, and mechanical-engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is mechanical shaft power; for bolt tightening torque use a torque API and for electrical power factor a power-factor 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/shaftpower-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 15,000 calls/Mo, 5 req/s
- **Pro** ($22/Mo) — 120,000 calls/Mo, 20 req/s
- **Mega** ($69/Mo) — 600,000 calls/Mo, 60 req/s

## Endpoints

### Shaft Power

#### `GET /v1/angular` — Angular velocity

**Parameters:**
- `rpm` (query, optional, string) — Speed (rpm) Example: `3000`
- `rad_s` (query, optional, string) — Or angular velocity (rad/s)
- `hz` (query, optional, string) — Or frequency (Hz)
- `radius` (query, optional, string) — Radius (m) for tangential speed Example: `0.1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/shaftpower-api/v1/angular?rpm=3000&radius=0.1"
```

**Response:**
```json
{
    "data": {
        "hz": 50,
        "rpm": 3000,
        "note": "ω = 2πN/60 (rpm) = 2π·f (Hz). Tangential speed v = ω·r; centripetal acceleration = ω²·r.",
        "deg_s": 18000,
        "rad_s": 314.159265,
        "radius_m": 0.1,
        "tangential_speed_ms": 31.415927,
        "tangential_speed_kmh": 113.097336,
        "centripetal_accel_ms2": 9869.604401
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:05.685Z",
        "request_id": "ec395ada-59d9-4a31-a8b2-261159eb9e71"
    },
    "status": "ok",
    "message": "Angular velocity",
    "success": true
}
```

#### `GET /v1/power` — Power / torque / rpm

**Parameters:**
- `power` (query, optional, string) — Power (W)
- `power_hp` (query, optional, string) — Or power (hp)
- `torque` (query, optional, string) — Torque (N·m) Example: `100`
- `rpm` (query, optional, string) — Rotational speed (rpm) Example: `3000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/shaftpower-api/v1/power?torque=100&rpm=3000"
```

**Response:**
```json
{
    "data": {
        "rpm": 3000,
        "note": "P = T·ω with ω = 2πN/60 (N in rpm). 1 hp = 745.6999 W, 1 PS = 735.499 W.",
        "inputs": {
            "given": 2
        },
        "power_w": 31415.926536,
        "power_hp": 42.129451,
        "power_kw": 31.415926536,
        "power_ps": 42.713773,
        "torque_nm": 100,
        "solved_for": "power",
        "angular_velocity_rad_s": 314.159265
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:05.796Z",
        "request_id": "eac3688c-5d23-4546-a96b-8cfb140a3c58"
    },
    "status": "ok",
    "message": "Power/torque/rpm",
    "success": true
}
```

#### `GET /v1/units` — Power units

**Parameters:**
- `watt` (query, optional, string) — Power (W)
- `kw` (query, optional, string) — Power (kW)
- `hp` (query, optional, string) — Power (hp) Example: `100`
- `ps` (query, optional, string) — Power (PS)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/shaftpower-api/v1/units?hp=100"
```

**Response:**
```json
{
    "data": {
        "kw": 74.5699872,
        "note": "1 hp (mechanical) = 745.699872 W, 1 PS (metric hp) = 735.49875 W, 1 ft·lbf/s = 1.35582 W.",
        "watt": 74569.9872,
        "btu_per_hour": 254443.3581,
        "ft_lbf_per_s": 55000.000031,
        "ps_metric_hp": 101.386967,
        "hp_mechanical": 100
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:05.916Z",
        "request_id": "7535b796-2edd-4e8e-b60b-a891b6cb62f2"
    },
    "status": "ok",
    "message": "Power units",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "SI units: power W, torque N·m, speed rpm, angle rad/s. Mechanical (shaft) power, not electrical — for power factor use a power-factor API.",
        "service": "shaftpower-api",
        "formulae": {
            "power": "P = T·ω,  ω = 2πN/60",
            "horsepower": "1 hp = 745.699872 W, 1 PS = 735.49875 W",
            "tangential_speed": "v = ω·r"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/power": "Give any two of power, torque and rpm; get the third plus hp/PS.",
            "GET /v1/units": "Power unit conversion across W, kW, hp, PS, ft·lbf/s and BTU/h.",
            "GET /v1/angular": "Angular-velocity conversions and tangential speed/centripetal acceleration."
        },
        "description": "Rotational/shaft power calculator: relate power, torque and rpm; convert angular velocity (rpm/rad·s⁻¹/Hz) with tangential speed; and convert power units (W/kW/hp/PS)."
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:06.021Z",
        "request_id": "da324819-76de-4d02-8215-47d10635cd8b"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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