# Waveguide API
> Rectangular-waveguide microwave maths as an API, computed locally and deterministically. The cutoff endpoint computes the cutoff frequency fc = (c/2)·√((m/a)²+(n/b)²) and cutoff wavelength of any TEmn or TMmn mode of a rectangular waveguide of inner width a and height b — below the cutoff a mode is evanescent and cannot propagate, and for the usual a > b the dominant mode is TE10 with fc = c/(2a). The guide-wavelength endpoint computes, at an operating frequency, the free-space wavelength, the guide wavelength λg = λ0/√(1−(fc/f)²) which is longer than free space, and the phase velocity (greater than c) and group velocity (the energy speed, below c). The modes endpoint lists every mode that propagates at a given frequency, sorted by cutoff, and identifies the dominant mode — so single-mode operation needs the frequency between the first and second cutoffs. Dimensions are in millimetres and frequencies in gigahertz, with c = 299,792,458 m/s. Everything is computed locally and deterministically, so it is instant and private. Ideal for RF, microwave, radar, satellite and antenna-feed app developers, waveguide-band and component-design tools, and electromagnetics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is metallic rectangular waveguide; for optical-fibre guiding use a fibre API and for SWR 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/waveguide-api/..."
```

## Pricing
- **Free** (Free) — 2,550 calls/Mo, 2 req/s
- **Starter** ($11/Mo) — 39,500 calls/Mo, 6 req/s
- **Pro** ($28/Mo) — 255,000 calls/Mo, 15 req/s
- **Mega** ($84/Mo) — 1,740,000 calls/Mo, 40 req/s

## Endpoints

### Waveguide

#### `GET /v1/cutoff` — Cutoff frequency

**Parameters:**
- `width` (query, required, string) — Inner width a (mm) Example: `22.86`
- `height` (query, required, string) — Inner height b (mm) Example: `10.16`
- `m` (query, optional, string) — Mode index m Example: `1`
- `n` (query, optional, string) — Mode index n Example: `0`
- `mode_type` (query, optional, string) — TE or TM Example: `TE`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/waveguide-api/v1/cutoff?width=22.86&height=10.16&m=1&n=0&mode_type=TE"
```

**Response:**
```json
{
    "data": {
        "mode": "TE10",
        "note": "Cutoff frequency fc = (c/2)·√((m/a)²+(n/b)²). Below fc the mode is evanescent (cannot propagate). For the usual a > b, the dominant mode is TE10 with fc = c/(2a).",
        "inputs": {
            "m": 1,
            "n": 0,
            "width_mm": 22.86,
            "height_mm": 10.16,
            "mode_type": "TE"
        },
        "cutoff_frequency_ghz": 6.55714,
        "cutoff_wavelength_mm": 45.72
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:30.205Z",
        "request_id": "70a99c7f-718e-4159-a4e7-e83cac769e42"
    },
    "status": "ok",
    "message": "Cutoff frequency",
    "success": true
}
```

#### `GET /v1/guide-wavelength` — Guide wavelength

**Parameters:**
- `width` (query, required, string) — Inner width a (mm) Example: `22.86`
- `height` (query, required, string) — Inner height b (mm) Example: `10.16`
- `frequency` (query, required, string) — Frequency (GHz) Example: `10`
- `m` (query, optional, string) — Mode index m Example: `1`
- `n` (query, optional, string) — Mode index n Example: `0`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/waveguide-api/v1/guide-wavelength?width=22.86&height=10.16&frequency=10&m=1&n=0"
```

**Response:**
```json
{
    "data": {
        "mode": "TE10",
        "note": "λg = λ0/√(1−(fc/f)²); phase velocity exceeds c while group velocity (energy/signal speed) stays below c. The guide wavelength is longer than free space.",
        "inputs": {
            "m": 1,
            "n": 0,
            "width_mm": 22.86,
            "height_mm": 10.16,
            "frequency_ghz": 10
        },
        "propagating": true,
        "group_velocity_ms": 226346105.331,
        "phase_velocity_ms": 397071192.111,
        "guide_wavelength_mm": 39.707119,
        "cutoff_frequency_ghz": 6.55714,
        "free_space_wavelength_mm": 29.979246
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:30.324Z",
        "request_id": "ba353bc9-e7f7-48dd-b2f9-61f620469623"
    },
    "status": "ok",
    "message": "Guide wavelength",
    "success": true
}
```

#### `GET /v1/modes` — Propagating modes

**Parameters:**
- `width` (query, required, string) — Inner width a (mm) Example: `22.86`
- `height` (query, required, string) — Inner height b (mm) Example: `10.16`
- `frequency` (query, required, string) — Frequency (GHz) Example: `15`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/waveguide-api/v1/modes?width=22.86&height=10.16&frequency=15"
```

**Response:**
```json
{
    "data": {
        "note": "All modes whose cutoff is at or below the operating frequency propagate. The lowest-cutoff mode is the dominant mode; single-mode operation needs the frequency between the first and second cutoffs.",
        "inputs": {
            "width_mm": 22.86,
            "height_mm": 10.16,
            "frequency_ghz": 15
        },
        "mode_count": 3,
        "dominant_mode": "TE10",
        "propagating_modes": [
            {
                "mode": "TE10",
                "cutoff_ghz": 6.5571
            },
            {
                "mode": "TE20",
                "cutoff_ghz": 13.1143
            },
            {
                "mode": "TE01",
                "cutoff_ghz": 14.7536
            }
        ]
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:30.406Z",
        "request_id": "8422bf50-a544-4ae0-a571-7c982aed35c2"
    },
    "status": "ok",
    "message": "Propagating modes",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Dimensions in mm, frequencies in GHz. For a > b the dominant mode is TE10, fc = c/(2a). c = 299792458 m/s.",
        "service": "waveguide-api",
        "formulae": {
            "cutoff": "fc = (c/2)·√((m/a)² + (n/b)²)",
            "velocities": "vp = c/√(1−(fc/f)²) ; vg = c·√(1−(fc/f)²)",
            "guide_wavelength": "λg = λ0/√(1 − (fc/f)²)"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/modes": "All propagating modes at a frequency, with the dominant mode.",
            "GET /v1/cutoff": "Cutoff frequency and wavelength of a TEmn/TMmn mode.",
            "GET /v1/guide-wavelength": "Guide wavelength, phase and group velocity at a frequency."
        },
        "description": "Rectangular-waveguide calculator: cutoff frequency of a TE/TM mode, guide wavelength and phase/group velocity at an operating frequency, and the list of propagating modes."
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:30.496Z",
        "request_id": "844c9f59-b999-4165-b8dd-79dd91d2198e"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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