# AC Resonance & Reactance API
> AC reactance and LC/RC tuning maths as an API, computed locally and deterministically. The reactance endpoint computes the capacitive reactance Xc = 1/(2πfC) and the inductive reactance Xl = 2πfL at a given frequency, and — when both a capacitor and an inductor are supplied — the net series reactance X = Xl − Xc, whether the circuit looks inductive, capacitive or resonant, and the impedance magnitude. The resonant endpoint computes the LC resonant frequency f₀ = 1/(2π√(LC)), or, given a target frequency and one component, solves the other component you need to tune to it. The cutoff endpoint computes the RC or RL filter cutoff frequency — fc = 1/(2πRC) for RC, fc = R/(2πL) for RL — and the time constant. Frequencies are in hertz; capacitance, inductance and resistance accept SI base units with handy µF/nF/pF and mH/µH inputs. Everything is computed locally and deterministically, so it is instant and private. Ideal for electronics, RF, audio-filter and embedded app developers, tuning and filter-design tools, and electronics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is AC reactance & LC/RC tuning; for LED series-resistor sizing use an LED-resistor API and for VSWR and impedance match use a VSWR 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/resonance-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 25,000 calls/Mo, 5 req/s
- **Pro** ($22/Mo) — 150,000 calls/Mo, 15 req/s
- **Mega** ($69/Mo) — 790,000 calls/Mo, 40 req/s

## Endpoints

### Resonance

#### `GET /v1/cutoff` — RC/RL filter cutoff

**Parameters:**
- `resistance` (query, required, string) — Resistance (Ω) Example: `1000`
- `capacitance_uf` (query, optional, string) — Capacitance (µF) for an RC filter Example: `1`
- `inductance_mh` (query, optional, string) — Or inductance (mH) for an RL filter

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/resonance-api/v1/cutoff?resistance=1000&capacitance_uf=1"
```

**Response:**
```json
{
    "data": {
        "note": "RC filter: fc = 1/(2πRC), τ = RC. Same fc for low-pass and high-pass.",
        "inputs": {
            "capacitance_f": 1.0e-6,
            "resistance_ohm": 1000
        },
        "filter_type": "RC",
        "time_constant_s": 0.001,
        "cutoff_frequency_hz": 159.154943
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:10.322Z",
        "request_id": "c72aee63-d8b8-4b0b-ab49-0ed8546a369e"
    },
    "status": "ok",
    "message": "Filter cutoff",
    "success": true
}
```

#### `GET /v1/reactance` — Reactance at a frequency

**Parameters:**
- `frequency` (query, required, string) — Frequency (Hz) Example: `1000`
- `capacitance_uf` (query, optional, string) — Capacitance (µF) Example: `1`
- `inductance_mh` (query, optional, string) — Inductance (mH) Example: `10`
- `capacitance` (query, optional, string) — Or capacitance (F)
- `inductance` (query, optional, string) — Or inductance (H)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/resonance-api/v1/reactance?frequency=1000&capacitance_uf=1&inductance_mh=10"
```

**Response:**
```json
{
    "data": {
        "note": "Xc = 1/(2πfC), Xl = 2πfL. Net series reactance X = Xl − Xc; |Z| ignores resistance.",
        "inputs": {
            "frequency_hz": 1000,
            "inductance_h": 0.01,
            "capacitance_f": 1.0e-6
        },
        "reactance_type": "capacitive",
        "net_reactance_ohm": -96.32309,
        "impedance_magnitude_ohm": 96.32309,
        "inductive_reactance_ohm": 62.831853,
        "capacitive_reactance_ohm": 159.154943
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:10.421Z",
        "request_id": "bf3a47b8-cce7-46db-8b80-47c6eb2d9610"
    },
    "status": "ok",
    "message": "Reactance",
    "success": true
}
```

#### `GET /v1/resonant` — LC resonant frequency

**Parameters:**
- `inductance_mh` (query, optional, string) — Inductance (mH) Example: `10`
- `capacitance_uf` (query, optional, string) — Capacitance (µF) Example: `1`
- `frequency` (query, optional, string) — Target frequency (Hz) to solve a component

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/resonance-api/v1/resonant?inductance_mh=10&capacitance_uf=1"
```

**Response:**
```json
{
    "data": {
        "note": "f₀ = 1/(2π√(LC)). At resonance the inductive and capacitive reactances cancel.",
        "inputs": {
            "inductance_h": 0.01,
            "capacitance_f": 1.0e-6
        },
        "resonant_frequency_hz": 1591.549431,
        "resonant_frequency_khz": 1.591549,
        "resonant_frequency_mhz": 0.001591549
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:10.546Z",
        "request_id": "840be71d-c87c-499d-b86b-87d147e3478a"
    },
    "status": "ok",
    "message": "LC resonance",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Base SI units: frequency Hz, capacitance F, inductance H, resistance Ω. Convenience inputs accepted: capacitance_uf/_nf/_pf, inductance_mh/_uh.",
        "service": "resonance-api",
        "formulae": {
            "rc_cutoff": "fc = 1/(2πRC), τ = RC",
            "rl_cutoff": "fc = R/(2πL), τ = L/R",
            "lc_resonance": "f₀ = 1/(2π√(LC))",
            "inductive_reactance": "Xl = 2πfL",
            "capacitive_reactance": "Xc = 1/(2πfC)"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/cutoff": "RC or RL filter cutoff frequency and time constant.",
            "GET /v1/resonant": "LC resonant frequency, or solve C or L for a target frequency.",
            "GET /v1/reactance": "Capacitive/inductive reactance at a frequency and net series reactance."
        },
        "description": "AC reactance and LC/RC tuning calculator: capacitive and inductive reactance at a frequency, LC resonant frequency (or solve the missing component), and RC/RL filter cutoff frequency and time constant."
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:10.659Z",
        "request_id": "c3c9c9fc-523a-47eb-88ee-820d659fd4a0"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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