# Tire Calculator API
> Tire maths as an API, computed locally and deterministically — the size, pressure and speedometer numbers a driver, fitter or fleet manager works out before fitting a tyre. The size endpoint turns a P-metric spec into the real dimensions: overall diameter = rim + 2 × the sidewall (section width × aspect ratio), so a 225/45R17 stands about 25 inches tall, rolls a 78-inch circumference and turns roughly 808 times a mile — the numbers behind fitment, gearing and clearance. The pressure endpoint gives the hot pressure from a cold pressure and the temperature change, because pressure tracks absolute temperature (P2/P1 = T2/T1), about +1 psi per 10 °F — so 32 psi set cold at 70 °F reads ~34.6 after warming to 100 °F, and drops on a cold morning, which is what trips the warning light. The speedo-error endpoint gives the speedometer error and true speed from a tyre-size change: a taller tyre makes the speedo read low, so actual speed = indicated × new diameter ÷ old — go up 4 % and 60 on the dial is really 62.5. Everything is computed locally and deterministically, so it is instant and private. Ideal for tyre-shop and fitment apps, fleet and 4x4 build tools, speedo-recalibration calculators, and automotive sites. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. Estimates — always set pressure cold to the placard.

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

## Pricing
- **Free** (Free) — 600 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 15,500 calls/Mo, 8 req/s
- **Pro** ($16/Mo) — 95,000 calls/Mo, 20 req/s
- **Mega** ($49/Mo) — 310,000 calls/Mo, 48 req/s

## Endpoints

### Tire

#### `GET /v1/pressure` — Hot pressure from temperature

**Parameters:**
- `cold_pressure_psi` (query, required, string) — Cold (set) pressure in psi Example: `32`
- `cold_temp_f` (query, required, string) — Cold temperature °F Example: `70`
- `hot_temp_f` (query, required, string) — Hot/operating temperature °F Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/tire-api/v1/pressure?cold_pressure_psi=32&cold_temp_f=70&hot_temp_f=100"
```

#### `GET /v1/size` — Overall tire size

**Parameters:**
- `width_mm` (query, required, string) — Section width in mm Example: `225`
- `aspect_ratio` (query, required, string) — Aspect ratio (%) Example: `45`
- `rim_diameter_in` (query, required, string) — Rim diameter in inches Example: `17`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/tire-api/v1/size?width_mm=225&aspect_ratio=45&rim_diameter_in=17"
```

#### `GET /v1/speedo-error` — Speedometer error from size change

**Parameters:**
- `old_diameter_in` (query, required, string) — Old overall diameter in inches Example: `24.97`
- `new_diameter_in` (query, required, string) — New overall diameter in inches Example: `26`
- `indicated_speed` (query, optional, string) — Indicated speed (default 60) Example: `60`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/tire-api/v1/speedo-error?old_diameter_in=24.97&new_diameter_in=26&indicated_speed=60"
```

### Meta

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

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


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