# O-Ring Seal API
> O-ring seal-design maths as an API, computed locally and deterministically — the squeeze, gland and stretch numbers an engineer or maker designs a seal to. The squeeze endpoint gives the compression that makes the seal: squeeze = (cross-section − gland depth) ÷ cross-section, so a 0.139-inch cord in a 0.113-inch deep groove is squeezed 18.7 %, and it grades the result — roughly 10–16 % suits dynamic (reciprocating) seals and 15–30 % static ones — and, given the groove width, the gland fill percentage, which should stay under about 85 % so the rubber has room to expand from heat or fluid swell. The gland endpoint works the other way: from the cross-section and whether the seal is static or dynamic (or a target squeeze) it returns the groove depth and a width sized for about 70 % fill — typically 1.3 to 1.5 times the cross-section — plus a corner radius. The stretch endpoint checks installation: stretch = (mating diameter − o-ring ID) ÷ ID, which should stay under about 5 % on a rod because stretching thins the cross-section and steals squeeze. Everything is computed locally and deterministically, so it is instant and private. Ideal for mechanical-engineering, hydraulics, pneumatics, vacuum and product-design app developers, seal-selection and gland-design tools, and CAD plugins. Pure local computation — no key, no third-party service, instant. Inches or millimetres. Live, nothing stored. 3 compute endpoints.

## 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/oring-api/..."
```

## Pricing
- **Free** (Free) — 6,550 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 51,800 calls/Mo, 6 req/s
- **Pro** ($12/Mo) — 215,000 calls/Mo, 15 req/s
- **Mega** ($39/Mo) — 1,282,000 calls/Mo, 40 req/s

## Endpoints

### ORing

#### `GET /v1/gland` — Recommended gland

**Parameters:**
- `cross_section` (query, required, string) — O-ring cross-section Example: `0.139`
- `application` (query, optional, string) — static or dynamic (default static) Example: `static`
- `target_squeeze_percent` (query, optional, string) — Target squeeze % (overrides application)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/oring-api/v1/gland?cross_section=0.139&application=static"
```

**Response:**
```json
{
    "data": {
        "note": "Groove depth = cross-section × (1 − target squeeze); width sized for ~70 % fill (typically 1.3–1.5 × cross-section). Static seals run more squeeze (~20 %), dynamic less (~12 %) to limit friction and wear. Break groove corners to a small radius.",
        "inputs": {
            "application": "static",
            "cross_section": 0.139,
            "target_squeeze_percent": 20
        },
        "gland_depth": 0.1112,
        "groove_width": 0.1949,
        "corner_radius_max": 0.0139,
        "groove_width_ratio": 1.4
    },
    "meta": {
        "timestamp": "2026-06-06T07:13:59.434Z",
        "request_id": "9efe78fd-ed59-4460-9631-d0e27fda3c4a"
    },
    "status": "ok",
    "message": "Gland design",
    "success": true
}
```

#### `GET /v1/squeeze` — Squeeze % + gland fill

**Parameters:**
- `cross_section` (query, required, string) — O-ring cross-section (CS/W) Example: `0.139`
- `gland_depth` (query, required, string) — Groove depth Example: `0.113`
- `groove_width` (query, optional, string) — Groove width (for gland fill %) Example: `0.19`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/oring-api/v1/squeeze?cross_section=0.139&gland_depth=0.113&groove_width=0.19"
```

**Response:**
```json
{
    "data": {
        "note": "Squeeze = (cross-section − gland depth) ÷ cross-section. Aim ~10–16 % for dynamic and ~15–30 % for static seals. Gland fill should stay ≤ ~85 % so the o-ring has room to expand from heat or fluid swell.",
        "inputs": {
            "gland_depth": 0.113,
            "cross_section": 0.139
        },
        "fill_ok": true,
        "assessment": "good for static seals",
        "groove_width": 0.19,
        "squeeze_amount": 0.026,
        "squeeze_percent": 18.71,
        "gland_fill_percent": 70.68
    },
    "meta": {
        "timestamp": "2026-06-06T07:13:59.523Z",
        "request_id": "71b70849-5a2b-4701-a1dc-86c5ab980c29"
    },
    "status": "ok",
    "message": "O-ring squeeze",
    "success": true
}
```

#### `GET /v1/stretch` — Installation stretch

**Parameters:**
- `inner_diameter` (query, required, string) — O-ring inner diameter (ID) Example: `1.0`
- `mating_diameter` (query, required, string) — Rod / groove mating diameter Example: `1.03`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/oring-api/v1/stretch?inner_diameter=1.0&mating_diameter=1.03"
```

**Response:**
```json
{
    "data": {
        "note": "Stretch = (mating diameter − o-ring ID) ÷ ID. Keep ID stretch on a rod under ~5 %; stretch thins the cross-section (reducing squeeze), so pick an ID close to the groove. Bore/face seals compress the OD instead.",
        "inputs": {
            "inner_diameter": 1,
            "mating_diameter": 1.03
        },
        "assessment": "good — within the usual ≤ 5 % limit",
        "stretch_percent": 3
    },
    "meta": {
        "timestamp": "2026-06-06T07:13:59.604Z",
        "request_id": "cc36217e-32e5-409b-ae4a-f83a25534b50"
    },
    "status": "ok",
    "message": "Installation stretch",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Work in inches or millimetres (one unit per call). Squeeze ~10–16 % dynamic / 15–30 % static; gland fill ≤ ~85 %; ID stretch ≤ ~5 %. Design aid — confirm against the seal maker's gland tables and the fluid/temperature.",
        "service": "oring-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/gland": "Recommended gland depth and groove width for a cross-section and application.",
            "GET /v1/squeeze": "Squeeze % and gland fill from cross-section, gland depth and groove width.",
            "GET /v1/stretch": "Installation stretch % of the inner diameter over a mating diameter."
        },
        "description": "O-ring seal-design maths: squeeze & gland fill, recommended gland (groove) from cross-section, and installation stretch."
    },
    "meta": {
        "timestamp": "2026-06-06T07:13:59.696Z",
        "request_id": "e875abfe-e32f-47f5-b9d8-d968caa68b73"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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