# Voltage Drop API
> Cable voltage-drop and conductor-sizing maths as an API, computed locally and deterministically. The drop endpoint computes the voltage lost along a cable run from the current, the one-way run length, the conductor cross-section and the material: the conductor resistance R = ρ·L/A, the voltage drop Vd = k·I·R (k = 2 for single-phase, √3 for three-phase), the drop as a percentage of the supply and the voltage left at the load. The sizing endpoint works backwards: from an allowable percentage drop it returns the minimum conductor cross-section needed, A ≥ k·I·ρ·L/Vd_allow, rounds up to the next standard cable size (1.5, 2.5, 4, 6, 10, 16, 25 … mm²) and reports the actual drop at that size. The power endpoint computes the power dissipated as heat in the cable, P = N·I²·R (N = 2 or 3 current-carrying conductors), and the cable efficiency given a load power. Copper (ρ = 0.0172) and aluminium (ρ = 0.0282 Ω·mm²/m) are supported. Everything is computed locally and deterministically, so it is instant and private. Ideal for electrical-installation and panel-design tools, cable selection to wiring-regulation limits, solar, EV-charger and sub-main sizing, and electrical-engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is cable voltage drop and sizing; for Ohm's law, reactance and resonance use an Ohm's-law API and for transformer ratios use a transformer 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/voltagedrop-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 2 req/s
- **Starter** ($9/Mo) — 20,000 calls/Mo, 5 req/s
- **Pro** ($24/Mo) — 120,000 calls/Mo, 15 req/s
- **Mega** ($75/Mo) — 641,000 calls/Mo, 40 req/s

## Endpoints

### Voltage Drop

#### `GET /v1/drop` — Voltage drop over a run

**Parameters:**
- `current` (query, required, string) — Load current I (A) Example: `20`
- `length` (query, required, string) — One-way run length L (m) Example: `30`
- `area` (query, required, string) — Conductor cross-section A (mm²) Example: `4`
- `material` (query, optional, string) — copper | aluminium (default copper) Example: `copper`
- `phases` (query, optional, string) — 1 or 3 (default 1) Example: `1`
- `voltage` (query, optional, string) — Supply voltage (V) for percentage Example: `230`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/voltagedrop-api/v1/drop?current=20&length=30&area=4&material=copper&phases=1&voltage=230"
```

**Response:**
```json
{
    "data": {
        "note": "Vd = k·I·(ρL/A), k = 2 single-phase, √3 three-phase. Resistive only; reactance and temperature derating ignored.",
        "inputs": {
            "area": 4,
            "length": 30,
            "phases": 1,
            "current": 20,
            "material": "copper"
        },
        "voltage_drop_v": 5.16,
        "voltage_at_load_v": 224.84,
        "voltage_drop_percent": 2.2435,
        "conductor_resistance_ohm": 0.129
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:26.661Z",
        "request_id": "e533ebda-e7e3-445e-b2e0-a70abe626066"
    },
    "status": "ok",
    "message": "Voltage drop",
    "success": true
}
```

#### `GET /v1/power` — Cable power loss

**Parameters:**
- `current` (query, required, string) — Load current I (A) Example: `20`
- `length` (query, required, string) — One-way run length L (m) Example: `30`
- `area` (query, required, string) — Conductor cross-section A (mm²) Example: `4`
- `material` (query, optional, string) — copper | aluminium (default copper) Example: `copper`
- `phases` (query, optional, string) — 1 or 3 (default 1) Example: `1`
- `load_power` (query, optional, string) — Load power (W) for efficiency Example: `5000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/voltagedrop-api/v1/power?current=20&length=30&area=4&material=copper&phases=1&load_power=5000"
```

**Response:**
```json
{
    "data": {
        "note": "P_loss = N·I²·R with N = 2 (single-phase) or 3 (three-phase) current-carrying conductors.",
        "inputs": {
            "area": 4,
            "length": 30,
            "phases": 1,
            "current": 20,
            "material": "copper"
        },
        "load_power_w": 5000,
        "power_loss_w": 103.2,
        "cable_efficiency_percent": 97.9777,
        "conductor_resistance_ohm": 0.129
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:26.758Z",
        "request_id": "8550d794-e479-497c-9a67-cc75893f0698"
    },
    "status": "ok",
    "message": "Cable power loss",
    "success": true
}
```

#### `GET /v1/sizing` — Conductor sizing

**Parameters:**
- `current` (query, required, string) — Load current I (A) Example: `20`
- `length` (query, required, string) — One-way run length L (m) Example: `30`
- `voltage` (query, required, string) — Supply voltage (V) Example: `230`
- `max_drop_percent` (query, optional, string) — Allowable drop (%, default 3) Example: `3`
- `material` (query, optional, string) — copper | aluminium (default copper) Example: `copper`
- `phases` (query, optional, string) — 1 or 3 (default 1) Example: `1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/voltagedrop-api/v1/sizing?current=20&length=30&voltage=230&max_drop_percent=3&material=copper&phases=1"
```

**Response:**
```json
{
    "data": {
        "note": "A ≥ k·I·ρ·L/Vd_allow. Recommended size is the next standard cross-section ≥ the requirement.",
        "inputs": {
            "length": 30,
            "phases": 1,
            "current": 20,
            "voltage": 230,
            "material": "copper",
            "max_drop_percent": 3
        },
        "allowable_drop_v": 6.9,
        "required_area_mm2": 2.9913,
        "actual_drop_v_at_standard": 5.16,
        "recommended_standard_size_mm2": 4,
        "actual_drop_percent_at_standard": 2.2435
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:26.868Z",
        "request_id": "e9c098cd-7d26-4cb1-a43d-7f9ca1abf485"
    },
    "status": "ok",
    "message": "Conductor sizing",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Current in A, length (one-way) in m, area in mm², voltage in V. Resistivity ρ at 20°C: copper 0.0172, aluminium 0.0282 Ω·mm²/m. Resistive model only — line reactance and temperature derating are not included.",
        "service": "voltagedrop-api",
        "formulae": {
            "power_loss": "P = N·I²·R,  N = 2 or 3 conductors",
            "resistance": "R = ρ·L/A  (one-way)",
            "voltage_drop": "Vd = k·I·R,  k = 2 (single-phase), √3 (three-phase)"
        },
        "endpoints": {
            "GET /v1/drop": "Voltage drop, percentage and voltage at the load over a cable run.",
            "GET /v1/meta": "This document.",
            "GET /v1/power": "Power dissipated in the cable and the resulting efficiency.",
            "GET /v1/sizing": "Smallest standard conductor cross-section for an allowable percentage drop."
        },
        "description": "Cable voltage-drop and conductor-sizing calculator: voltage drop over a run, conductor cross-section for an allowable drop, and cable power loss for copper and aluminium."
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:26.964Z",
        "request_id": "d3c019f9-092e-4893-b867-bd73e38ab1e5"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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