# RC Filter API
> First-order RC and RL passive-filter design as an API, computed locally and deterministically. The lowpass and highpass endpoints take a resistor and capacitor (RC) or a resistor and inductor (RL) and return the −3 dB cutoff frequency (fc = 1/(2πRC) for RC, R/(2πL) for RL), the time constant (τ = RC or L/R) and the angular cutoff; pass a frequency as well and they add the magnitude response as a linear gain and in decibels and the phase shift in degrees — a 1 kΩ / 1 µF low-pass has fc ≈ 159.15 Hz, and right at the cutoff the gain is −3.01 dB with −45° phase for a low-pass or +45° for a high-pass. The component endpoint solves the missing one of fc, R and C from the other two (fc = 1/(2πRC)), so you can size a resistor or capacitor for a target cutoff. All quantities are SI: ohms, farads, henries and hertz. Everything is computed locally and deterministically, so it is instant and private. Ideal for electronics, audio, embedded, signal-processing and EE-education app developers, filter-design and circuit-sizing tools, and maker software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is first-order single-pole filter design; for full RLC impedance and resonance use an impedance API and for stored capacitor energy a capacitor 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/rcfilter-api/..."
```

## Pricing
- **Free** (Free) — 4,600 calls/Mo, 2 req/s
- **Starter** ($6/Mo) — 46,000 calls/Mo, 6 req/s
- **Pro** ($16/Mo) — 215,000 calls/Mo, 15 req/s
- **Mega** ($49/Mo) — 1,290,000 calls/Mo, 40 req/s

## Endpoints

### Filter

#### `GET /v1/component` — Solve fc, R or C

**Parameters:**
- `fc` (query, optional, string) — Target cutoff (Hz) Example: `159.155`
- `r` (query, optional, string) — Resistance R (ohm)
- `c` (query, optional, string) — Capacitance C (farad) Example: `0.000001`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rcfilter-api/v1/component?fc=159.155&c=0.000001"
```

**Response:**
```json
{
    "data": {
        "note": "RC relation fc = 1/(2πRC). Resistance in ohms, capacitance in farads, frequency in hertz.",
        "inputs": {
            "c": 1.0e-6,
            "fc": 159.155
        },
        "resistance_ohm": 999.99964244
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:30.541Z",
        "request_id": "9c709aa1-40b4-43c4-9d29-053a9153d2e0"
    },
    "status": "ok",
    "message": "Solve fc/R/C",
    "success": true
}
```

#### `GET /v1/highpass` — RC/RL high-pass filter

**Parameters:**
- `r` (query, optional, string) — Resistance R (ohm) Example: `1000`
- `c` (query, optional, string) — Capacitance C (farad) Example: `0.000001`
- `l` (query, optional, string) — Inductance L (henry, for RL)
- `frequency` (query, optional, string) — Frequency for gain/phase (Hz) Example: `159.155`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rcfilter-api/v1/highpass?r=1000&c=0.000001&frequency=159.155"
```

**Response:**
```json
{
    "data": {
        "gain": 0.70710691,
        "note": "First-order high-pass: fc = 1/(2πRC) (RC) or R/(2πL) (RL); |H| = (f/fc)/√(1+(f/fc)²); at fc the gain is −3.01 dB and phase +45°.",
        "inputs": {
            "c": 1.0e-6,
            "r": 1000
        },
        "gain_db": -3.010298,
        "topology": "RC",
        "phase_deg": 44.99999,
        "filter_type": "highpass",
        "at_frequency_hz": 159.155,
        "time_constant_s": 0.001,
        "cutoff_frequency_hz": 159.15494309,
        "angular_cutoff_rad_s": 1000
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:30.663Z",
        "request_id": "0706e461-0092-427d-b6dd-3c947a9e5068"
    },
    "status": "ok",
    "message": "RC/RL high-pass filter",
    "success": true
}
```

#### `GET /v1/lowpass` — RC/RL low-pass filter

**Parameters:**
- `r` (query, optional, string) — Resistance R (ohm) Example: `1000`
- `c` (query, optional, string) — Capacitance C (farad) Example: `0.000001`
- `l` (query, optional, string) — Inductance L (henry, for RL)
- `frequency` (query, optional, string) — Frequency for gain/phase (Hz) Example: `159.155`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/rcfilter-api/v1/lowpass?r=1000&c=0.000001&frequency=159.155"
```

**Response:**
```json
{
    "data": {
        "gain": 0.70710665,
        "note": "First-order low-pass: fc = 1/(2πRC) (RC) or R/(2πL) (RL); |H| = 1/√(1+(f/fc)²); at fc the gain is −3.01 dB and phase −45°.",
        "inputs": {
            "c": 1.0e-6,
            "r": 1000
        },
        "gain_db": -3.010302,
        "topology": "RC",
        "phase_deg": -45.00001,
        "filter_type": "lowpass",
        "at_frequency_hz": 159.155,
        "time_constant_s": 0.001,
        "cutoff_frequency_hz": 159.15494309,
        "angular_cutoff_rad_s": 1000
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:30.768Z",
        "request_id": "49f0cc64-ca90-4467-944f-38d8675039c5"
    },
    "status": "ok",
    "message": "RC/RL low-pass filter",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "R in ohms, C in farads, L in henries, frequency in hertz. First-order single-pole filters; for full RLC impedance use an impedance API and for stored capacitor energy a capacitor API.",
        "service": "rcfilter-api",
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/lowpass": "Low-pass cutoff, time constant, and (optional) gain/phase at a frequency.",
            "GET /v1/highpass": "High-pass cutoff, time constant, and (optional) gain/phase at a frequency.",
            "GET /v1/component": "Solve the missing one of fc, R, C (RC: fc = 1/(2πRC))."
        },
        "description": "First-order RC/RL passive filter design: cutoff frequency, time constant, magnitude and phase response, and component solving."
    },
    "meta": {
        "timestamp": "2026-06-05T19:50:30.861Z",
        "request_id": "9c49a2bd-a1f6-4bd4-93f9-7768c6e0c822"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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