{"openapi":"3.1.0","info":{"title":"Hydroponics API","version":"1.0.0","description":"Hydroponics and indoor-grow maths as an API, computed locally and deterministically — the nutrient-strength and grow-light numbers a grower dials in every day. The ec endpoint converts between electrical conductivity (EC in mS/cm) and the PPM/TDS reading on whichever scale a meter uses: the 500 (NaCl, US) scale turns EC 2.0 into 1000 ppm, the 700 (KCl) scale into 1400 ppm and the 640 (EU) scale into 1280 — the source of endless confusion between meters. The dli endpoint computes the Daily Light Integral, DLI = PPFD × photoperiod × 3600 ÷ 1,000,000, the total moles of light a crop gets in a day (leafy greens want about 12–17, fruiting crops 20–30+), and reverses it to the PPFD a fixture must deliver to hit a target DLI over a given day length. The reservoir endpoint balances a tank to a target EC: how much plain water to add to dilute a too-strong solution (W = V × (current/target − 1)), or how much concentrated stock to add to raise it. Everything is computed locally and deterministically, so it is instant and private. Ideal for hydroponics, vertical-farming, controlled-environment-agriculture, grow-room and smart-garden app developers, dosing and lighting tools, and horticulture education. Pure local computation — no key, no third-party service, instant. EC in mS/cm, volume in litres, PPFD in µmol/m²/s. Live, nothing stored. 3 compute endpoints. State your TDS scale; confirm with a calibrated meter.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/hydroponics-api","description":"oanor gateway"}],"tags":[{"name":"Hydroponics"},{"name":"Meta"}],"components":{"securitySchemes":{"oanorKey":{"type":"apiKey","in":"header","name":"x-oanor-key","description":"Get your key at https://www.oanor.com/developer/keys"}}},"security":[{"oanorKey":[]}],"paths":{"/v1/dli":{"get":{"operationId":"get_v1_dli","tags":["Hydroponics"],"summary":"DLI from PPFD","description":"","parameters":[{"name":"ppfd","in":"query","required":false,"description":"PPFD in µmol/m²/s (or target_dli)","schema":{"type":"string"},"example":"600"},{"name":"photoperiod","in":"query","required":true,"description":"Light hours per day","schema":{"type":"string"},"example":"18"},{"name":"target_dli","in":"query","required":false,"description":"Target DLI (for required PPFD)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"dli":38.88,"note":"DLI (mol/m²/day) = PPFD (µmol/m²/s) × photoperiod(h) × 3600 ÷ 1,000,000. Leafy greens want ~12–17, fruiting crops ~20–30+.","inputs":{"ppfd":600,"photoperiod":18}},"meta":{"timestamp":"2026-06-05T21:48:44.969Z","request_id":"760d0282-3e28-43b4-a2b1-60e1dd00de43"},"status":"ok","message":"DLI from PPFD","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/ec":{"get":{"operationId":"get_v1_ec","tags":["Hydroponics"],"summary":"EC ↔ PPM/TDS","description":"","parameters":[{"name":"ec","in":"query","required":false,"description":"EC in mS/cm (or use ppm)","schema":{"type":"string"},"example":"2.0"},{"name":"ppm","in":"query","required":false,"description":"PPM/TDS (or use ec)","schema":{"type":"string"}},{"name":"scale","in":"query","required":false,"description":"500/nacl, 700/kcl, 640/eu","schema":{"type":"string"},"example":"700"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"ppm":1400,"note":"PPM = EC(mS/cm) × scale factor. The 500 (NaCl, US) scale gives EC 2.0 → 1000 ppm; the 700 (KCl) scale → 1400 ppm; the 640 (EU) scale → 1280 ppm.","inputs":{"scale":"700","factor":700},"ec_ms_cm":2,"ec_microsiemens":2000},"meta":{"timestamp":"2026-06-05T21:48:45.071Z","request_id":"0e64f99a-bda8-4e29-8f13-8a00c393c79d"},"status":"ok","message":"EC/PPM conversion","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/reservoir":{"get":{"operationId":"get_v1_reservoir","tags":["Hydroponics"],"summary":"Adjust reservoir EC","description":"","parameters":[{"name":"volume","in":"query","required":true,"description":"Reservoir volume (litres)","schema":{"type":"string"},"example":"100"},{"name":"current_ec","in":"query","required":true,"description":"Current EC (mS/cm)","schema":{"type":"string"},"example":"2.4"},{"name":"target_ec","in":"query","required":true,"description":"Target EC (mS/cm)","schema":{"type":"string"},"example":"1.6"},{"name":"stock_ec","in":"query","required":false,"description":"Stock EC for raising","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"To lower EC, add plain water: W = V × (current/target − 1). Mixing conserves total dissolved salts, so EC × volume stays constant.","action":"dilute","inputs":{"volume":100,"target_ec":1.6,"current_ec":2.4},"add_water_liters":50,"final_volume_liters":150},"meta":{"timestamp":"2026-06-05T21:48:45.146Z","request_id":"79911e27-6eca-4dd1-9167-d3587088b294"},"status":"ok","message":"Reservoir adjust","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}},"/v1/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"EC in mS/cm, PPM as mg/L, volume in litres, PPFD in µmol/m²/s, photoperiod in hours. PPM depends on the TDS scale — always state which. This is a growing aid; confirm with a calibrated meter.","service":"hydroponics-api","endpoints":{"GET /v1/ec":"Convert between EC (mS/cm) and PPM/TDS on the 500/700/640 scale.","GET /v1/dli":"Daily Light Integral from PPFD and photoperiod, or the PPFD needed for a target DLI.","GET /v1/meta":"This document.","GET /v1/reservoir":"Water to add to dilute to a target EC, or stock to concentrate."},"description":"Hydroponics / indoor-grow maths: EC↔PPM nutrient strength, grow-light DLI from PPFD, and reservoir dilution to a target EC."},"meta":{"timestamp":"2026-06-05T21:48:45.229Z","request_id":"75670cde-8227-44e7-bae8-77faa1f83573"},"status":"ok","message":"Meta","success":true}}}},"401":{"description":"Missing or invalid x-oanor-key header"},"402":{"description":"Active subscription required"},"429":{"description":"Rate-limit or monthly quota reached"},"502":{"description":"Upstream did not respond"}}}}},"x-oanor-pricing":[{"slug":"free","name":"Free","price_cents_month":0,"monthly_call_quota":4250,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":555,"monthly_call_quota":45000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1480,"monthly_call_quota":207000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":4600,"monthly_call_quota":1175000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/hydroponics-api"}