{"openapi":"3.1.0","info":{"title":"Spur Gear API","version":"1.0.0","description":"Spur-gear geometry as an API, computed locally and deterministically for standard full-depth involute teeth. The geometry endpoint takes a module and a number of teeth (and an optional pressure angle, default 20°) and returns the complete tooth geometry: the pitch diameter (module × teeth), the base, tip (outside) and root diameters, the addendum, dedendum, whole and working depth, the circular and base pitch, the diametral pitch and the tooth thickness — all in millimetres. The module can be given directly or derived from a diametral pitch or a circular pitch. The pair endpoint meshes two gears of the same module and returns each gear's pitch and tip diameter, the centre distance (module × (z1 + z2) ÷ 2) and the gear ratio. The module endpoint converts freely between module, diametral pitch and circular pitch, or derives the module from a pitch diameter and tooth count. Everything is computed locally and deterministically, so it is instant and private. Ideal for machine-design and CAD tools, gear and gearbox calculators, maker, robotics and 3D-printing projects, and mechanical-engineering apps. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is spur-gear geometry; for bicycle gear ratios and development use a bike-gear API and for belt-and-pulley drives use a belt-drive API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/spurgear-api","description":"oanor gateway"}],"tags":[{"name":"Gear"},{"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/geometry":{"get":{"operationId":"get_v1_geometry","tags":["Gear"],"summary":"Single spur-gear geometry","description":"","parameters":[{"name":"module","in":"query","required":false,"description":"Module in mm","schema":{"type":"string"},"example":"2"},{"name":"diametral_pitch","in":"query","required":false,"description":"Or diametral pitch (1/in)","schema":{"type":"string"}},{"name":"circular_pitch","in":"query","required":false,"description":"Or circular pitch (mm)","schema":{"type":"string"}},{"name":"teeth","in":"query","required":true,"description":"Number of teeth (z)","schema":{"type":"string"},"example":"20"},{"name":"pressure_angle","in":"query","required":false,"description":"Pressure angle deg (default 20)","schema":{"type":"string"},"example":"20"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Standard full-depth involute gear. Pitch dia = module × teeth; tip = m(z+2); root = m(z−2.5); base = pitch × cos(pressure angle).","teeth":20,"module_mm":2,"addendum_mm":2,"dedendum_mm":2.5,"base_pitch_mm":5.90426,"module_source":"module","whole_depth_mm":4.5,"tip_diameter_mm":44,"base_diameter_mm":37.5877,"root_diameter_mm":35,"working_depth_mm":4,"circular_pitch_mm":6.28319,"pitch_diameter_mm":40,"pressure_angle_deg":20,"tooth_thickness_mm":3.14159,"diametral_pitch_per_in":12.7},"meta":{"timestamp":"2026-06-04T01:59:06.507Z","request_id":"f4fe4625-5ec0-4546-916c-60a8cd669636"},"status":"ok","message":"Single spur-gear geometry","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/module":{"get":{"operationId":"get_v1_module","tags":["Gear"],"summary":"Module / DP / circular pitch","description":"","parameters":[{"name":"module","in":"query","required":false,"description":"Module (mm)","schema":{"type":"string"}},{"name":"diametral_pitch","in":"query","required":false,"description":"Diametral pitch","schema":{"type":"string"},"example":"8"},{"name":"circular_pitch","in":"query","required":false,"description":"Circular pitch (mm)","schema":{"type":"string"}},{"name":"pitch_diameter","in":"query","required":false,"description":"Or pitch diameter (with teeth)","schema":{"type":"string"}},{"name":"teeth","in":"query","required":false,"description":"Teeth (with pitch_diameter)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"module(mm) = 25.4 / diametral_pitch = circular_pitch / π = pitch_diameter / teeth.","module_mm":3.175,"circular_pitch_in":0.392699,"circular_pitch_mm":9.97456,"diametral_pitch_per_in":8},"meta":{"timestamp":"2026-06-04T01:59:06.615Z","request_id":"dcfb7222-bce3-4617-aca4-03319c2b9e0f"},"status":"ok","message":"Module / DP / circular pitch","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/pair":{"get":{"operationId":"get_v1_pair","tags":["Gear"],"summary":"Meshing gear pair","description":"","parameters":[{"name":"module","in":"query","required":false,"description":"Module in mm","schema":{"type":"string"},"example":"2"},{"name":"diametral_pitch","in":"query","required":false,"description":"Or diametral pitch","schema":{"type":"string"}},{"name":"teeth_1","in":"query","required":true,"description":"Pinion teeth (z1)","schema":{"type":"string"},"example":"20"},{"name":"teeth_2","in":"query","required":true,"description":"Gear teeth (z2)","schema":{"type":"string"},"example":"40"},{"name":"pressure_angle","in":"query","required":false,"description":"Pressure angle deg","schema":{"type":"string"},"example":"20"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"gear":{"teeth":40,"tip_diameter_mm":84,"pitch_diameter_mm":80},"note":"Centre distance = module × (z1 + z2) / 2. Gear ratio = driven teeth ÷ driver teeth.","pinion":{"teeth":20,"tip_diameter_mm":44,"pitch_diameter_mm":40},"module_mm":2,"gear_ratio":2,"ratio_label":"40:20","center_distance_mm":60,"pressure_angle_deg":20},"meta":{"timestamp":"2026-06-04T01:59:06.715Z","request_id":"0aeb1fac-1a59-499d-9deb-c20d440154f2"},"status":"ok","message":"Meshing gear pair","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":"spurgear","note":"Spur-gear geometry — computed locally and deterministically, no key, no third-party service.","defaults":{"tooth_system":"full-depth involute","pressure_angle_deg":20},"endpoints":["/v1/geometry","/v1/pair","/v1/module","/v1/meta"]},"meta":{"timestamp":"2026-06-04T01:59:06.809Z","request_id":"ad4e62a0-5a12-4ee5-a2f8-38b0772ec97d"},"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":18000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2400,"monthly_call_quota":90000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7400,"monthly_call_quota":408000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/spurgear-api"}