Back

#compost

1 APIs with this tag

Composting API

Composting maths as an API, computed locally and deterministically — the three numbers that decide whether a pile heats up and breaks down or sits there cold and smelly. The cn-ratio endpoint blends a mix to its carbon-to-nitrogen ratio: pass each material by weight with its dry-weight %C and %N as parallel comma-separated lists and it returns the total carbon and nitrogen masses and the blended C:N, with an assessment against the ideal 25–35:1 — ten parts dry leaves (50 %C, 1 %N) with ten parts grass clippings (45 %C, 2.5 %N) comes out at a near-perfect 27:1. The moisture endpoint works out the water to add to reach a target moisture (the pile should be a wrung-out-sponge 50–60 %): from the current mass and moisture it holds the dry matter constant, so 100 kg at 30 % needs about 56 kg of water to reach 55 %, and it flags a too-wet pile that needs drying instead. The mix endpoint gives the brown:green weight ratio to hit a target C:N from two materials' %C and %N — leaves and grass at a target 30:1 want about 1.5 parts browns to 1 part greens. Everything is computed locally and deterministically, so it is instant and private. Ideal for gardening and composting apps, master-composter and allotment tools, regenerative-ag and soil-health sites, and waste-diversion calculators. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. For material volume use a mulch API; for NPK application rates use a fertilizer API.

api.oanor.com/compost-api