# Bolt Torque API
> Bolt and fastener torque maths as an API, using the standard short-form relation T = K · D · F — torque equals the nut factor times the bolt diameter times the clamp load (preload). The torque endpoint computes the tightening torque, in newton-metres, foot-pounds, inch-pounds and kilogram-force metres, from the bolt diameter, the target clamp load and a nut factor — given directly or chosen from a condition preset (dry, lubricated, zinc-plated, galvanized, waxed and more). The preload endpoint solves the inverse: the clamp load a given torque produces on a bolt of a given diameter and friction. The convert endpoint converts a torque value between newton-metres, foot-pounds, inch-pounds and kilogram-force metres. Everything is computed locally and deterministically, so it is instant and private. The K·D·F short form is an estimate that depends heavily on friction — it is engineering guidance only, so always follow the manufacturer's torque specification. Ideal for mechanical, automotive and aerospace tools, maker and assembly apps, maintenance and field-service software, and engineering calculators. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is fastener torque; for wire gauge and resistance use a wire-gauge API and for Ohm's law use an electronics 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/torque-api/..."
```

## Pricing
- **Free** (Free) — 10,835 calls/Mo, 2 req/s
- **Starter** ($12/Mo) — 20,450 calls/Mo, 8 req/s
- **Pro** ($32/Mo) — 254,500 calls/Mo, 20 req/s
- **Mega** ($70/Mo) — 1,315,000 calls/Mo, 50 req/s

## Endpoints

### Torque

#### `GET /v1/convert` — Convert torque units

**Parameters:**
- `value` (query, required, string) — Torque value Example: `100`
- `from` (query, required, string) — nm|ftlb|inlb|kgfm Example: `nm`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/torque-api/v1/convert?value=100&from=nm"
```

**Response:**
```json
{
    "data": {
        "note": "Torque unit conversion relative to newton-metres.",
        "input": {
            "from": "nm",
            "value": 100
        },
        "torque": {
            "nm": 100,
            "ft_lb": 73.7562,
            "in_lb": 885.075,
            "kgf_m": 10.19716
        }
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:19.699Z",
        "request_id": "bffe2b12-4af6-47cf-b877-da0ca343307c"
    },
    "status": "ok",
    "message": "Torque unit conversion",
    "success": true
}
```

#### `GET /v1/preload` — Clamp load from torque

**Parameters:**
- `torque` (query, required, string) — Tightening torque Example: `60`
- `torque_unit` (query, optional, string) — nm|ftlb|inlb|kgfm Example: `nm`
- `diameter` (query, required, string) — Bolt diameter Example: `12`
- `diameter_unit` (query, optional, string) — mm|in Example: `mm`
- `condition` (query, optional, string) — Friction condition Example: `dry`
- `k` (query, optional, string) — Or nut factor

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/torque-api/v1/preload?torque=60&torque_unit=nm&diameter=12&diameter_unit=mm&condition=dry"
```

**Response:**
```json
{
    "data": {
        "note": "Clamp load F = T / (K · D). Higher friction (larger K) gives less preload for the same torque.",
        "input": {
            "torque_nm": 60,
            "diameter_m": 0.012,
            "nut_factor": 0.2
        },
        "clamp_load_n": 25000,
        "clamp_load_kn": 25,
        "clamp_load_kgf": 2549.29,
        "clamp_load_lbf": 5620.22
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:19.790Z",
        "request_id": "73c4a12e-d74e-4421-90e1-264e5d8035e4"
    },
    "status": "ok",
    "message": "Clamp load from torque",
    "success": true
}
```

#### `GET /v1/torque` — Tightening torque from clamp load

**Parameters:**
- `diameter` (query, required, string) — Bolt diameter Example: `12`
- `diameter_unit` (query, optional, string) — mm|in (default mm) Example: `mm`
- `preload` (query, required, string) — Clamp load Example: `25000`
- `preload_unit` (query, optional, string) — n|kn|lbf|kgf Example: `n`
- `condition` (query, optional, string) — dry|lubricated|zinc|galvanized|waxed Example: `dry`
- `k` (query, optional, string) — Or explicit nut factor

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/torque-api/v1/torque?diameter=12&diameter_unit=mm&preload=25000&preload_unit=n&condition=dry"
```

**Response:**
```json
{
    "data": {
        "note": "T = K · D · F (nut factor × bolt diameter × clamp load). Default K = 0.2 (dry steel). Guidance only — use the maker's spec.",
        "input": {
            "preload_n": 25000,
            "diameter_m": 0.012,
            "nut_factor": 0.2
        },
        "torque": {
            "nm": 60,
            "ft_lb": 44.2537,
            "in_lb": 531.045,
            "kgf_m": 6.1183
        }
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:19.890Z",
        "request_id": "0f10fb05-9352-4ebe-a54c-55aca48ffdcd"
    },
    "status": "ok",
    "message": "Tightening torque",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "note": "T = K·D·F short form. Nut factor presets are typical values; engineering guidance only — follow the manufacturer's torque spec.",
        "service": "torque",
        "endpoints": {
            "/v1/torque": "Tightening torque (Nm/ft-lb/in-lb/kgf-m) from bolt diameter, clamp load and nut factor.",
            "/v1/convert": "Convert torque between Nm, ft-lb, in-lb and kgf-m.",
            "/v1/preload": "Clamp load (preload) from a tightening torque and bolt diameter."
        },
        "conditions": [
            "dry",
            "plain",
            "asreceived",
            "steel",
            "zinc",
            "zincplated",
            "galvanized",
            "lightlyrusted",
            "lubricated",
            "oiled",
            "moly",
            "waxed",
            "ptfe",
            "antisize"
        ],
        "description": "Bolt/fastener torque maths: torque from clamp load (T = K·D·F), the inverse clamp load, and torque unit conversion."
    },
    "meta": {
        "timestamp": "2026-06-04T01:59:19.984Z",
        "request_id": "f92f4d81-36b7-419e-9568-0058faf63185"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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