# Vegetable Fermentation API
> Vegetable lacto-fermentation maths as an API, computed locally and deterministically — the salt numbers a fermenter weighs sauerkraut, kimchi and pickles by. (Vegetables, not meat — for cure and nitrite that is a separate calculation.) Salt is the whole game: too little and the wrong microbes win, too much and the ferment stalls. The salt endpoint does the dry-salt method for shredded veg, salt = vegetable weight × percent, with about 2 % being the classic sauerkraut and kimchi target — so a kilo of cabbage takes 20 grams — and it bands the result from low-and-fast to a near salt-cure. The brine endpoint sizes a submerged ferment, salt = water weight × percent where the percent is of the water as recipes state it (1 ml water ≈ 1 g), so a litre at 5 % needs 50 grams for a standard sour pickle, 3.5 % for a milder one; it also reports the salinity as a percent of the total solution. The salinity endpoint converts the two ways the same brine is expressed — percent of water versus percent of total — so a 5 %-of-water brine reads about 4.76 % on a refractometer. Everything is computed locally and deterministically, so it is instant and private. Ideal for fermentation, homesteading, recipe and food app developers, ferment-calculator and batch tools, and culinary software. Pure local computation — no key, no third-party service, instant. Grams and ml. Live, nothing stored. 3 compute endpoints.

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

## Pricing
- **Free** (Free) — 6,920 calls/Mo, 2 req/s
- **Starter** ($4/Mo) — 56,400 calls/Mo, 6 req/s
- **Pro** ($12/Mo) — 231,200 calls/Mo, 15 req/s
- **Mega** ($37/Mo) — 1,347,000 calls/Mo, 40 req/s

## Endpoints

### Ferment

#### `GET /v1/brine` — Brine salt for water

**Parameters:**
- `water_g` (query, required, string) — Water weight/volume (g/ml) Example: `1000`
- `brine_percent` (query, optional, string) — Brine % of water (default 5) Example: `5`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fermentation-api/v1/brine?water_g=1000&brine_percent=5"
```

#### `GET /v1/salinity` — Salinity from salt + water

**Parameters:**
- `salt_g` (query, required, string) — Salt (g) Example: `50`
- `water_g` (query, required, string) — Water (g/ml) Example: `1000`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fermentation-api/v1/salinity?salt_g=50&water_g=1000"
```

#### `GET /v1/salt` — Dry salt by vegetable weight

**Parameters:**
- `vegetable_g` (query, required, string) — Vegetable weight (g) Example: `1000`
- `salt_percent` (query, optional, string) — Salt % of veg (default 2) Example: `2`

**Example:**
```bash
curl -H "x-oanor-key: $KEY" \
  "https://api.oanor.com/fermentation-api/v1/salt?vegetable_g=1000&salt_percent=2"
```

### Meta

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

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


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