# Transmission Line API
> Transmission-line RF maths as an API, computed locally and deterministically for a lossless line. The input-impedance endpoint transforms a complex load impedance along a line, Zin = Z0·(ZL + jZ0·tanβl)/(Z0 + jZL·tanβl), from the characteristic impedance, the load resistance and reactance and the electrical length in degrees — a quarter-wave (90°) line inverts the load to Z0²/ZL while a half-wave (180°) line repeats it, which is the basis of impedance matching. The quarter-wave endpoint computes the characteristic impedance Z0 = √(Z1·Z2) of a quarter-wave transformer that matches two real impedances, exact at one frequency. The electrical-length endpoint converts a physical line length to its electrical length in wavelengths, degrees and radians at a frequency, using the on-line wavelength λ = vf·c/f with a velocity factor for the dielectric. Impedances are in ohms (the load split into resistance and reactance), electrical length in degrees, physical length in metres and frequency in hertz. Everything is computed locally and deterministically, so it is instant and private. Ideal for RF, antenna-matching, PCB, radar and microwave app developers, stub-matching and transformer-design tools, and electromagnetics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is line impedance transformation; for SWR and return loss use a VSWR API and for microstrip trace geometry a PCB 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/transmissionline-api/..."
```

## Pricing
- **Free** (Free) — 2,450 calls/Mo, 2 req/s
- **Starter** ($10/Mo) — 40,500 calls/Mo, 6 req/s
- **Pro** ($26/Mo) — 258,000 calls/Mo, 15 req/s
- **Mega** ($81/Mo) — 1,710,000 calls/Mo, 40 req/s

## Endpoints

### TransmissionLine

#### `GET /v1/electrical-length` — Electrical length

**Parameters:**
- `length` (query, required, string) — Physical length (m) Example: `0.05`
- `frequency` (query, required, string) — Frequency (Hz) Example: `3000000000`
- `velocity_factor` (query, optional, string) — Velocity factor (0–1) Example: `0.66`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/transmissionline-api/v1/electrical-length?length=0.05&frequency=3000000000&velocity_factor=0.66"
```

**Response:**
```json
{
    "data": {
        "note": "Wavelength on the line λ = vf·c/f (velocity factor accounts for the dielectric). Electrical length = physical length / λ, in wavelengths, degrees and radians.",
        "inputs": {
            "length_m": 0.05,
            "frequency_hz": 3000000000,
            "velocity_factor": 0.66
        },
        "wavelength_m": 0.065954341,
        "electrical_length_deg": 272.916078,
        "electrical_length_rad": 4.76328414,
        "length_in_wavelengths": 0.7581
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:29.779Z",
        "request_id": "d2df8516-58ad-4370-a19b-c1cab8ee496a"
    },
    "status": "ok",
    "message": "Electrical length",
    "success": true
}
```

#### `GET /v1/input-impedance` — Input impedance

**Parameters:**
- `characteristic_impedance` (query, required, string) — Z0 (Ω) Example: `50`
- `load_resistance` (query, required, string) — Load resistance RL (Ω) Example: `100`
- `load_reactance` (query, optional, string) — Load reactance XL (Ω) Example: `0`
- `electrical_length_deg` (query, required, string) — Electrical length βl (deg) Example: `45`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/transmissionline-api/v1/input-impedance?characteristic_impedance=50&load_resistance=100&load_reactance=0&electrical_length_deg=45"
```

**Response:**
```json
{
    "data": {
        "note": "Lossless-line transform Zin = Z0·(ZL + jZ0·tanβl)/(Z0 + jZL·tanβl). A quarter-wave line (90°) inverts the load to Z0²/ZL; a half-wave line (180°) repeats it.",
        "inputs": {
            "load_reactance": 0,
            "load_resistance": 100,
            "electrical_length_deg": 45,
            "characteristic_impedance": 50
        },
        "input_reactance": -30,
        "input_resistance": 40,
        "input_impedance_magnitude": 50
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:29.893Z",
        "request_id": "0a7a133c-23a1-45f1-9c43-d269980be8cf"
    },
    "status": "ok",
    "message": "Input impedance",
    "success": true
}
```

#### `GET /v1/quarter-wave` — Quarter-wave transformer

**Parameters:**
- `source_impedance` (query, required, string) — Source impedance Z1 (Ω) Example: `50`
- `load_impedance` (query, required, string) — Load impedance Z2 (Ω) Example: `100`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/transmissionline-api/v1/quarter-wave?source_impedance=50&load_impedance=100"
```

**Response:**
```json
{
    "data": {
        "note": "A quarter-wave (90°) transformer of characteristic impedance Z0 = √(Z1·Z2) matches two real impedances. It only matches resistive loads and is exact at one frequency.",
        "inputs": {
            "load_impedance": 100,
            "source_impedance": 50
        },
        "transformer_impedance": 70.710678
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:29.972Z",
        "request_id": "549932d3-9356-4d74-a64e-fabf43a44992"
    },
    "status": "ok",
    "message": "Quarter-wave transformer",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Impedances in Ω (load as resistance + reactance), electrical length in degrees, physical length in m, frequency in Hz. Lossless line. Velocity factor 0–1 (default 1).",
        "service": "transmissionline-api",
        "formulae": {
            "wavelength": "λ = vf·c/f",
            "quarter_wave": "Z0' = √(Z1·Z2)",
            "input_impedance": "Zin = Z0·(ZL + jZ0·tanβl)/(Z0 + jZL·tanβl)"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/quarter-wave": "Quarter-wave transformer impedance to match two real impedances.",
            "GET /v1/input-impedance": "Input impedance of a line from Z0, the complex load and the electrical length.",
            "GET /v1/electrical-length": "Electrical length (wavelengths/degrees) from physical length, frequency and velocity factor."
        },
        "description": "Transmission-line calculator: input impedance of a loaded lossless line, quarter-wave matching-transformer impedance, and physical-to-electrical length conversion."
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:30.069Z",
        "request_id": "65e33f9e-4427-48bb-997a-d21859ca31a7"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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