{"openapi":"3.1.0","info":{"title":"Slope & Grade API","version":"1.0.0","description":"Slope and grade maths as an API, computed locally and deterministically. The convert endpoint converts a slope between every common form — percent grade, angle in degrees, a ratio such as 1:12, per mille and rise-per-run — where the slope m = rise ÷ run = tan(angle). The distance endpoint relates the run (horizontal), the rise (vertical) and the slope distance (the hypotenuse) of a right-triangle slope: give any two, optionally with the grade or angle, and it returns the rest. The ramp endpoint sizes a wheelchair or ADA ramp — from a rise and a maximum slope (defaulting to 1:12, the ADA maximum of 8.33%) it returns the required run and total ramp length, and if you supply an actual run it checks whether the ramp is within the limit. Everything is computed locally and deterministically, so it is instant and private. Ideal for civil-engineering and surveying tools, road, trail and accessibility apps, construction and ramp design, and mapping software. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is slope and grade geometry; for roof pitch specifically use a roofing API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/slope-api","description":"oanor gateway"}],"tags":[{"name":"Slope"},{"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/convert":{"get":{"operationId":"get_v1_convert","tags":["Slope"],"summary":"Convert percent / angle / ratio / per-mille","description":"","parameters":[{"name":"grade","in":"query","required":false,"description":"Grade %","schema":{"type":"string"},"example":"10"},{"name":"angle","in":"query","required":false,"description":"Or angle (degrees)","schema":{"type":"string"}},{"name":"ratio","in":"query","required":false,"description":"Or ratio (1:12)","schema":{"type":"string"}},{"name":"per_mille","in":"query","required":false,"description":"Or per mille","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Slope m = rise ÷ run = tan(angle). Grade % = m × 100; ratio is 1:(run per unit rise).","input":[],"ratio":"1:10","per_mille":100,"rise_per_run":0.1,"angle_degrees":5.7106,"grade_percent":10},"meta":{"timestamp":"2026-06-04T01:59:14.361Z","request_id":"1f407d65-909e-4305-bce3-d823600be5fb"},"status":"ok","message":"Slope 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/distance":{"get":{"operationId":"get_v1_distance","tags":["Slope"],"summary":"Run / rise / slope distance","description":"","parameters":[{"name":"run","in":"query","required":false,"description":"Horizontal run","schema":{"type":"string"},"example":"100"},{"name":"rise","in":"query","required":false,"description":"Vertical rise","schema":{"type":"string"},"example":"10"},{"name":"slope_distance","in":"query","required":false,"description":"Slope distance (hypotenuse)","schema":{"type":"string"}},{"name":"grade","in":"query","required":false,"description":"Or grade %","schema":{"type":"string"}},{"name":"angle","in":"query","required":false,"description":"Or angle (degrees)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"run":100,"note":"Right-triangle relations: slope distance = √(run² + rise²); grade = rise ÷ run.","rise":10,"input":[],"ratio":"1:10","per_mille":100,"rise_per_run":0.1,"angle_degrees":5.7106,"grade_percent":10,"slope_distance":100.4988},"meta":{"timestamp":"2026-06-04T01:59:14.459Z","request_id":"daf08ee3-365e-469d-89e6-fe12a0495db5"},"status":"ok","message":"Run / rise / slope distance","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/ramp":{"get":{"operationId":"get_v1_ramp","tags":["Slope"],"summary":"Wheelchair / ADA ramp","description":"","parameters":[{"name":"rise","in":"query","required":true,"description":"Vertical rise","schema":{"type":"string"},"example":"30"},{"name":"max_slope","in":"query","required":false,"description":"Max ratio (default 1:12)","schema":{"type":"string"},"example":"1:12"},{"name":"max_grade","in":"query","required":false,"description":"Or max grade %","schema":{"type":"string"}},{"name":"run","in":"query","required":false,"description":"Actual run (to check compliance)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"ADA default is 1:12 (max 8.33% grade). Required run = rise × ratio. Provide run to check an existing ramp.","input":{"rise":30,"max_slope_ratio":"1:12","max_grade_percent":8.333},"ramp_length":361.248,"required_run":360,"angle_degrees":4.764},"meta":{"timestamp":"2026-06-04T01:59:14.529Z","request_id":"ff4c162f-35a6-40af-a6c5-641327922b7d"},"status":"ok","message":"Ramp calculation","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":"Slope m = rise ÷ run = tan(angle). ADA ramp default is 1:12 (≤ 8.33% grade).","service":"slope","endpoints":{"/v1/ramp":"Wheelchair/ADA ramp: required run and length for a rise (default 1:12), and compliance check.","/v1/convert":"Convert a slope between grade %, angle, ratio (1:12) and per mille.","/v1/distance":"Relate run, rise and slope distance from any two (plus grade/angle)."},"description":"Slope/grade maths: convert percent/angle/ratio/per-mille, relate run/rise/slope distance, and check a ramp."},"meta":{"timestamp":"2026-06-04T01:59:14.619Z","request_id":"51a806b2-27dc-4c36-82cd-b3b95ecfba05"},"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":12235,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1375,"monthly_call_quota":21850,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3365,"monthly_call_quota":268500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7165,"monthly_call_quota":1385000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/slope-api"}