# Three-Phase Power API
> Three-phase AC power maths as an API, computed locally and deterministically. The power endpoint solves the three-phase power triangle from the line-to-line voltage, the line current and the power factor — the apparent power S = √3·V_L·I_L in volt-amperes, the real power P = S·cosφ in watts, the reactive power Q = S·sinφ in VAR and the phase angle — or works backwards to find the line current a load draws for a given real power. The wye endpoint gives the star-connection relationships, where the line-to-line voltage is √3 times the phase voltage and the line and phase currents are equal. The delta endpoint gives the delta-connection relationships, where the line and phase voltages are equal and the line current is √3 times the phase current. Supply a line or phase quantity and it returns the rest. Everything is computed locally and deterministically, so it is instant and private. Ideal for electrical, motor, industrial-automation, solar-inverter and building-services app developers, switchboard and motor-sizing tools, and electrical-engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is balanced three-phase power; for the single-phase power triangle use a power-factor API and for voltage drop a voltage-drop 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/threephase-api/..."
```

## Pricing
- **Free** (Free) — 2,500 calls/Mo, 2 req/s
- **Starter** ($9/Mo) — 30,000 calls/Mo, 6 req/s
- **Pro** ($24/Mo) — 150,000 calls/Mo, 15 req/s
- **Mega** ($75/Mo) — 750,000 calls/Mo, 40 req/s

## Endpoints

### Three-Phase

#### `GET /v1/delta` — Delta connection

**Parameters:**
- `line_voltage` (query, optional, string) — Line-to-line voltage (V) Example: `400`
- `phase_voltage` (query, optional, string) — Or phase voltage (V)
- `line_current` (query, optional, string) — Line current (A) Example: `17.32`
- `phase_current` (query, optional, string) — Or phase current (A)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/threephase-api/v1/delta?line_voltage=400&line_current=17.32"
```

**Response:**
```json
{
    "data": {
        "note": "Delta: line-to-line voltage = phase voltage; line current = √3 × phase current.",
        "inputs": [],
        "connection": "delta",
        "line_current_a": 17.32,
        "line_voltage_v": 400,
        "phase_current_a": 9.999707,
        "phase_voltage_v": 400
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:03.815Z",
        "request_id": "fcc64d87-3401-4cd6-9d7b-a595a762de61"
    },
    "status": "ok",
    "message": "Delta",
    "success": true
}
```

#### `GET /v1/power` — Three-phase power

**Parameters:**
- `line_voltage` (query, required, string) — Line-to-line voltage (V) Example: `400`
- `line_current` (query, optional, string) — Line current (A) Example: `10`
- `power_factor` (query, required, string) — Power factor (−1 to 1) Example: `0.8`
- `real_power` (query, optional, string) — Or real power (W) to solve current

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/threephase-api/v1/power?line_voltage=400&line_current=10&power_factor=0.8"
```

**Response:**
```json
{
    "data": {
        "note": "Three-phase: S = √3·V_L·I_L, P = S·cosφ, Q = S·sinφ. Uses line (line-to-line) voltage and line current.",
        "inputs": {
            "solved_for": "power",
            "power_factor": 0.8,
            "line_current_a": 10,
            "line_voltage_v": 400
        },
        "real_power_w": 5542.562584,
        "real_power_kw": 5.542562584,
        "phase_angle_deg": 36.869898,
        "apparent_power_va": 6928.20323,
        "apparent_power_kva": 6.92820323,
        "reactive_power_var": 4156.921938,
        "reactive_power_kvar": 4.156921938
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:03.916Z",
        "request_id": "13aa36b0-28bd-4959-984e-09a2568b267e"
    },
    "status": "ok",
    "message": "3-phase power",
    "success": true
}
```

#### `GET /v1/wye` — Star (wye) connection

**Parameters:**
- `line_voltage` (query, optional, string) — Line-to-line voltage (V) Example: `400`
- `phase_voltage` (query, optional, string) — Or phase voltage (V)
- `line_current` (query, optional, string) — Line current (A) Example: `10`
- `phase_current` (query, optional, string) — Or phase current (A)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/threephase-api/v1/wye?line_voltage=400&line_current=10"
```

**Response:**
```json
{
    "data": {
        "note": "Star/wye: line-to-line voltage = √3 × phase voltage; line current = phase current.",
        "inputs": [],
        "connection": "wye (star)",
        "line_current_a": 10,
        "line_voltage_v": 400,
        "phase_current_a": 10,
        "phase_voltage_v": 230.940108
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:04.019Z",
        "request_id": "03b16b54-f386-4015-9fad-caeef023477b"
    },
    "status": "ok",
    "message": "Wye/star",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Voltages in volts, currents in amperes, power factor −1…1. 'Line' voltage is line-to-line. Balanced three-phase loads.",
        "service": "threephase-api",
        "formulae": {
            "wye": "V_L = √3·V_phase, I_L = I_phase",
            "delta": "V_L = V_phase, I_L = √3·I_phase",
            "real_power": "P = √3·V_L·I_L·cosφ",
            "apparent_power": "S = √3·V_L·I_L",
            "reactive_power": "Q = √3·V_L·I_L·sinφ"
        },
        "endpoints": {
            "GET /v1/wye": "Star (wye) connection: VL = √3·Vphase, IL = Iphase.",
            "GET /v1/meta": "This document.",
            "GET /v1/delta": "Delta connection: VL = Vphase, IL = √3·Iphase.",
            "GET /v1/power": "Real/apparent/reactive three-phase power, or solve the line current from a power."
        },
        "description": "Three-phase AC power calculator: real, apparent and reactive power from line voltage, current and power factor, and the line/phase voltage and current relationships for star (wye) and delta connections."
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:04.128Z",
        "request_id": "e9b62757-c226-4f00-af99-8a30bb5256c3"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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