# Soundproofing API
> Building-acoustics soundproofing maths as an API, computed locally and deterministically. The mass-law endpoint computes the sound-transmission loss of a single partition from its surface mass density and the frequency using the field-incidence mass law, TL = 20·log10(m·f) − 47 dB — transmission loss rises about 6 dB for every doubling of mass or of frequency — and also gives the normal-incidence value. The composite endpoint combines the transmission losses of several elements that make up one wall, such as a heavy wall with a window or a door, by area-weighting their transmission coefficients, TL = −10·log10(Σ(Ai·τi)/ΣAi) — which shows how the weakest element, like a small gap or a thin window, dominates and wrecks an otherwise good wall. The transmission endpoint computes the received sound level on the far side of a partition, the source level minus the transmission loss, with an optional room-to-room correction that adds 10·log10(partition area / receiving-room absorption). Surface density is in kg/m², frequency in Hz, levels and transmission losses in dB and areas in m². Everything is computed locally and deterministically, so it is instant and private. Ideal for architecture, building-acoustics, studio-design, HVAC-noise and construction app developers, partition and noise-control tools, and acoustics education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is sound insulation; for room reverberation use a reverberation API and for sound pressure level a sound-level 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/soundproof-api/..."
```

## Pricing
- **Free** (Free) — 2,650 calls/Mo, 2 req/s
- **Starter** ($8/Mo) — 36,500 calls/Mo, 6 req/s
- **Pro** ($22/Mo) — 246,000 calls/Mo, 15 req/s
- **Mega** ($67/Mo) — 1,610,000 calls/Mo, 40 req/s

## Endpoints

### Soundproof

#### `GET /v1/composite` — Composite transmission loss

**Parameters:**
- `areas` (query, required, string) — Comma-separated areas (m²) Example: `9,1`
- `transmission_losses` (query, required, string) — Comma-separated TLs (dB) Example: `45,25`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/soundproof-api/v1/composite?areas=9%2C1&transmission_losses=45%2C25"
```

**Response:**
```json
{
    "data": {
        "note": "Composite TL = −10·log10(Σ(Ai·τi)/ΣAi), τ = 10^(−TL/10). The weakest element dominates — a small gap or window can wreck an otherwise good wall.",
        "inputs": {
            "elements": [
                {
                    "area": 9,
                    "tl_db": 45,
                    "transmission_coefficient": 3.1622776601683795e-5
                },
                {
                    "area": 1,
                    "tl_db": 25,
                    "transmission_coefficient": 0.0031622776601683794
                }
            ]
        },
        "total_area_m2": 10,
        "composite_transmission_loss_db": 34.6257
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:29.333Z",
        "request_id": "c340c564-1777-4b36-abca-6e46cc02aad1"
    },
    "status": "ok",
    "message": "Composite TL",
    "success": true
}
```

#### `GET /v1/mass-law` — Mass-law transmission loss

**Parameters:**
- `surface_density` (query, required, string) — Surface density (kg/m²) Example: `10`
- `frequency` (query, required, string) — Frequency (Hz) Example: `500`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/soundproof-api/v1/mass-law?surface_density=10&frequency=500"
```

**Response:**
```json
{
    "data": {
        "note": "Mass law (field incidence) TL = 20·log10(m·f) − 47 dB. Transmission loss rises ~6 dB per doubling of mass or of frequency. Real partitions deviate near the coincidence dip.",
        "inputs": {
            "frequency_hz": 500,
            "surface_density_kg_m2": 10
        },
        "normal_incidence_db": 31.9794,
        "transmission_loss_db": 26.9794
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:29.433Z",
        "request_id": "8176bc8f-4739-4d6d-b0e1-c1967a2a5544"
    },
    "status": "ok",
    "message": "Mass law TL",
    "success": true
}
```

#### `GET /v1/transmission` — Received level

**Parameters:**
- `source_level` (query, required, string) — Source level (dB) Example: `80`
- `transmission_loss` (query, required, string) — Transmission loss (dB) Example: `35`
- `partition_area` (query, optional, string) — Partition area (m²)
- `receiving_absorption` (query, optional, string) — Receiving-room absorption (m² Sabine)

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/soundproof-api/v1/transmission?source_level=80&transmission_loss=35"
```

**Response:**
```json
{
    "data": {
        "note": "The received level is the source level reduced by the transmission loss; for a room-to-room estimate it adds 10·log10(partition area / receiving-room absorption).",
        "inputs": {
            "source_level_db": 80,
            "partition_area_m2": null,
            "transmission_loss_db": 35,
            "receiving_absorption_m2": null
        },
        "method": "simple (received = source − TL)",
        "received_level_db": 45,
        "level_reduction_db": 35
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:29.494Z",
        "request_id": "3d6aa68e-3cea-41dc-a906-4ce9a9145e62"
    },
    "status": "ok",
    "message": "Received level",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Surface density in kg/m², frequency in Hz, levels and TL in dB, areas in m². Mass law is field-incidence; real walls deviate near the coincidence frequency.",
        "service": "soundproof-api",
        "formulae": {
            "mass_law": "TL = 20·log10(m·f) − 47 dB",
            "composite": "TL = −10·log10(Σ(Ai·τi)/ΣAi)",
            "transmission": "received = source − TL"
        },
        "endpoints": {
            "GET /v1/meta": "This document.",
            "GET /v1/mass-law": "Transmission loss of a single partition from its surface density and frequency.",
            "GET /v1/composite": "Combined TL of a wall made of several elements (e.g. wall plus window).",
            "GET /v1/transmission": "Received sound level through a partition, optionally room-to-room."
        },
        "description": "Soundproofing calculator: mass-law sound-transmission loss of a partition, composite TL of a wall with multiple elements, and the received noise level through a partition."
    },
    "meta": {
        "timestamp": "2026-06-05T11:30:29.593Z",
        "request_id": "8843060a-9e4e-4b9d-a732-38c0adfe9947"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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