{"openapi":"3.1.0","info":{"title":"Pendulum Calculator API","version":"1.0.0","description":"Gravity-driven pendulum maths as an API, computed locally and deterministically. The simple endpoint computes the period of a simple pendulum, T = 2π·√(L/g), together with its frequency and angular frequency, and solves for the length needed to give a target period — with an optional large-amplitude correction (the first two terms of the amplitude series) for swings where the small-angle approximation no longer holds. The physical endpoint handles a compound (physical) pendulum — any rigid body swinging about a pivot — from its moment of inertia about the pivot, its mass and the distance from the pivot to its centre of mass, T = 2π·√(I/(m·g·d)), and reports the equivalent simple-pendulum length I/(m·d). The conical endpoint solves a conical pendulum, a bob sweeping a horizontal circle, T = 2π·√(L·cosθ/g), giving the radius of the circle, the speed of the bob, the angular velocity and — with a mass — the string tension m·g/cosθ and the centripetal force. Everything is an idealised system under constant gravity with no air resistance or string mass, computed locally and deterministically, so it is instant and private. Ideal for physics-education and engineering tools, clock and metronome design, swing and amusement-ride dynamics, and STEM teaching. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is gravity-pendulum dynamics; for spring-mass-damper vibration use a vibration API, for rotational kinetic energy use a flywheel API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/pendulum-api","description":"oanor gateway"}],"tags":[{"name":"Pendulum"},{"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/conical":{"get":{"operationId":"get_v1_conical","tags":["Pendulum"],"summary":"Conical pendulum","description":"","parameters":[{"name":"length","in":"query","required":true,"description":"String length L (m)","schema":{"type":"string"},"example":"1"},{"name":"angle","in":"query","required":true,"description":"Angle from vertical (degrees)","schema":{"type":"string"},"example":"30"},{"name":"mass","in":"query","required":false,"description":"Bob mass (kg) for tension & force","schema":{"type":"string"},"example":"1"},{"name":"gravity","in":"query","required":false,"description":"Gravity g (m/s², default 9.81)","schema":{"type":"string"},"example":"9.81"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Bob swinging in a horizontal circle; the string traces a cone at the given angle from vertical.","inputs":{"mass":1,"length":1,"gravity":9.81,"angle_deg":30},"period_s":1.866855,"bob_speed":1.682826,"frequency_hz":0.53566,"circle_radius_m":0.5,"angular_velocity":3.365652,"string_tension_n":11.327612,"centripetal_force_n":5.663806},"meta":{"timestamp":"2026-06-04T10:18:37.027Z","request_id":"ee6419bc-7d9b-4184-a861-0d18bca982eb"},"status":"ok","message":"Conical pendulum","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/physical":{"get":{"operationId":"get_v1_physical","tags":["Pendulum"],"summary":"Physical / compound pendulum","description":"","parameters":[{"name":"moment_of_inertia","in":"query","required":true,"description":"Moment of inertia about the pivot (kg·m²)","schema":{"type":"string"},"example":"0.3333"},{"name":"mass","in":"query","required":true,"description":"Mass (kg)","schema":{"type":"string"},"example":"1"},{"name":"distance","in":"query","required":true,"description":"Pivot-to-centre-of-mass distance (m)","schema":{"type":"string"},"example":"0.5"},{"name":"gravity","in":"query","required":false,"description":"Gravity g (m/s², default 9.81)","schema":{"type":"string"},"example":"9.81"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Compound pendulum swinging about a pivot a distance d from its centre of mass. The equivalent simple-pendulum length is I/(m·d).","inputs":{"mass":1,"gravity":9.81,"distance":0.5,"moment_of_inertia":0.3333},"period_s":1.637865,"frequency_hz":0.610551,"angular_frequency":3.836205,"equivalent_simple_length_m":0.6666},"meta":{"timestamp":"2026-06-04T10:18:37.139Z","request_id":"8ea3f039-7b35-48c2-8b61-63758e4e298d"},"status":"ok","message":"Physical pendulum","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/simple":{"get":{"operationId":"get_v1_simple","tags":["Pendulum"],"summary":"Simple pendulum","description":"","parameters":[{"name":"length","in":"query","required":false,"description":"Pendulum length L (m)","schema":{"type":"string"},"example":"1"},{"name":"period","in":"query","required":false,"description":"Or a target period (s) to solve the length","schema":{"type":"string"}},{"name":"amplitude","in":"query","required":false,"description":"Swing amplitude (degrees) for large-angle correction","schema":{"type":"string"},"example":"0"},{"name":"gravity","in":"query","required":false,"description":"Gravity g (m/s², default 9.81)","schema":{"type":"string"},"example":"9.81"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Small-angle (θ→0) period. Pass an 'amplitude' in degrees for the large-angle correction.","inputs":{"length":1,"gravity":9.81,"amplitude_deg":0},"period_s":2.006067,"frequency_hz":0.498488,"angular_frequency":3.132092,"large_angle_period_s":2.006067,"large_angle_correction_factor":1},"meta":{"timestamp":"2026-06-04T10:18:37.255Z","request_id":"c568febb-7005-4197-891d-a273dac0dd5a"},"status":"ok","message":"Simple pendulum","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":{"notes":"Idealised, no air resistance or string mass. Default g = 9.81 m/s². The simple-pendulum period is the small-angle limit unless an amplitude is given.","service":"pendulum-api","formulae":{"simple":"T = 2π·√(L/g)","conical":"T = 2π·√(L·cosθ/g),  r = L·sinθ,  tension = m·g/cosθ","physical":"T = 2π·√(I/(m·g·d)),  L_eq = I/(m·d)"},"endpoints":{"GET /v1/meta":"This document.","GET /v1/simple":"Simple pendulum period T = 2π√(L/g); solves length from a period; optional large-angle correction.","GET /v1/conical":"Conical pendulum period, circle radius, bob speed and string tension.","GET /v1/physical":"Physical/compound pendulum T = 2π√(I/(m·g·d)) and the equivalent simple-pendulum length."},"description":"Gravity-driven pendulum calculator: simple, physical (compound) and conical pendulum periods, frequencies and dynamics under constant gravity."},"meta":{"timestamp":"2026-06-04T10:18:37.380Z","request_id":"b516af10-1ae9-413f-abb1-c9e8c2311cba"},"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":500,"monthly_call_quota":25000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1500,"monthly_call_quota":150000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":4900,"monthly_call_quota":779000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/pendulum-api"}