# Heatsink Thermal API
> Heatsink and thermal-resistance maths for electronics as an API, computed locally and deterministically. The junction endpoint computes the junction temperature of a component from its power dissipation, the ambient temperature and the thermal-resistance chain, Tj = Ta + P·(Rθjc + Rθcs + Rθsa) — junction-to-case, case-to-sink (the interface material) and sink-to-ambient — and also reports the case and sink temperatures and, given a maximum junction temperature, the headroom. The required endpoint solves the largest heatsink thermal resistance you may use to stay under a junction limit, Rθsa = (Tj_max − Ta)/P − Rθjc − Rθcs, and flags when no heatsink can do it. The power endpoint gives the maximum power a device can dissipate for a given thermal path, P = (Tj_max − Ta)/Rθtotal. Everything is computed locally and deterministically, so it is instant and private. Ideal for electronics, power-supply and PCB-design app developers, heatsink selection and thermal-budget tools, and engineering education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is conduction thermal-resistance; for convective Newton cooling use a cooling 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/heatsink-api/..."
```

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

## Endpoints

### Heatsink

#### `GET /v1/junction` — Junction temperature

**Parameters:**
- `power` (query, required, string) — Power dissipation (W) Example: `10`
- `ambient_temp` (query, required, string) — Ambient temperature (°C) Example: `25`
- `rth_jc` (query, optional, string) — Junction-to-case Rθ (°C/W) Example: `0.5`
- `rth_cs` (query, optional, string) — Case-to-sink Rθ (°C/W) Example: `0.2`
- `rth_sa` (query, optional, string) — Sink-to-ambient Rθ (°C/W) Example: `2.0`
- `tj_max` (query, optional, string) — Max junction temp (°C) for headroom Example: `125`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/heatsink-api/v1/junction?power=10&ambient_temp=25&rth_jc=0.5&rth_cs=0.2&rth_sa=2.0&tj_max=125"
```

**Response:**
```json
{
    "data": {
        "note": "Tj = Ta + P·(Rθjc + Rθcs + Rθsa). Each thermal resistance adds a temperature rise of P×Rθ along the path.",
        "inputs": {
            "power": 10,
            "rth_cs": 0.2,
            "rth_jc": 0.5,
            "rth_sa": 2,
            "ambient_temp": 25
        },
        "tj_max": 125,
        "headroom_c": 73,
        "within_limit": true,
        "case_temperature_c": 47,
        "sink_temperature_c": 45,
        "junction_temperature_c": 52,
        "total_thermal_resistance": 2.7
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:12.143Z",
        "request_id": "8b11d4bc-1a48-473c-b9b7-03b6f70a3dce"
    },
    "status": "ok",
    "message": "Junction temperature",
    "success": true
}
```

#### `GET /v1/power` — Max power dissipation

**Parameters:**
- `tj_max` (query, required, string) — Max junction temp (°C) Example: `125`
- `ambient_temp` (query, required, string) — Ambient temperature (°C) Example: `25`
- `rth_total` (query, optional, string) — Total Rθ (°C/W) Example: `2.7`
- `rth_jc` (query, optional, string) — Or component Rθjc
- `rth_cs` (query, optional, string) — Rθcs
- `rth_sa` (query, optional, string) — Rθsa

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/heatsink-api/v1/power?tj_max=125&ambient_temp=25&rth_total=2.7"
```

**Response:**
```json
{
    "data": {
        "note": "Max power = (Tj_max − Ta)/Rθtotal. The most a device can dissipate without exceeding its junction limit.",
        "inputs": {
            "tj_max": 125,
            "ambient_temp": 25,
            "total_thermal_resistance": 2.7
        },
        "max_power_w": 37.037
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:12.260Z",
        "request_id": "52d1a617-d18b-4e30-b9cb-4ccdae3e969f"
    },
    "status": "ok",
    "message": "Max power",
    "success": true
}
```

#### `GET /v1/required` — Required heatsink Rth

**Parameters:**
- `tj_max` (query, required, string) — Max junction temp (°C) Example: `125`
- `ambient_temp` (query, required, string) — Ambient temperature (°C) Example: `40`
- `power` (query, required, string) — Power dissipation (W) Example: `10`
- `rth_jc` (query, optional, string) — Junction-to-case Rθ (°C/W) Example: `0.5`
- `rth_cs` (query, optional, string) — Case-to-sink Rθ (°C/W) Example: `0.2`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/heatsink-api/v1/required?tj_max=125&ambient_temp=40&power=10&rth_jc=0.5&rth_cs=0.2"
```

**Response:**
```json
{
    "data": {
        "note": "Choose a heatsink with a sink-to-ambient thermal resistance at or below this value. Rθsa = (Tj_max − Ta)/P − Rθjc − Rθcs.",
        "inputs": {
            "power": 10,
            "rth_cs": 0.2,
            "rth_jc": 0.5,
            "tj_max": 125,
            "ambient_temp": 40
        },
        "feasible": true,
        "required_rth_sa": 7.8
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:12.369Z",
        "request_id": "1c8719e2-c0d1-46cb-bc6c-bef21fa11064"
    },
    "status": "ok",
    "message": "Required heatsink Rth",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Power in watts, temperatures in °C, thermal resistances in °C/W (K/W). jc = junction-to-case, cs = case-to-sink (interface), sa = sink-to-ambient. Steady-state conduction model.",
        "service": "heatsink-api",
        "formulae": {
            "power": "P = (Tj_max − Ta)/Rθtotal",
            "junction": "Tj = Ta + P·(Rθjc + Rθcs + Rθsa)",
            "required": "Rθsa = (Tj_max − Ta)/P − Rθjc − Rθcs"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/power": "Maximum power dissipation for a thermal path.",
            "GET /v1/junction": "Junction (and case/sink) temperature from power, ambient and the Rθ chain.",
            "GET /v1/required": "Maximum allowable heatsink Rθsa to stay under a junction limit."
        },
        "description": "Heatsink / thermal-resistance calculator: junction temperature, required heatsink thermal resistance, and maximum power dissipation."
    },
    "meta": {
        "timestamp": "2026-06-04T18:38:12.470Z",
        "request_id": "b64707b5-a214-4e11-a4da-dbba65f39ee4"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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