# OEE Manufacturing API
> Overall Equipment Effectiveness (OEE) and lean-manufacturing maths as an API, computed locally and deterministically — the factory-floor productivity metric behind TPM and continuous improvement. The oee endpoint takes the planned production time, downtime, the total and good piece counts and the ideal cycle time (seconds per piece, or an ideal rate in pieces per minute) and returns the three factors and their product: Availability = run time / planned time, Performance = ideal time for the parts made / run time, Quality = good / total, and OEE = Availability × Performance × Quality — the textbook example of a 420-minute shift with 47 minutes down, 19,271 parts and 423 rejects lands exactly on 74.79 % (88.81 % × 86.11 % × 97.80 %). It also breaks out the six-big-losses view: availability loss, performance (speed) loss in parts, quality loss and the fully-productive part count. The takt endpoint gives the takt time = available time / customer demand (the drumbeat the line must match), the required rate, and — given a cycle time or a total work content — the line capacity, utilisation, whether it meets demand and the minimum number of workstations with the line-balancing efficiency. Everything is computed locally and deterministically, so it is instant and private. Ideal for manufacturing, smart-factory, MES, IoT-dashboard and lean/TPM app developers, production-line monitoring and continuous-improvement tools, and industrial-engineering training. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 2 compute endpoints. This is OEE and takt maths; for equipment reliability/MTBF use a reliability 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/oee-api/..."
```

## Pricing
- **Free** (Free) — 3,650 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 40,500 calls/Mo, 6 req/s
- **Pro** ($16/Mo) — 201,000 calls/Mo, 15 req/s
- **Mega** ($50/Mo) — 1,160,000 calls/Mo, 40 req/s

## Endpoints

### OEE

#### `GET /v1/oee` — OEE: availability × performance × quality

**Parameters:**
- `planned_time` (query, required, string) — Planned production time (min) Example: `420`
- `downtime` (query, optional, string) — Downtime (min) Example: `47`
- `total_count` (query, required, string) — Total pieces produced Example: `19271`
- `good_count` (query, optional, string) — Good pieces (or reject_count) Example: `18848`
- `reject_count` (query, optional, string) — Reject pieces
- `ideal_cycle_time` (query, optional, string) — Ideal cycle time (sec/piece)
- `ideal_rate` (query, optional, string) — Ideal rate (pieces/min) Example: `60`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/oee-api/v1/oee?planned_time=420&downtime=47&total_count=19271&good_count=18848&ideal_rate=60"
```

**Response:**
```json
{
    "data": {
        "oee": 0.747937,
        "note": "OEE = Availability × Performance × Quality. Availability = run/planned; Performance = ideal time for parts made / run time; Quality = good/total. 85% is world-class; 60% is typical.",
        "inputs": {
            "downtime": 47,
            "run_time": 373,
            "good_count": 18848,
            "ideal_rate": 60,
            "total_count": 19271,
            "planned_time": 420
        },
        "losses": {
            "quality_loss_count": 423,
            "availability_loss_min": 47,
            "fully_productive_count": 25200,
            "performance_loss_count": 3109
        },
        "quality": 0.97805,
        "oee_percent": 74.7937,
        "performance": 0.861081,
        "availability": 0.888095,
        "quality_percent": 97.805,
        "performance_capped": false,
        "performance_percent": 86.1081,
        "availability_percent": 88.8095
    },
    "meta": {
        "timestamp": "2026-06-05T21:48:48.226Z",
        "request_id": "331b9183-f5e6-4214-84bf-58f0da5f8029"
    },
    "status": "ok",
    "message": "OEE",
    "success": true
}
```

#### `GET /v1/takt` — Takt time & line balancing

**Parameters:**
- `available_time` (query, required, string) — Available time (min) Example: `28800`
- `demand` (query, required, string) — Customer demand (units) Example: `600`
- `cycle_time` (query, optional, string) — Actual cycle time (same unit) Example: `40`
- `work_content` (query, optional, string) — Total work content (same unit)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/oee-api/v1/takt?available_time=28800&demand=600&cycle_time=40"
```

**Response:**
```json
{
    "data": {
        "note": "Takt time = available time / customer demand — the drumbeat the line must match. Cycle time must be ≤ takt to keep up.",
        "inputs": {
            "demand": 600,
            "available_time": 28800
        },
        "capacity": 720,
        "takt_time": 48,
        "cycle_time": 40,
        "meets_demand": true,
        "utilization_percent": 83.3333,
        "cycle_vs_takt_percent": 83.3333,
        "required_rate_per_time": 0.020833
    },
    "meta": {
        "timestamp": "2026-06-05T21:48:48.311Z",
        "request_id": "61a1c8a9-da95-4041-b7ab-8050789eda5e"
    },
    "status": "ok",
    "message": "Takt time",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Times in minutes; ideal cycle time in seconds/piece (or ideal_rate in pieces/min). OEE multiplies three rates each in 0–1. For reliability/MTBF use a reliability API.",
        "service": "oee-api",
        "endpoints": {
            "GET /v1/oee": "Availability, Performance, Quality and OEE from planned time, downtime, counts and ideal rate.",
            "GET /v1/meta": "This document.",
            "GET /v1/takt": "Takt time, required rate, capacity vs demand and workstation count."
        },
        "description": "Overall Equipment Effectiveness (OEE) and lean-manufacturing maths: availability/performance/quality, the six big losses, takt time and line balancing."
    },
    "meta": {
        "timestamp": "2026-06-05T21:48:48.408Z",
        "request_id": "6f4aef20-8538-4d83-a9b4-4a6762b46c55"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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