# Circular Motion API
> Uniform circular-motion physics as an API, computed locally and deterministically. The centripetal-force endpoint computes the centripetal acceleration a = v²/r = ω²·r — always pointing toward the centre — and the centripetal force F = m·a that holds a body on its circular path, from the mass, the radius and either the linear or the angular velocity, and reports the equivalent g-force. The angular endpoint converts between every way of describing rotation — angular velocity (rad/s), revolutions per minute, frequency, period and, given a radius, the linear (tangential) velocity — using ω = 2π·f = 2π/T = v/r. The centrifuge endpoint computes the relative centrifugal force (RCF, in g) of a centrifuge rotor from its speed in rpm and radius, RCF = ω²·r / g, or inverts it to give the rpm needed to reach a target RCF. Masses are in kg, radii in m (mm for the centrifuge), velocities in m/s, angular velocities in rad/s and forces in N. Everything is computed locally and deterministically, so it is instant and private. Ideal for physics-education, mechanical, automotive, lab-centrifuge and amusement-ride app developers, rotational-motion and g-force tools, and STEM teaching. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is uniform circular motion; for gravitational orbits use a gravitation API, for a vehicle on a banked curve a banked-curve API and for pendulum oscillation a pendulum 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/centripetal-api/..."
```

## Pricing
- **Free** (Free) — 4,000 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 36,000 calls/Mo, 6 req/s
- **Pro** ($13/Mo) — 210,000 calls/Mo, 15 req/s
- **Mega** ($42/Mo) — 1,250,000 calls/Mo, 40 req/s

## Endpoints

### Circular

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

**Parameters:**
- `radius` (query, optional, string) — Radius (m) Example: `5`
- `angular_velocity` (query, optional, string) — Angular velocity (rad/s)
- `velocity` (query, optional, string) — Linear velocity (m/s) Example: `10`
- `rpm` (query, optional, string) — Revolutions per minute
- `frequency` (query, optional, string) — Frequency (Hz)
- `period` (query, optional, string) — Period (s)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/centripetal-api/v1/angular?radius=5&velocity=10"
```

**Response:**
```json
{
    "data": {
        "rpm": 19.098593,
        "note": "ω = 2π·f = 2π/T = v/r. Supply a radius to also get the linear (tangential) velocity.",
        "inputs": {
            "given": {
                "rpm": null,
                "period": null,
                "velocity": "10",
                "frequency": null,
                "angular_velocity": null
            },
            "radius_m": 5
        },
        "period_s": 3.14159265,
        "frequency_hz": 0.31830989,
        "linear_velocity_ms": 10,
        "angular_velocity_rad_s": 2,
        "centripetal_acceleration_ms2": 20
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:38.199Z",
        "request_id": "ec58f451-267c-4b43-b8a2-67ab947e2924"
    },
    "status": "ok",
    "message": "Angular kinematics",
    "success": true
}
```

#### `GET /v1/centrifuge` — Centrifuge RCF

**Parameters:**
- `radius_mm` (query, required, string) — Rotor radius (mm) Example: `100`
- `rpm` (query, optional, string) — Rotor speed (rpm) Example: `5000`
- `rcf` (query, optional, string) — Or target RCF (g) to solve rpm

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/centripetal-api/v1/centrifuge?radius_mm=100&rpm=5000"
```

**Response:**
```json
{
    "data": {
        "note": "RCF (relative centrifugal force) = ω²·r / g, with ω = 2π·rpm/60. Equivalent to 1.118×10⁻⁶ · radius(mm) · rpm².",
        "rcf_g": 2795.6099,
        "inputs": {
            "rpm": 5000,
            "radius_mm": 100
        },
        "acceleration_ms2": 27415.5678,
        "angular_velocity_rad_s": 523.598776
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:38.302Z",
        "request_id": "b62c434e-cd97-4434-901f-b081ee78a79f"
    },
    "status": "ok",
    "message": "Centrifuge RCF",
    "success": true
}
```

#### `GET /v1/centripetal-force` — Centripetal force

**Parameters:**
- `mass` (query, required, string) — Mass (kg) Example: `2`
- `radius` (query, required, string) — Radius (m) Example: `5`
- `velocity` (query, optional, string) — Linear velocity (m/s) Example: `10`
- `angular_velocity` (query, optional, string) — Or angular velocity (rad/s)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/centripetal-api/v1/centripetal-force?mass=2&radius=5&velocity=10"
```

**Response:**
```json
{
    "data": {
        "note": "Centripetal acceleration a = v²/r = ω²·r points toward the centre; the centripetal force F = m·a keeps the body on its circular path.",
        "inputs": {
            "mass_kg": 2,
            "radius_m": 5,
            "velocity_ms": 10
        },
        "g_force": 2.039432,
        "centripetal_force_n": 40,
        "angular_velocity_rad_s": 2,
        "centripetal_acceleration_ms2": 20
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:38.385Z",
        "request_id": "e3d81402-725d-4c98-a1aa-9b27b51e4b43"
    },
    "status": "ok",
    "message": "Centripetal force",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Mass in kg, radius in m (mm for the centrifuge), velocity in m/s, angular velocity in rad/s, forces in N. g = 9.80665 m/s².",
        "service": "centripetal-api",
        "formulae": {
            "rcf": "RCF = ω²·r / g, ω = 2π·rpm/60",
            "angular": "ω = 2π·f = 2π/T = v/r",
            "centripetal": "a = v²/r = ω²·r ; F = m·a"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/angular": "Convert between angular velocity, rpm, frequency, period and linear velocity.",
            "GET /v1/centrifuge": "Relative centrifugal force (g) from rpm & rotor radius, or the rpm for a target RCF.",
            "GET /v1/centripetal-force": "Centripetal acceleration and force from mass, radius and velocity (or angular velocity)."
        },
        "description": "Uniform circular-motion calculator: centripetal force and acceleration, angular-kinematics conversions (rad/s, rpm, frequency, period, linear velocity) and centrifuge relative centrifugal force (RCF)."
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:38.486Z",
        "request_id": "bd434f62-5c88-4e27-b5b6-14626f3f9880"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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