# Specific Heat API
> Calorimetry (specific-heat) maths as an API, computed locally and deterministically. The heat endpoint applies the sensible-heat equation Q = m·c·ΔT — the heat energy equals the mass times the specific heat times the temperature change — and solves for whichever of the four quantities you leave out, taking the temperature change directly or as the difference of an initial and final temperature, and the specific heat directly or from a built-in material (water, ice, aluminium, copper, steel, glass, ethanol and more); it reports the heat in joules, kilojoules, calories, kilocalories and watt-hours. The mix endpoint finds the equilibrium temperature when two bodies at different temperatures are brought into thermal contact, Tf = (m1·c1·T1 + m2·c2·T2) / (m1·c1 + m2·c2), with the heat transferred, for the same or different materials. The materials endpoint lists typical specific heats. Use SI units — mass in kilograms, specific heat in joules per kilogram-kelvin, temperatures in °C or K (the difference is the same). Everything is computed locally and deterministically, so it is instant and private. Ideal for physics and chemistry education, thermal-engineering and HVAC tools, cooking and brewing apps, and material-science calculators. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is calorimetry; for the ideal gas law use a gas-law 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/specificheat-api/..."
```

## Pricing
- **Free** (Free) — 2,000 calls/Mo, 2 req/s
- **Starter** ($5/Mo) — 25,000 calls/Mo, 5 req/s
- **Pro** ($15/Mo) — 150,000 calls/Mo, 15 req/s
- **Mega** ($45/Mo) — 773,000 calls/Mo, 40 req/s

## Endpoints

### Calorimetry

#### `GET /v1/heat` — Q = m·c·ΔT solver

**Parameters:**
- `heat` (query, optional, string) — Heat Q (J)
- `mass` (query, optional, string) — Mass (kg) Example: `1`
- `specific_heat` (query, optional, string) — Specific heat c (J/kg·K)
- `material` (query, optional, string) — water|aluminium|copper|… (instead of c) Example: `water`
- `delta_t` (query, optional, string) — Temperature change ΔT Example: `60`
- `initial_temperature` (query, optional, string) — Or initial temperature
- `final_temperature` (query, optional, string) — And final temperature

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/specificheat-api/v1/heat?mass=1&material=water&delta_t=60"
```

**Response:**
```json
{
    "data": {
        "mass": 1,
        "joules": 251160,
        "delta_t": 60,
        "formula": "Q = m·c·ΔT.",
        "calories": 60028.6807,
        "kilojoules": 251.16,
        "solved_for": "heat",
        "watt_hours": 69.766667,
        "kilocalories": 60.028681,
        "specific_heat": 4186,
        "specific_heat_source": "water"
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:57.599Z",
        "request_id": "dc320df5-3136-4452-a15e-11ec761246bc"
    },
    "status": "ok",
    "message": "Q = m·c·ΔT solver",
    "success": true
}
```

#### `GET /v1/materials` — Specific heat reference

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

**Response:**
```json
{
    "data": {
        "note": "Typical specific heats at around room temperature, J/(kg·K). Pass material=<name> or an explicit specific_heat.",
        "specific_heat_J_per_kgK": {
            "air": 1005,
            "ice": 2090,
            "oil": 2000,
            "gold": 129,
            "iron": 449,
            "lead": 128,
            "sand": 830,
            "soil": 800,
            "wood": 1700,
            "zinc": 387,
            "brass": 380,
            "glass": 840,
            "steam": 2010,
            "steel": 466,
            "water": 4186,
            "copper": 385,
            "silver": 235,
            "ethanol": 2440,
            "granite": 790,
            "mercury": 140,
            "aluminum": 900,
            "concrete": 880,
            "aluminium": 900
        }
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:57.703Z",
        "request_id": "120da7b9-918c-4fd4-90a0-7ee30c9c0659"
    },
    "status": "ok",
    "message": "Specific heat reference",
    "success": true
}
```

#### `GET /v1/mix` — Equilibrium temperature

**Parameters:**
- `mass_1` (query, required, string) — Mass of body 1 (kg) Example: `2`
- `temperature_1` (query, required, string) — Temperature of body 1 Example: `90`
- `mass_2` (query, required, string) — Mass of body 2 (kg) Example: `1`
- `temperature_2` (query, required, string) — Temperature of body 2 Example: `20`
- `material` (query, optional, string) — Common material (or 1_material & 2_material) Example: `water`
- `specific_heat` (query, optional, string) — Or common specific heat

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/specificheat-api/v1/mix?mass_1=2&temperature_1=90&mass_2=1&temperature_2=20&material=water"
```

**Response:**
```json
{
    "data": {
        "note": "Assumes a perfectly insulated system with no phase change; heat lost by the hotter body equals heat gained by the colder.",
        "body_1": {
            "mass": 2,
            "temperature": 90,
            "specific_heat": 4186
        },
        "body_2": {
            "mass": 1,
            "temperature": 20,
            "specific_heat": 4186
        },
        "formula": "Tf = (m1·c1·T1 + m2·c2·T2) / (m1·c1 + m2·c2).",
        "equilibrium_temperature": 66.666667,
        "heat_transferred_to_body_1": {
            "joules": -195346.6667,
            "calories": -46688.9739,
            "kilojoules": -195.346667,
            "watt_hours": -54.262963,
            "kilocalories": -46.688974
        }
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:57.811Z",
        "request_id": "98cd4fdd-33dd-42b0-9774-0431300c4d2b"
    },
    "status": "ok",
    "message": "Equilibrium temperature of two bodies",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "api": "specificheat",
        "note": "Calorimetry (specific-heat) maths — computed locally and deterministically, no key, no third-party service. SI: kg, J/(kg·K), °C/K.",
        "endpoints": [
            "/v1/heat",
            "/v1/mix",
            "/v1/materials",
            "/v1/meta"
        ],
        "materials": [
            "water",
            "ice",
            "steam",
            "aluminium",
            "aluminum",
            "copper",
            "iron",
            "steel",
            "lead",
            "gold",
            "silver",
            "zinc",
            "brass",
            "mercury",
            "glass",
            "concrete",
            "wood",
            "air",
            "ethanol",
            "oil",
            "granite",
            "sand",
            "soil"
        ]
    },
    "meta": {
        "timestamp": "2026-06-04T10:18:57.904Z",
        "request_id": "08fafe3a-e294-4698-8618-07316934245f"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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