# Slackline Tension API
> Tensioned-line point-load statics as an API, computed locally and deterministically — the line-tension and anchor-force numbers a slackliner, highliner or rigger works out before they weight a line. This is the V a loaded line makes under a person, not a self-weight catenary: the tension endpoint takes the span, the sag and the body load and returns the line tension and the horizontal anchor pull, because vertical balance is 2·T·sin(angle) = the body weight — so the flatter the line (the smaller the sag) the more the tension blows up, which is exactly why drum-tightening a line to kill the bounce can load the anchors to many times body weight. The sag endpoint inverts it: from a known line tension it returns the sag a mid-span load settles to (sin angle = weight ÷ twice the tension), and flags when the tension is too low to hold the load at all. The off-centre-load endpoint handles standing away from the middle, where the two halves carry different tensions: the horizontal pull is equal on both sides (H = weight × a × b ÷ (sag × span)) but the shorter, steeper segment runs at the higher tension and fails first — the reason a highliner near an anchor stresses that leash harder than one in the centre. Everything is computed locally and deterministically, so it is instant and private. Ideal for slackline and highline rigging tools, climbing and outdoor-gear apps, and tension-and-anchor calculators. Pure local computation — no key, no third-party service, instant. Geometric statics — combine with the real webbing and anchor ratings. 3 compute endpoints. For a self-weight hanging cable use a catenary API; for working-load-limit and safety factor a rigging 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/slackline-api/..."
```

## Pricing
- **Free** (Free) — 6,000 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 58,000 calls/Mo, 6 req/s
- **Pro** ($26/Mo) — 240,000 calls/Mo, 15 req/s
- **Mega** ($84/Mo) — 1,100,000 calls/Mo, 40 req/s

## Endpoints

### Slackline

#### `GET /v1/off-center-load` — Asymmetric tensions off-centre

**Parameters:**
- `line_length_m` (query, required, string) — Span between anchors (m) Example: `25`
- `load_position_m` (query, required, string) — Distance of load from one anchor (m) Example: `10`
- `sag_m` (query, required, string) — Sag at the load point (m) Example: `1.5`
- `load_kg` (query, required, string) — Body load (kg) Example: `80`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/slackline-api/v1/off-center-load?line_length_m=25&load_position_m=10&sag_m=1.5&load_kg=80"
```

#### `GET /v1/sag` — Sag from a known tension

**Parameters:**
- `line_length_m` (query, required, string) — Span between anchors (m) Example: `25`
- `load_kg` (query, required, string) — Body load (kg) Example: `80`
- `tension_n` (query, required, string) — Line tension (N) Example: `3292`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/slackline-api/v1/sag?line_length_m=25&load_kg=80&tension_n=3292"
```

#### `GET /v1/tension` — Line tension from sag and load

**Parameters:**
- `line_length_m` (query, required, string) — Span between anchors (m) Example: `25`
- `sag_m` (query, required, string) — Sag at mid-span under load (m) Example: `1.5`
- `load_kg` (query, required, string) — Body load (kg) Example: `80`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/slackline-api/v1/tension?line_length_m=25&sag_m=1.5&load_kg=80"
```

### Meta

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

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


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