# 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"
```

**Response:**
```json
{
    "data": {
        "note": "Stand off-centre and the two halves carry different tensions: the horizontal pull is the same on both sides (H = weight × a × b ÷ (sag × span), with a and b the distances to each anchor), but the shorter, steeper segment runs at the higher tension because its angle is steeper. The short side is the one that fails first — which is why a highliner near an anchor stresses that leash and anchor harder than one standing in the middle.",
        "inputs": {
            "sag_m": 1.5,
            "load_kg": 80,
            "line_length_m": 25,
            "load_position_m": 10
        },
        "load_force_n": 784.53,
        "max_tension_n": 3173.2,
        "left_angle_deg": 8.531,
        "right_angle_deg": 5.711,
        "horizontal_tension_n": 3138.1,
        "left_segment_tension_n": 3173.2,
        "right_segment_tension_n": 3153.8
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:55.775Z",
        "request_id": "c841e92f-2dd3-4186-8e16-bf0788161d00"
    },
    "status": "ok",
    "message": "Off-center load",
    "success": true
}
```

#### `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"
```

**Response:**
```json
{
    "data": {
        "note": "The sag a mid-span load settles to for a given line tension: sin(angle) = body weight ÷ twice the tension, and the sag = half the span × tan(angle). Tighten the line (raise the tension) and the sag — and the angle — shrink, but the anchor load climbs; slacken it and the line dips deeper but pulls the anchors far less. If the tension is below half the body weight the line cannot hold the load at the centre at all.",
        "sag_m": 1.5,
        "inputs": {
            "load_kg": 80,
            "tension_n": 3292,
            "line_length_m": 25
        },
        "load_force_n": 784.53,
        "sag_angle_deg": 6.843
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:55.871Z",
        "request_id": "1a63b174-97f9-4897-b16e-d7dcedd41f56"
    },
    "status": "ok",
    "message": "Sag",
    "success": true
}
```

#### `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"
```

**Response:**
```json
{
    "data": {
        "note": "A person at mid-span pulls the line into a shallow V; vertical balance gives 2·T·sin(angle) = the body weight, so the flatter the line (smaller sag angle) the more the tension blows up — pulling a slackline drum-tight to kill the sag is exactly what loads the anchors to many times body weight. The anchor's horizontal pull is T·cos(angle), nearly the full tension on a tight line. This is point-load statics, not a self-weight catenary.",
        "inputs": {
            "sag_m": 1.5,
            "load_kg": 80,
            "line_length_m": 25
        },
        "tension_kgf": 335.7,
        "load_force_n": 784.53,
        "sag_angle_deg": 6.843,
        "line_tension_n": 3292.3,
        "anchor_horizontal_n": 3268.9
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:55.966Z",
        "request_id": "1d762a05-0296-4ee3-86fe-3d7ee9c41c50"
    },
    "status": "ok",
    "message": "Line tension",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Metres, kg in; newtons, degrees out. Mid-span: 2T·sin(angle)=W, sin=sag/hypot(L/2,sag). Inverse sag: sin(angle)=W/2T. Off-centre: H=W·a·b/(sag·L), T=H/cos(angle). Point-load statics, not a self-weight catenary. For self-weight cable sag use a catenary API; for WLL/safety factor a rigging API.",
        "service": "slackline-api",
        "endpoints": {
            "GET /v1/sag": "Sag a mid-span load settles to for a given line tension.",
            "GET /v1/meta": "This document.",
            "GET /v1/tension": "Line tension and anchor force from span, sag and a mid-span load.",
            "GET /v1/off-center-load": "Asymmetric segment tensions for an off-centre load."
        },
        "description": "Tensioned-line point-load statics: line tension and anchor force at a sag, the sag for a known tension, and asymmetric tensions for an off-centre load."
    },
    "meta": {
        "timestamp": "2026-06-07T08:17:56.085Z",
        "request_id": "1dff28c4-b384-45e4-9b29-104fa047de77"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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