# Resin & Epoxy API
> Casting and epoxy-resin maths as an API, computed locally and deterministically — the mix, coverage and mould-volume numbers a resin artist, crafter or maker pours a project by. The mix endpoint splits a two-part resin by its label ratio: resin = total × A/(A+B), hardener = total × B/(A+B), from whichever quantity you know — the total, the resin or the hardener — so a 2:1 epoxy for 300 ml is 200 + 100, and a 100:45 by-weight system for 100 g of resin needs 45 g of hardener; it keeps your unit (ml, grams, fl oz) and reminds you that some resins mix by volume and others by weight. The coverage endpoint sizes a flood or seal coat: volume = area × thickness, in metric or US units, returned in millilitres, fluid ounces and gallons plus the mass — matching the familiar art-resin rule of about a gallon per 12 ft² at an eighth of an inch. The moldfill endpoint computes the volume of a box, cylinder, sphere or cone mould (a 10×10×5 cm box is 500 ml, 550 g at epoxy’s ~1.1 g/cm³) and subtracts the displacement of anything you embed, so you never over- or under-pour. Everything is computed locally and deterministically, so it is instant and private. Ideal for resin-art, craft, jewelry, model-making, river-table and maker app developers, project-estimator and material-cost tools, and studio software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. For pot life and cure follow the product data sheet.

## 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/resin-api/..."
```

## Pricing
- **Free** (Free) — 7,000 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 56,800 calls/Mo, 6 req/s
- **Pro** ($12/Mo) — 230,000 calls/Mo, 15 req/s
- **Mega** ($37/Mo) — 1,342,000 calls/Mo, 40 req/s

## Endpoints

### Resin

#### `GET /v1/coverage` — Flood/seal-coat volume

**Parameters:**
- `unit` (query, optional, string) — metric or us (default metric) Example: `metric`
- `area_cm2` (query, optional, string) — Area in cm² (metric) Example: `1000`
- `thickness_mm` (query, optional, string) — Thickness in mm (metric) Example: `3`
- `area_sqin` (query, optional, string) — Area in in² (us)
- `thickness_in` (query, optional, string) — Thickness in inches (us)
- `density_g_cm3` (query, optional, string) — Cured density (default 1.1) Example: `1.1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/resin-api/v1/coverage?unit=metric&area_cm2=1000&thickness_mm=3&density_g_cm3=1.1"
```

**Response:**
```json
{
    "data": {
        "note": "Volume = area × thickness. As a sanity check, the common art-resin rule is about 1 US gallon per 12 ft² at 1/8\" — mix a little extra for the cup and the spread. Flood coats are typically 1/8\" (3 mm); seal coats much thinner.",
        "inputs": {
            "unit": "metric",
            "area_cm2": 1000,
            "thickness_mm": 3,
            "density_g_cm3": 1.1
        },
        "mass_g": 330,
        "volume_ml": 300,
        "volume_fl_oz": 10.14,
        "volume_gallons": 0.0793
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:02.527Z",
        "request_id": "985c6fc1-0f9c-4942-bd7d-2861bab51575"
    },
    "status": "ok",
    "message": "Coverage volume",
    "success": true
}
```

#### `GET /v1/mix` — Two-part mix by ratio

**Parameters:**
- `ratio` (query, required, string) — Mix ratio 'A:B' (resin:hardener) Example: `2:1`
- `total_amount` (query, optional, string) — Total amount to make Example: `300`
- `resin_amount` (query, optional, string) — Known resin amount
- `hardener_amount` (query, optional, string) — Known hardener amount

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/resin-api/v1/mix?ratio=2%3A1&total_amount=300"
```

**Response:**
```json
{
    "data": {
        "note": "Mix two parts by the ratio: resin = total × A/(A+B), hardener = total × B/(A+B). Amounts stay in whatever unit you pass (ml, g, fl oz). Many epoxies mix by VOLUME (e.g. 2:1) or by WEIGHT (e.g. 100:45) — use the ratio the label specifies.",
        "total": 300,
        "inputs": {
            "ratio": "2:1"
        },
        "resin_part": 200,
        "ratio_resin": 2,
        "hardener_part": 100,
        "ratio_hardener": 1
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:02.629Z",
        "request_id": "0a63d69d-7cc4-426d-af63-ba7d6571a600"
    },
    "status": "ok",
    "message": "Resin mix",
    "success": true
}
```

#### `GET /v1/moldfill` — Mould fill volume

**Parameters:**
- `shape` (query, required, string) — box, cylinder, sphere or cone Example: `box`
- `length_cm` (query, optional, string) — Length (box) Example: `10`
- `width_cm` (query, optional, string) — Width (box) Example: `10`
- `height_cm` (query, optional, string) — Height (box/cylinder/cone) Example: `5`
- `diameter_cm` (query, optional, string) — Diameter (cylinder/sphere/cone)
- `embedded_cm3` (query, optional, string) — Embedded object volume to subtract Example: `0`
- `density_g_cm3` (query, optional, string) — Cured density (default 1.1) Example: `1.1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/resin-api/v1/moldfill?shape=box&length_cm=10&width_cm=10&height_cm=5&embedded_cm3=0&density_g_cm3=1.1"
```

**Response:**
```json
{
    "data": {
        "note": "Mould volume by shape (box L×W×H; cylinder/cone use πD²; sphere πD³/6). Subtract the volume of anything you embed (a displacement measurement works well). 1 cm³ = 1 ml; mass = volume × density (cured epoxy ≈ 1.1 g/cm³).",
        "inputs": {
            "shape": "box",
            "width_cm": 10,
            "height_cm": 5,
            "length_cm": 10,
            "embedded_cm3": 0,
            "density_g_cm3": 1.1
        },
        "resin_mass_g": 550,
        "mold_volume_cm3": 500,
        "resin_volume_ml": 500,
        "resin_volume_cm3": 500,
        "resin_volume_fl_oz": 16.91
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:02.734Z",
        "request_id": "c57c3089-5c74-4e71-9457-5590631ed16a"
    },
    "status": "ok",
    "message": "Mold fill",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Mix amounts stay in your unit (ml/g/fl oz) — use the label's ratio (volume e.g. 2:1, or weight e.g. 100:45). Coverage and mould volume in metric or US units; mass uses density (cured epoxy ≈ 1.1 g/cm³). For pot life and cure schedule follow the product data sheet.",
        "service": "resin-api",
        "endpoints": {
            "GET /v1/mix": "Split a two-part resin by its mix ratio from one known quantity.",
            "GET /v1/meta": "This document.",
            "GET /v1/coverage": "Resin volume to coat a flat area at a thickness.",
            "GET /v1/moldfill": "Resin to fill a box/cylinder/sphere/cone mould, minus embedded objects."
        },
        "description": "Casting/epoxy resin maths: two-part mix by ratio, flood-coat coverage volume, and mould fill volume for common shapes."
    },
    "meta": {
        "timestamp": "2026-06-06T07:14:02.840Z",
        "request_id": "5af8adff-90ec-4537-bcef-f2ba5bacd2d8"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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