{"openapi":"3.1.0","info":{"title":"Pump Power API","version":"1.0.0","description":"Pump power, head and affinity maths as an API, computed locally and deterministically. The power endpoint computes the power a pump needs from its flow rate, head, fluid density and efficiency: the hydraulic (water) power is ρ·g·Q·H, the shaft (brake) power is that divided by the pump efficiency, and an optional motor efficiency gives the electrical input power — all reported in watts, kilowatts and horsepower. Flow accepts litres per second or minute, cubic metres per hour or second and US gallons per minute; head accepts metres or feet; and the fluid can be water, seawater, oil, diesel and more, or a custom density. The head endpoint converts between pressure and head of fluid, H = P/(ρ·g), in both directions, across pascals, kPa, bar, psi and atmospheres. The affinity endpoint applies the pump affinity laws — flow scales with speed, head with speed squared and power with speed cubed — to predict the new operating point when you change the pump speed or trim the impeller diameter. Everything is computed locally and deterministically, so it is instant and private. Ideal for plumbing and HVAC tools, process and water-treatment engineering, irrigation and pool-pump apps, and energy-efficiency calculators. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is pump power and head maths; for flow rate from pipe diameter and velocity use a pipe-flow API and for open-channel flow use a Manning API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/pump-api","description":"oanor gateway"}],"tags":[{"name":"Pump"},{"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/affinity":{"get":{"operationId":"get_v1_affinity","tags":["Pump"],"summary":"Pump affinity laws","description":"","parameters":[{"name":"speed_1","in":"query","required":false,"description":"Original speed (rpm)","schema":{"type":"string"},"example":"1450"},{"name":"speed_2","in":"query","required":false,"description":"New speed (rpm)","schema":{"type":"string"},"example":"1740"},{"name":"diameter_1","in":"query","required":false,"description":"Or original impeller diameter","schema":{"type":"string"}},{"name":"diameter_2","in":"query","required":false,"description":"Or new impeller diameter","schema":{"type":"string"}},{"name":"flow_1","in":"query","required":false,"description":"Original flow","schema":{"type":"string"},"example":"100"},{"name":"head_1","in":"query","required":false,"description":"Original head","schema":{"type":"string"},"example":"20"},{"name":"power_1","in":"query","required":false,"description":"Original power","schema":{"type":"string"},"example":"10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Affinity laws: Q ∝ N, H ∝ N², P ∝ N³ (same for impeller diameter trims).","basis":"speed","ratio":1.2,"flow_2":120,"head_2":28.8,"factors":{"flow":1.2,"head":1.44,"power":1.728},"power_2":17.28},"meta":{"timestamp":"2026-06-04T01:59:06.918Z","request_id":"0a56009c-3ffa-4c4a-8fc4-4fffbda313b7"},"status":"ok","message":"Pump affinity laws","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/head":{"get":{"operationId":"get_v1_head","tags":["Pump"],"summary":"Pressure ↔ head","description":"","parameters":[{"name":"pressure","in":"query","required":false,"description":"Pressure (to get head)","schema":{"type":"string"},"example":"2"},{"name":"pressure_unit","in":"query","required":false,"description":"pa|kpa|bar|psi|atm (default bar)","schema":{"type":"string"},"example":"bar"},{"name":"head","in":"query","required":false,"description":"Or head (to get pressure)","schema":{"type":"string"}},{"name":"head_unit","in":"query","required":false,"description":"m|ft","schema":{"type":"string"},"example":"m"},{"name":"fluid","in":"query","required":false,"description":"Fluid (default water)","schema":{"type":"string"},"example":"water"},{"name":"density","in":"query","required":false,"description":"Or explicit density","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"head":{"m":20.3943,"ft":66.911},"mode":"pressure_to_head","note":"H = P / (ρ·g).","fluid":"water","pressure_pa":200000,"pressure_bar":2,"density_kg_m3":1000},"meta":{"timestamp":"2026-06-04T01:59:06.980Z","request_id":"ac66fe2d-ca74-4987-89b8-928b994837e1"},"status":"ok","message":"Pressure <-> head 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/power":{"get":{"operationId":"get_v1_power","tags":["Pump"],"summary":"Pump hydraulic, shaft & motor power","description":"","parameters":[{"name":"flow","in":"query","required":true,"description":"Flow rate","schema":{"type":"string"},"example":"50"},{"name":"flow_unit","in":"query","required":false,"description":"ls|lmin|m3h|m3s|gpm (default ls)","schema":{"type":"string"},"example":"ls"},{"name":"head","in":"query","required":true,"description":"Head","schema":{"type":"string"},"example":"20"},{"name":"head_unit","in":"query","required":false,"description":"m|ft (default m)","schema":{"type":"string"},"example":"m"},{"name":"fluid","in":"query","required":false,"description":"water|seawater|oil|… (default water)","schema":{"type":"string"},"example":"water"},{"name":"density","in":"query","required":false,"description":"Or explicit density (kg/m³)","schema":{"type":"string"}},{"name":"efficiency","in":"query","required":false,"description":"Pump efficiency 0-1 (default 0.7)","schema":{"type":"string"},"example":"0.7"},{"name":"motor_efficiency","in":"query","required":false,"description":"Motor efficiency 0-1","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"fluid":"water","head_m":20,"formula":"Hydraulic power = ρ·g·Q·H ; shaft power = hydraulic ÷ pump efficiency.","flow_m3_s":0.05,"shaft_power":{"hp":18.787,"kW":14.0095,"watts":14009.5},"density_kg_m3":1000,"hydraulic_power":{"hp":13.1509,"kW":9.80665,"watts":9806.65},"pump_efficiency":0.7},"meta":{"timestamp":"2026-06-04T01:59:07.031Z","request_id":"663caf87-e031-4855-bfe4-ab6700bf566b"},"status":"ok","message":"Pump hydraulic, shaft & motor power","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":{"api":"pump","note":"Pump power, head and affinity maths — computed locally and deterministically, no key, no third-party service.","fluids":["water","seawater","oil","diesel","petrol","gasoline","milk","glycol"],"endpoints":["/v1/power","/v1/head","/v1/affinity","/v1/meta"],"flow_units":["m3s","m3/s","ls","l/s","lps","lmin","l/min","lpm","m3h","m3/h","gpm"]},"meta":{"timestamp":"2026-06-04T01:59:07.121Z","request_id":"24980505-6f36-43ae-be3f-8ce5ef070a0a"},"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":2000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":900,"monthly_call_quota":40000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2400,"monthly_call_quota":250000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7400,"monthly_call_quota":1519000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/pump-api"}