{"openapi":"3.1.0","info":{"title":"Swimming Pool Calculator API","version":"1.0.0","description":"Swimming-pool maths as an API, computed locally and deterministically. The volume endpoint computes the water volume of a rectangular, round or oval pool — in litres, US gallons and cubic metres — from the dimensions and either an average depth or separate shallow and deep depths (it averages them), in feet or metres. The dose endpoint computes how much of a chemical to add to raise a level by a target ppm: give the pool volume and the desired increase, and either the product strength percent or a preset (cal-hypo, dichlor, trichlor, liquid chlorine, bleach), and it returns the amount in grams, kilograms, ounces and pounds. The salt endpoint computes the salt needed to reach a target salinity in a saltwater pool from the current and target ppm, in kilograms and pounds (and 40 lb bags). Everything is computed locally and deterministically, so it is instant and private. Dosing depends on the actual product strength and your test readings — always follow the product label, add in stages and re-test before adding more. Ideal for pool-service and maintenance apps, pool-builder and retailer tools, and smart-pool and home-automation systems. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is pool maths; for general volume or unit conversion use a unit-conversion API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/pool-api","description":"oanor gateway"}],"tags":[{"name":"Pool"},{"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/dose":{"get":{"operationId":"get_v1_dose","tags":["Pool"],"summary":"Chemical dose to raise ppm","description":"","parameters":[{"name":"volume_litres","in":"query","required":false,"description":"Volume in litres","schema":{"type":"string"}},{"name":"volume_gallons","in":"query","required":false,"description":"Or US gallons","schema":{"type":"string"},"example":"5000"},{"name":"ppm","in":"query","required":true,"description":"ppm increase","schema":{"type":"string"},"example":"2"},{"name":"chemical","in":"query","required":false,"description":"calhypo|dichlor|trichlor|liquidchlorine|bleach","schema":{"type":"string"},"example":"calhypo"},{"name":"strength_percent","in":"query","required":false,"description":"Or product strength %","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Dose to raise the level by the given ppm. 1 ppm = 1 mg/L. Add in stages, circulate and re-test — never overshoot.","grams":58.24,"input":{"ppm":2,"chemical":"calhypo","volume_litres":18927.1,"strength_percent":65},"ounces":2.054,"pounds":0.1284,"kilograms":0.0582},"meta":{"timestamp":"2026-06-03T17:41:58.252Z","request_id":"c9d8a9d6-de58-4ff6-a5a2-4329c3668c26"},"status":"ok","message":"Chemical dose","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/salt":{"get":{"operationId":"get_v1_salt","tags":["Pool"],"summary":"Salt for saltwater pool","description":"","parameters":[{"name":"volume_litres","in":"query","required":false,"description":"Volume in litres","schema":{"type":"string"}},{"name":"volume_gallons","in":"query","required":false,"description":"Or US gallons","schema":{"type":"string"},"example":"5000"},{"name":"current_ppm","in":"query","required":false,"description":"Current salinity (default 0)","schema":{"type":"string"},"example":"0"},{"name":"target_ppm","in":"query","required":false,"description":"Target salinity (default 3200)","schema":{"type":"string"},"example":"3200"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Salt to raise from current to target ppm. Typical saltwater target is ~2700–3400 ppm; check your chlorinator's spec.","input":{"target_ppm":3200,"current_ppm":0,"increase_ppm":3200,"volume_litres":18927.1},"salt_kg":60.57,"salt_lb":133.53,"bags_40lb":4},"meta":{"timestamp":"2026-06-03T17:41:58.370Z","request_id":"ad69916a-b0d3-4e3a-9f79-d802a252ae3e"},"status":"ok","message":"Salt for saltwater pool","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/volume":{"get":{"operationId":"get_v1_volume","tags":["Pool"],"summary":"Pool water volume","description":"","parameters":[{"name":"shape","in":"query","required":false,"description":"rectangle|round|oval","schema":{"type":"string"},"example":"rectangle"},{"name":"length","in":"query","required":false,"description":"Length","schema":{"type":"string"},"example":"32"},{"name":"width","in":"query","required":false,"description":"Width","schema":{"type":"string"},"example":"16"},{"name":"diameter","in":"query","required":false,"description":"Diameter (round)","schema":{"type":"string"}},{"name":"depth","in":"query","required":false,"description":"Average depth","schema":{"type":"string"},"example":"5"},{"name":"shallow","in":"query","required":false,"description":"Or shallow depth","schema":{"type":"string"}},{"name":"deep","in":"query","required":false,"description":"And deep depth","schema":{"type":"string"}},{"name":"unit","in":"query","required":false,"description":"ft|m (default ft)","schema":{"type":"string"},"example":"ft"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Volume uses the average depth. For a sloped floor, pass shallow and deep depths and it averages them.","input":{"unit":"ft","shape":"rectangle","width":16,"length":32,"avg_depth":5},"volume_m3":72.491,"volume_litres":72491.1,"volume_us_gallons":19150.1},"meta":{"timestamp":"2026-06-03T17:41:58.465Z","request_id":"7add16ee-12b7-4ed2-bea7-59e1156b0739"},"status":"ok","message":"Pool volume","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":{"note":"Dosing depends on actual product strength and your test readings — follow the label and re-test before adding more.","service":"pool","chemicals":["calhypo","calciumhypochlorite","dichlor","trichlor","liquidchlorine","bleach","sodiumhypochlorite"],"endpoints":{"/v1/dose":"Grams/ounces of a chemical to raise a level by a target ppm, by product strength or preset.","/v1/salt":"Salt (kg/lb) to reach a target salinity in a saltwater pool.","/v1/volume":"Pool water volume (litres, US gallons, m³) for a rectangle, round or oval pool."},"description":"Swimming-pool maths: water volume by shape, chemical dosing to a target ppm, and salt for saltwater pools."},"meta":{"timestamp":"2026-06-03T17:41:58.604Z","request_id":"b7811ea5-c935-4f4a-a8cb-4863b964675b"},"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":9635,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1115,"monthly_call_quota":19250,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3105,"monthly_call_quota":242500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":6905,"monthly_call_quota":1255000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/pool-api"}