# Bolt Torque API
> Bolted-joint torque, preload and stress maths as an API, computed locally and deterministically for ISO metric fasteners. The torque endpoint applies the torque-tension relation T = K·D·F — the tightening torque equals the nut factor times the nominal diameter times the bolt preload — and solves either way: the torque needed for a target preload, or the preload achieved by a given torque, with the nut factor K capturing the lubrication condition (≈0.20 plain, 0.16 plated, 0.12 lubricated). The stressarea endpoint computes the tensile stress area from the thread geometry, As = π/4·(d − 0.9382·P)² — the effective cross-section that carries the load — together with the nominal shank area and, given a proof or yield stress, the proof and yield loads of the bolt. The preload endpoint sets the clamp force as a percentage of the proof load (75 % is the usual target for reusable joints), F = (percent/100)·σproof·As, and returns the resulting tensile stress and, with a diameter and nut factor, the tightening torque. Grade proof stresses for 8.8, 10.9 and 12.9 bolts are documented. Everything is computed locally and deterministically, so it is instant and private. Ideal for mechanical-design, assembly and maintenance tools, torque-spec generation, fastener selection and structural-bolting apps, and engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is bolt tightening and preload mechanics; for thread pitch/lead geometry use a thread API and for bolt-circle hole patterns use a bolt-circle 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/bolttorque-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 2 req/s
- **Starter** ($9/Mo) — 25,000 calls/Mo, 5 req/s
- **Pro** ($24/Mo) — 150,000 calls/Mo, 15 req/s
- **Mega** ($75/Mo) — 1,000,000 calls/Mo, 40 req/s

## Endpoints

### Bolt

#### `GET /v1/preload` — Preload from proof load

**Parameters:**
- `stress_area` (query, required, string) — Tensile stress area As (mm²) Example: `84.3`
- `proof_stress` (query, required, string) — Proof stress (MPa) — 8.8=580, 10.9=830, 12.9=970 Example: `580`
- `percent` (query, optional, string) — Percent of proof load (default 75) Example: `75`
- `nut_factor` (query, optional, string) — Nut factor K (default 0.20) Example: `0.2`
- `nominal_diameter` (query, optional, string) — Nominal diameter (mm) for torque Example: `12`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bolttorque-api/v1/preload?stress_area=84.3&proof_stress=580&percent=75&nut_factor=0.2&nominal_diameter=12"
```

**Response:**
```json
{
    "data": {
        "note": "Preload F = (percent/100)·σproof·As. Typical target is 75 % of proof for reusable joints.",
        "inputs": {
            "nut_factor": 0.2,
            "stress_area_mm2": 84.3,
            "percent_of_proof": 75,
            "proof_stress_mpa": 580
        },
        "proof_load_n": 48894,
        "target_preload_n": 36670.5,
        "target_preload_kn": 36.6705,
        "tensile_stress_mpa": 435,
        "nominal_diameter_mm": 12,
        "tightening_torque_nm": 88.0092
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:35.178Z",
        "request_id": "1cb415d9-35f9-4c45-ab12-5cc6ea46044d"
    },
    "status": "ok",
    "message": "Preload from proof",
    "success": true
}
```

#### `GET /v1/stressarea` — Tensile stress area

**Parameters:**
- `nominal_diameter` (query, required, string) — Nominal diameter d (mm) Example: `12`
- `pitch` (query, required, string) — Thread pitch P (mm) Example: `1.75`
- `proof_stress` (query, optional, string) — Proof stress (MPa) for proof load Example: `580`
- `yield_stress` (query, optional, string) — Yield stress (MPa) for yield load

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bolttorque-api/v1/stressarea?nominal_diameter=12&pitch=1.75&proof_stress=580"
```

**Response:**
```json
{
    "data": {
        "note": "As = π/4·(d − 0.9382·P)² (ISO metric). Load (N) = stress (MPa) × As (mm²).",
        "inputs": {
            "pitch_mm": 1.75,
            "nominal_diameter_mm": 12
        },
        "proof_load_n": 48874.49,
        "nominal_area_mm2": 113.0973,
        "effective_diameter_mm": 10.3582,
        "tensile_stress_area_mm2": 84.2664
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:35.291Z",
        "request_id": "ac8d2c1d-6182-48e7-be4b-002bc13eb84a"
    },
    "status": "ok",
    "message": "Tensile stress area",
    "success": true
}
```

#### `GET /v1/torque` — Torque-tension

**Parameters:**
- `nominal_diameter` (query, required, string) — Nominal diameter D (mm) Example: `12`
- `nut_factor` (query, optional, string) — Nut factor K (default 0.20) Example: `0.2`
- `preload` (query, optional, string) — Preload F (N) to solve torque Example: `25000`
- `torque` (query, optional, string) — Or torque (N·m) to solve preload

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/bolttorque-api/v1/torque?nominal_diameter=12&nut_factor=0.2&preload=25000"
```

**Response:**
```json
{
    "data": {
        "mode": "solve_torque",
        "note": "T = K·D·F. K is the nut factor (≈0.20 plain, ≈0.16 zinc-plated, ≈0.12 lubricated).",
        "inputs": {
            "preload_n": 25000,
            "nut_factor": 0.2,
            "nominal_diameter_mm": 12
        },
        "tightening_torque_nm": 60
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:35.398Z",
        "request_id": "8eb767b9-1fd6-46a5-86be-5782e3a2e1b7"
    },
    "status": "ok",
    "message": "Torque-tension",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Diameter and pitch in mm, stress in MPa, force in N, torque in N·m. Nut factor K ≈ 0.20 plain, 0.16 plated, 0.12 lubricated. Idealised — excludes joint stiffness and embedment relaxation.",
        "grades": {
            "8.8": {
                "yield_mpa": 640,
                "tensile_mpa": 800,
                "proof_stress_mpa": 580
            },
            "10.9": {
                "yield_mpa": 940,
                "tensile_mpa": 1040,
                "proof_stress_mpa": 830
            },
            "12.9": {
                "yield_mpa": 1100,
                "tensile_mpa": 1220,
                "proof_stress_mpa": 970
            }
        },
        "service": "bolttorque-api",
        "formulae": {
            "preload": "F = (percent/100)·σproof·As",
            "stress_area": "As = π/4·(d − 0.9382·P)²  (mm²)",
            "tensile_stress": "σ = F/As",
            "torque_tension": "T = K·D·F  (D in m, F in N, T in N·m)"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/torque": "Torque-tension T = K·D·F; solves tightening torque from preload or preload from torque.",
            "GET /v1/preload": "Target preload as a percentage of proof load, with tensile stress and tightening torque.",
            "GET /v1/stressarea": "Tensile stress area from nominal diameter and pitch, plus proof and yield loads."
        },
        "description": "Bolted-joint torque
…(truncated, see openapi.json for full schema)
```


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