{"openapi":"3.1.0","info":{"title":"Bicycle Gear API","version":"1.0.0","description":"Bicycle gearing maths as an API, computed locally and deterministically. The gear endpoint takes a chainring and cog tooth count and a wheel size and returns every common gearing metric: the gear ratio, gear inches (the classic measure — ratio times wheel diameter in inches), the gain ratio (Sheldon Brown's crank-length-aware measure), the development or rollout (metres travelled per crank revolution), and the road speed at a chosen cadence in km/h and mph. The speed endpoint converts between a gear-and-cadence and road speed in either direction — the speed at a cadence, or the cadence needed for a target speed. The table endpoint builds a gear chart: give one or more chainrings and a cassette of cogs and it returns a matrix of gear inches, development, gain ratio or ratio for every combination — ideal for visualising a drivetrain. Wheel size can be a preset (700x25c, 26-inch, 29er and more) or an exact rolling circumference in millimetres, and crank length is configurable for the gain ratio. Everything is computed locally and deterministically, so it is instant and private. Ideal for cycling apps and bike-fit tools, drivetrain and gear-ratio planners, and bike-shop and component sites. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is bicycle gearing; for cycling power, FTP and training zones use a cycling API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/bikegear-api","description":"oanor gateway"}],"tags":[{"name":"Gearing"},{"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/gear":{"get":{"operationId":"get_v1_gear","tags":["Gearing"],"summary":"Gearing metrics + speed","description":"","parameters":[{"name":"chainring","in":"query","required":true,"description":"Chainring teeth","schema":{"type":"string"},"example":"50"},{"name":"cog","in":"query","required":true,"description":"Cog/sprocket teeth","schema":{"type":"string"},"example":"14"},{"name":"wheel","in":"query","required":false,"description":"700x25c|26|29er|… (or circumference)","schema":{"type":"string"},"example":"700x25c"},{"name":"wheel_circumference_mm","in":"query","required":false,"description":"Exact rolling circumference","schema":{"type":"string"}},{"name":"crank_length","in":"query","required":false,"description":"mm (default 170)","schema":{"type":"string"},"example":"170"},{"name":"cadence","in":"query","required":false,"description":"rpm (default 90)","schema":{"type":"string"},"example":"90"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Gear inches = ratio × wheel diameter (in). Development = distance per crank revolution. Gain ratio (Sheldon Brown) uses crank length.","input":{"cog":14,"chainring":50,"cadence_rpm":90,"crank_length_mm":170,"wheel_circumference_mm":2105},"ratio":3.5714,"gain_ratio":7.038,"gear_inches":94.21,"development_m":7.5179,"speed_at_cadence_kmh":40.6,"speed_at_cadence_mph":25.23},"meta":{"timestamp":"2026-06-04T01:59:19.299Z","request_id":"97ed41fe-a8e1-415e-a5fe-6fd571eb2db6"},"status":"ok","message":"Gearing metrics","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/speed":{"get":{"operationId":"get_v1_speed","tags":["Gearing"],"summary":"Speed from cadence (or inverse)","description":"","parameters":[{"name":"chainring","in":"query","required":true,"description":"Chainring teeth","schema":{"type":"string"},"example":"50"},{"name":"cog","in":"query","required":true,"description":"Cog teeth","schema":{"type":"string"},"example":"14"},{"name":"wheel","in":"query","required":false,"description":"Wheel size","schema":{"type":"string"},"example":"700x25c"},{"name":"cadence","in":"query","required":false,"description":"rpm (for speed)","schema":{"type":"string"},"example":"90"},{"name":"speed_kmh","in":"query","required":false,"description":"Or target speed (for cadence)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Speed = development × cadence.","input":{"cog":14,"chainring":50,"cadence_rpm":90,"development_m":7.5179},"speed_kmh":40.6,"speed_mph":25.23},"meta":{"timestamp":"2026-06-04T01:59:19.391Z","request_id":"b03371bb-8eb3-4c6b-b683-acbf57f9399f"},"status":"ok","message":"Speed / cadence","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/table":{"get":{"operationId":"get_v1_table","tags":["Gearing"],"summary":"Gear table for a cassette","description":"","parameters":[{"name":"chainrings","in":"query","required":true,"description":"Chainring teeth, comma list","schema":{"type":"string"},"example":"50,34"},{"name":"cogs","in":"query","required":true,"description":"Cassette cogs, comma list","schema":{"type":"string"},"example":"11,13,15,17,19,21,24,28"},{"name":"wheel","in":"query","required":false,"description":"Wheel size","schema":{"type":"string"},"example":"700x25c"},{"name":"metric","in":"query","required":false,"description":"gear_inches|development|gain|ratio","schema":{"type":"string"},"example":"gear_inches"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Matrix of the chosen metric for each chainring × cog. metric = gear_inches (default), development, gain or ratio.","input":{"cogs":[11,13,15,17,19,21,24,28],"metric":"gear_inches","chainrings":[50,34],"wheel_circumference_mm":2105},"table":[{"gears":[{"cog":11,"value":119.91},{"cog":13,"value":101.46},{"cog":15,"value":87.93},{"cog":17,"value":77.59},{"cog":19,"value":69.42},{"cog":21,"value":62.81},{"cog":24,"value":54.96},{"cog":28,"value":47.11}],"chainring":50},{"gears":[{"cog":11,"value":81.54},{"cog":13,"value":68.99},{"cog":15,"value":59.79},{"cog":17,"value":52.76},{"cog":19,"value":47.21},{"cog":21,"value":42.71},{"cog":24,"value":37.37},{"cog":28,"value":32.03}],"chainring":34}]},"meta":{"timestamp":"2026-06-04T01:59:19.484Z","request_id":"cde24180-d418-4e1d-bf18-98239963c7af"},"status":"ok","message":"Gear table","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":"Wheel sizes are rolling circumferences in mm; pass wheel_circumference_mm for an exact value.","wheels":["20","24","26","700x23c","700x25c","700x28c","700x32c","700x35c","700c","650b","27.5x2.0","26x1.5","26x2.0","29er","29x2.2","27x1.25"],"service":"bikegear","endpoints":{"/v1/gear":"All gearing metrics for a chainring/cog/wheel, including speed at a cadence.","/v1/speed":"Speed from a gear and cadence, or the cadence for a target speed.","/v1/table":"Gear table (gear inches / development / gain / ratio) for chainrings × a cassette."},"description":"Bicycle gearing maths: ratio, gear inches, gain ratio, development and speed at cadence, plus a gear table."},"meta":{"timestamp":"2026-06-04T01:59:19.586Z","request_id":"304ff358-a6fb-44de-b490-45cb714cfabc"},"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":10935,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":1245,"monthly_call_quota":20550,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":3235,"monthly_call_quota":255500,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7035,"monthly_call_quota":1320000,"rps_limit":50,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/bikegear-api"}