# Quarter Mile Drag API
> Quarter-mile drag-strip maths as an API, computed locally and deterministically — the classic empirical estimates a racer, tuner or car enthusiast uses to relate a car's power and weight to its performance. The et endpoint gives the predicted elapsed time and trap speed from flywheel horsepower and race weight using the standard formulas — ET = 5.825 × (weight ÷ hp) raised to the one-third, trap speed = 234 × (hp ÷ weight) raised to the one-third — so a 3,000 lb car with 300 hp is predicted to run about 12.6 seconds at 109 mph, assuming a competent launch and decent traction. The horsepower endpoint runs it in reverse: because trap speed is set by power-to-weight and barely by the launch, hp ≈ weight × (trap ÷ 234) cubed is a popular way to estimate flywheel power straight off a timeslip. The power-to-weight endpoint gives the ratio that actually decides acceleration — in horsepower per pound, horsepower per ton and watts per kilogram, the cleanest cross-unit figure — with a performance class from commuter through hot hatch and supercar to hypercar, because a light 200 hp car can beat a heavy 400 hp one. Everything is computed locally and deterministically, so it is instant and private. Ideal for drag-racing and tuner apps, car-spec and comparison tools, automotive enthusiasts and motorsport dashboards. Pure local computation — no key, no third-party service, instant. Empirical estimates assuming a good launch and traction — not a timeslip. 3 compute endpoints. For aerodynamic drag use a drag API; for gearing use a gear-ratio 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/quartermile-api/..."
```

## Pricing
- **Free** (Free) — 6,700 calls/Mo, 2 req/s
- **Starter** ($10/Mo) — 71,000 calls/Mo, 6 req/s
- **Pro** ($32/Mo) — 295,000 calls/Mo, 15 req/s
- **Mega** ($98/Mo) — 1,420,000 calls/Mo, 40 req/s

## Endpoints

### Drag

#### `GET /v1/et` — ET and trap speed from power and weight

**Parameters:**
- `horsepower_hp` (query, required, string) — Flywheel horsepower (hp) Example: `300`
- `weight_lb` (query, required, string) — Race weight incl. driver (lb) Example: `3000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/quartermile-api/v1/et?horsepower_hp=300&weight_lb=3000"
```

**Response:**
```json
{
    "data": {
        "note": "The standard drag-strip estimates: ET = 5.825 × (weight ÷ hp)^⅓ and trap speed = 234 × (hp ÷ weight)^⅓, with weight the full race weight including the driver and hp at the flywheel. They assume a competent launch and decent traction — a car that spins or bogs runs slower, while sticky tyres and a good 60-foot time beat the formula. Treat them as a sanity check, not a timeslip.",
        "inputs": {
            "weight_lb": 3000,
            "horsepower_hp": 300
        },
        "trap_speed_mph": 108.6,
        "quarter_mile_et_s": 12.55
    },
    "meta": {
        "timestamp": "2026-06-06T23:53:55.108Z",
        "request_id": "f4faa325-601a-4e40-986c-1206eb823301"
    },
    "status": "ok",
    "message": "ET / trap speed",
    "success": true
}
```

#### `GET /v1/horsepower` — Estimate horsepower from a trap speed

**Parameters:**
- `trap_speed_mph` (query, required, string) — Measured trap speed (mph) Example: `108.6`
- `weight_lb` (query, required, string) — Race weight incl. driver (lb) Example: `3000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/quartermile-api/v1/horsepower?trap_speed_mph=108.6&weight_lb=3000"
```

**Response:**
```json
{
    "data": {
        "note": "Trap speed reflects power far better than ET does, because it is set by power-to-weight and barely by the launch — so hp ≈ weight × (trap ÷ 234)³ is a popular way to estimate flywheel power from a timeslip. It is an estimate: aero, altitude and the exact weight all shift it, but two runs at very different traps with the same weight really do differ in power.",
        "inputs": {
            "weight_lb": 3000,
            "trap_speed_mph": 108.6
        },
        "estimated_horsepower_hp": 300
    },
    "meta": {
        "timestamp": "2026-06-06T23:53:55.177Z",
        "request_id": "491aedb9-422c-4f40-820c-5108f4e58361"
    },
    "status": "ok",
    "message": "Horsepower estimate",
    "success": true
}
```

#### `GET /v1/power-to-weight` — Power-to-weight ratio with class

**Parameters:**
- `horsepower_hp` (query, required, string) — Flywheel horsepower (hp) Example: `300`
- `weight_lb` (query, required, string) — Weight (lb) Example: `3000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/quartermile-api/v1/power-to-weight?horsepower_hp=300&weight_lb=3000"
```

**Response:**
```json
{
    "data": {
        "kw": 223.7,
        "note": "Power-to-weight, not raw power, decides acceleration: a light 200 hp car can outrun a heavy 400 hp one. W/kg is the cleanest cross-unit figure (a hot hatch is ~120–180 W/kg, a supercar 250+). Shedding weight helps everywhere — acceleration, braking and cornering — while extra power only helps in a straight line.",
        "inputs": {
            "weight_lb": 3000,
            "horsepower_hp": 300
        },
        "w_per_kg": 164.4,
        "hp_per_lb": 0.1,
        "weight_kg": 1360.8,
        "hp_per_ton": 200,
        "performance_class": "hot hatch / sports car"
    },
    "meta": {
        "timestamp": "2026-06-06T23:53:55.275Z",
        "request_id": "69ba06b7-5a79-401f-9699-fa556383c6c7"
    },
    "status": "ok",
    "message": "Power-to-weight",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "US units (hp, lb, mph). ET = 5.825·(wt/hp)^⅓; trap = 234·(hp/wt)^⅓; hp ≈ wt·(trap/234)³. Empirical estimates assuming a good launch and traction — not a timeslip. For aerodynamic drag use a drag API; for gearing use a gear-ratio API.",
        "service": "quartermile-api",
        "endpoints": {
            "GET /v1/et": "ET and trap speed from flywheel horsepower and race weight.",
            "GET /v1/meta": "This document.",
            "GET /v1/horsepower": "Estimate horsepower from a measured trap speed and weight.",
            "GET /v1/power-to-weight": "Power-to-weight ratio (hp/lb, hp/ton, W/kg) with a class."
        },
        "description": "Quarter-mile drag-strip maths: elapsed time and trap speed from power and weight, horsepower from a trap speed, and power-to-weight ratio."
    },
    "meta": {
        "timestamp": "2026-06-06T23:53:55.348Z",
        "request_id": "7a1430c6-dd0a-4786-a82a-41ff9543b733"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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