# Meat Curing API
> Meat-curing and charcuterie maths as an API, computed locally and deterministically — the cure, salt and nitrite numbers a home charcutier or butcher works to, with the safety check that matters most. The cure endpoint plans an equilibrium dry cure from the meat weight: cure grams = target ppm × meat ÷ (0.0625 × 1,000,000), so about 2.5 g of Cure #1 per kilogram lands on the classic 156 ppm of nitrite (well under the 200 ppm ingoing limit), plus the salt and sugar as a configurable percentage of the meat, the salt the cure blend itself carries, and — with Cure #2 — the added nitrate for long-aged salami. The brine endpoint sizes a wet brine: salt = water × salinity %, with the salometer degrees (a saturated 26.45 % brine is 100°), and an optional cure dose returning the nitrite ppm spread over the meat and brine for an equilibrium brine. Cure #1 is 6.25 % sodium nitrite; Cure #2 adds 4 % nitrate. Everything is computed locally and deterministically, so it is instant and private. Ideal for charcuterie, butchery, smoking, sausage-making and food-craft app developers, cure-calculator and recipe tools, and culinary training. Pure local computation — no key, no third-party service, instant. Metric: grams, millilitres, percent. Live, nothing stored. 2 compute endpoints. THIS IS A CALCULATION AID — always follow a tested, approved curing recipe; nitrite is toxic in excess.

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

## Pricing
- **Free** (Free) — 5,650 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 56,000 calls/Mo, 6 req/s
- **Pro** ($10/Mo) — 234,000 calls/Mo, 15 req/s
- **Mega** ($33/Mo) — 1,340,000 calls/Mo, 40 req/s

## Endpoints

### Curing

#### `GET /v1/brine` — Wet brine

**Parameters:**
- `water` (query, required, string) — Water (ml ≈ g) Example: `4000`
- `salinity_percent` (query, required, string) — Salt % of water Example: `5`
- `cure_grams` (query, optional, string) — Cure added (for ppm)
- `meat_weight` (query, optional, string) — Meat weight (equilibrium ppm)
- `cure_type` (query, optional, string) — Cure type 1 or 2 Example: `1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/curing-api/v1/brine?water=4000&salinity_percent=5&cure_type=1"
```

**Response:**
```json
{
    "data": {
        "note": "Wet brine: salt = water × salinity%. A 100° (saturated) brine is 26.45% salt by weight; salometer ° ≈ salinity% / 0.2645.",
        "inputs": {
            "water": 4000,
            "salinity_percent": 5
        },
        "salt_grams": 200,
        "brine_salometer_degrees": 18.9
    },
    "meta": {
        "timestamp": "2026-06-05T22:57:24.865Z",
        "request_id": "c6f2097f-ad0b-4c3a-b083-328a8450b2a5"
    },
    "status": "ok",
    "message": "Wet brine",
    "success": true
}
```

#### `GET /v1/cure` — Equilibrium dry cure

**Parameters:**
- `meat_weight` (query, required, string) — Meat weight (g) Example: `1000`
- `target_ppm` (query, optional, string) — Target nitrite ppm (default 156, max 200) Example: `156`
- `salt_percent` (query, optional, string) — Salt % of meat (default 2.5) Example: `2.5`
- `sugar_percent` (query, optional, string) — Sugar % of meat Example: `1`
- `cure_type` (query, optional, string) — Cure type 1 (nitrite) or 2 (+nitrate) Example: `1`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/curing-api/v1/cure?meat_weight=1000&target_ppm=156&salt_percent=2.5&sugar_percent=1&cure_type=1"
```

**Response:**
```json
{
    "data": {
        "note": "Equilibrium dry cure: cure grams = target ppm × meat / (0.0625 × 1e6) — about 2.5 g of Cure #1 per kg gives 156 ppm. Salt and sugar are a % of the meat weight; the cure blend's own salt is subtracted.",
        "inputs": {
            "cure_type": "Cure #1",
            "target_ppm": 156,
            "meat_weight": 1000,
            "salt_percent": 2.5,
            "sugar_percent": 1
        },
        "cure_grams": 2.496,
        "nitrate_ppm": 0,
        "nitrite_ppm": 156,
        "sugar_grams": 10,
        "added_salt_grams": 22.66,
        "total_salt_grams": 25,
        "within_safe_limit": true
    },
    "meta": {
        "timestamp": "2026-06-05T22:57:24.956Z",
        "request_id": "a837b032-356b-4c19-b301-b500bc691fd0"
    },
    "status": "ok",
    "message": "Dry cure",
    "success": true
}
```

### Meta

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

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

**Response:**
```json
{
    "data": {
        "notes": "Metric: grams, millilitres, percent. Cure #1 is 6.25% sodium nitrite; the US ingoing limit is 200 ppm and a common target is 156. THIS IS A CALCULATION AID — always follow a tested, approved curing recipe; nitrite is toxic in excess.",
        "service": "curing-api",
        "endpoints": {
            "GET /v1/cure": "Cure #1/#2, salt and sugar grams for an equilibrium dry cure to a target nitrite ppm.",
            "GET /v1/meta": "This document.",
            "GET /v1/brine": "Salt (and optional cure) for a wet brine at a target salinity, with salometer degrees."
        },
        "description": "Meat-curing / charcuterie maths: equilibrium dry cure and wet brine with cure (nitrite/nitrate) and salt doses, and the resulting nitrite ppm vs the safe limit."
    },
    "meta": {
        "timestamp": "2026-06-05T22:57:25.041Z",
        "request_id": "b5ff79e8-a5ec-471c-bb25-46e330137ef8"
    },
    "status": "ok",
    "message": "Meta",
    "success": true
}
```


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