# Beam Load API
> Beam statics as an API, computed locally and deterministically. The simply-supported endpoint analyses a beam on two supports under a point load (anywhere along the span) or a uniformly distributed load: it returns the support reactions, the maximum shear and the maximum bending moment with its location, and — if you pass the Young's modulus E and second moment of area I — the maximum deflection. The cantilever endpoint does the same for a beam fixed at one end, returning the reaction force and fixing moment, the maximum bending moment and the free-end deflection. The section endpoint gives the cross-section properties that those deflections need: the second moment of area (moment of inertia) and the section modulus for a rectangle, a solid circle or a hollow circular pipe. Every result lists the formula used, so you can show your working. Use consistent units — in SI, load in newtons, distributed load in N/m, lengths in metres, E in pascals and I in m⁴ give moments in N·m and deflections in metres. Everything is computed locally and deterministically, so it is instant and private. Linear-elastic, small-deflection theory — a learning and estimating tool, not a substitute for a qualified structural engineer on a real design. Ideal for engineering and architecture tools, education and physics apps, maker and DIY calculators, and CAD helpers. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is structural beam statics; for bolt and fastener torque use a torque 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/beam-api/..."
```

## Pricing
- **Free** (Free) — 13,035 calls/Mo, 2 req/s
- **Starter** ($15/Mo) — 22,650 calls/Mo, 8 req/s
- **Pro** ($34/Mo) — 276,500 calls/Mo, 20 req/s
- **Mega** ($72/Mo) — 1,425,000 calls/Mo, 50 req/s

## Endpoints

### Beam

#### `GET /v1/cantilever` — Cantilever beam

**Parameters:**
- `length` (query, required, string) — Length Example: `2`
- `load_type` (query, optional, string) — point|udl Example: `point`
- `load` (query, optional, string) — Point load magnitude Example: `1000`
- `position` (query, optional, string) — Point load position from fixed end (default free end)
- `udl` (query, optional, string) — Uniformly distributed load
- `youngs_modulus` (query, optional, string) — E (for deflection) Example: `200e9`
- `moment_of_inertia` (query, optional, string) — I (for deflection) Example: `1e-5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/beam-api/v1/cantilever?length=2&load_type=point&load=1000&youngs_modulus=200e9&moment_of_inertia=1e-5"
```

**Response:**
```json
{
    "data": {
        "beam": "cantilever",
        "length": 2,
        "formulas": {
            "moment": "M=P·a (at fixed end)",
            "deflection_end_load": "δ=P·L³/(3·E·I)"
        },
        "position": 2,
        "load_type": "point",
        "max_shear": 1000,
        "reactions": {
            "force": 1000,
            "moment": 2000
        },
        "max_deflection": 0.00133333,
        "max_bending_moment": 2000,
        "max_moment_location": 0,
        "max_deflection_location": 2
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:11.205Z",
        "request_id": "b44c1298-f707-4c63-ace3-d480c345d698"
    },
    "status": "ok",
    "message": "Cantilever beam",
    "success": true
}
```

#### `GET /v1/section` — Section properties (I, S)

**Parameters:**
- `shape` (query, required, string) — rectangle|circle|pipe Example: `rectangle`
- `width` (query, optional, string) — Rectangle width (b) Example: `0.05`
- `height` (query, optional, string) — Rectangle height (h) Example: `0.1`
- `diameter` (query, optional, string) — Circle diameter
- `outer_diameter` (query, optional, string) — Pipe outer diameter
- `inner_diameter` (query, optional, string) — Pipe inner diameter

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/beam-api/v1/section?shape=rectangle&width=0.05&height=0.1"
```

**Response:**
```json
{
    "data": {
        "area": 0.005,
        "shape": "rectangle",
        "width": 0.05,
        "height": 0.1,
        "formulas": {
            "I": "b·h³/12",
            "S": "b·h²/6"
        },
        "section_modulus": 8.33333e-5,
        "moment_of_inertia": 4.16667e-6,
        "neutral_axis_from_base": 0.05
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:11.288Z",
        "request_id": "b75bc8b1-55a3-4de1-aafd-cb5ca14c27f9"
    },
    "status": "ok",
    "message": "Section properties (I, S)",
    "success": true
}
```

#### `GET /v1/simply-supported` — Simply supported beam

**Parameters:**
- `length` (query, required, string) — Span Example: `4`
- `load_type` (query, optional, string) — point|udl Example: `point`
- `load` (query, optional, string) — Point load magnitude Example: `1000`
- `position` (query, optional, string) — Point load position from left (default centre) Example: `2`
- `udl` (query, optional, string) — Uniformly distributed load (per length)
- `youngs_modulus` (query, optional, string) — E (for deflection) Example: `200e9`
- `moment_of_inertia` (query, optional, string) — I (for deflection) Example: `1e-5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/beam-api/v1/simply-supported?length=4&load_type=point&load=1000&position=2&youngs_modulus=200e9&moment_of_inertia=1e-5"
```

**Response:**
```json
{
    "data": {
        "beam": "simply_supported",
        "length": 4,
        "formulas": {
            "moment": "M=P·a·b/L",
            "reactions": "R1=P·b/L, R2=P·a/L",
            "deflection_centre": "δ=P·L³/(48·E·I)"
        },
        "position": 2,
        "load_type": "point",
        "max_shear": 500,
        "reactions": {
            "left": 500,
            "right": 500
        },
        "max_deflection": 0.000666667,
        "deflection_at_load": 0.000666667,
        "max_bending_moment": 1000,
        "max_moment_location": 2,
        "max_deflection_location": 2
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:11.373Z",
        "request_id": "3b9c5072-753e-4432-8685-3ce954c61e79"
    },
    "status": "ok",
    "message": "Simply supported beam",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "api": "beam",
        "note": "Beam statics — reactions, bending moment, deflection. Computed locally and deterministically, no key, no third-party service. Linear-elastic, small-deflection theory; verify with a qualified engineer for real designs.",
        "units": "Use consistent units. SI: load N, udl N/m, length m, E Pa, I m⁴ → moment N·m, deflection m.",
        "endpoints": [
            "/v1/simply-supported",
            "/v1/cantilever",
            "/v1/section",
            "/v1/meta"
        ]
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:11.466Z",
        "request_id": "53a52e75-e858-402d-8958-6968645a2c9e"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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