{"openapi":"3.1.0","info":{"title":"Shaft Torsion API","version":"1.0.0","description":"Shaft torsion as an API, computed locally and deterministically. The stress endpoint computes the maximum torsional shear stress in a circular shaft, τ = T·r/J — torque times the outer radius divided by the polar moment of inertia — for a solid shaft (J = π·d⁴/32) or a hollow tube (J = π·(D⁴−d⁴)/32), and solves the torque a shaft can carry for an allowable stress. The twist endpoint computes the angle of twist along the shaft, θ = T·L/(G·J), in radians and degrees, from the torque, length and the shear modulus (given directly or from a built-in material table — steel, aluminium, copper, titanium and more), plus the torsional stiffness G·J/L. The power endpoint relates the power a rotating shaft transmits to its torque and speed, P = T·ω = T·2πN/60, and solves any of the three, reporting power in watts, kilowatts and horsepower. Everything is computed locally and deterministically, so it is instant and private. Ideal for mechanical and drivetrain engineering tools, shaft, axle and coupling design, motor and gearbox apps, and machine-design education. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is circular-shaft torsion; for axial stress-strain use a Young's-modulus API and for the 2D stress state use a Mohr-circle API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/torsion-api","description":"oanor gateway"}],"tags":[{"name":"Torsion"},{"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/power":{"get":{"operationId":"get_v1_power","tags":["Torsion"],"summary":"Shaft power P = T·ω","description":"","parameters":[{"name":"torque","in":"query","required":false,"description":"Torque T (N·m)","schema":{"type":"string"},"example":"1000"},{"name":"rpm","in":"query","required":false,"description":"Rotational speed (rpm)","schema":{"type":"string"},"example":"1500"},{"name":"omega","in":"query","required":false,"description":"Or angular velocity (rad/s)","schema":{"type":"string"}},{"name":"power","in":"query","required":false,"description":"Or power (W) to solve torque/speed","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"rpm":1500,"formula":"P = T·ω = T·2πN/60.","power_w":157079.632679,"power_hp":210.64725713,"power_kw":157.07963268,"torque_nm":1000,"angular_velocity_rad_s":157.079633},"meta":{"timestamp":"2026-06-04T10:18:41.506Z","request_id":"f9f61cdf-225c-4478-b369-15e90ed7fb23"},"status":"ok","message":"Shaft power P = T·ω","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/stress":{"get":{"operationId":"get_v1_stress","tags":["Torsion"],"summary":"Torsional shear stress","description":"","parameters":[{"name":"torque","in":"query","required":false,"description":"Torque T (N·m)","schema":{"type":"string"},"example":"1000"},{"name":"diameter","in":"query","required":false,"description":"Solid shaft diameter (m)","schema":{"type":"string"},"example":"0.05"},{"name":"outer_diameter","in":"query","required":false,"description":"Hollow outer diameter (m)","schema":{"type":"string"}},{"name":"inner_diameter","in":"query","required":false,"description":"Hollow inner diameter (m)","schema":{"type":"string"}},{"name":"shear_stress","in":"query","required":false,"description":"Or allowable shear stress (Pa) to solve torque","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"formula":"τ = T·r/J; J = π·d⁴/32 (solid) or π·(D⁴−d⁴)/32 (hollow).","torque_nm":1000,"shaft_type":"solid","outer_radius_m":0.025,"max_shear_stress":{"mpa":40.74366543,"pascal":40743665.4315},"polar_moment_of_inertia_m4":6.135923151542566e-7},"meta":{"timestamp":"2026-06-04T10:18:41.613Z","request_id":"9615c1c2-85d3-4bfd-a4a1-a2ec76801d57"},"status":"ok","message":"Torsional shear stress","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/twist":{"get":{"operationId":"get_v1_twist","tags":["Torsion"],"summary":"Angle of twist","description":"","parameters":[{"name":"torque","in":"query","required":true,"description":"Torque T (N·m)","schema":{"type":"string"},"example":"1000"},{"name":"length","in":"query","required":true,"description":"Shaft length L (m)","schema":{"type":"string"},"example":"2"},{"name":"diameter","in":"query","required":false,"description":"Solid shaft diameter (m)","schema":{"type":"string"},"example":"0.05"},{"name":"outer_diameter","in":"query","required":false,"description":"Hollow outer diameter (m)","schema":{"type":"string"}},{"name":"inner_diameter","in":"query","required":false,"description":"Hollow inner diameter (m)","schema":{"type":"string"}},{"name":"material","in":"query","required":false,"description":"Material for shear modulus G","schema":{"type":"string"},"example":"steel"},{"name":"shear_modulus_gpa","in":"query","required":false,"description":"Or shear modulus (GPa)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"formula":"θ = T·L/(G·J); stiffness k = G·J/L.","length_m":2,"torque_nm":1000,"shaft_type":"solid","shear_modulus_gpa":79.3,"angle_of_twist_deg":2.35504673,"angle_of_twist_rad":0.0411033195,"polar_moment_of_inertia_m4":6.135923151542566e-7,"torsional_stiffness_nm_rad":24328.9353},"meta":{"timestamp":"2026-06-04T10:18:41.716Z","request_id":"b6475eb3-a301-498e-9da1-237952e80f0b"},"status":"ok","message":"Angle of twist","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":"torsion","note":"Shaft torsion (shear stress, angle of twist, transmitted power) — computed locally and deterministically, no key, no third-party service.","endpoints":["/v1/stress","/v1/twist","/v1/power","/v1/meta"],"materials":["steel","stainless_steel","aluminium","aluminum","copper","brass","bronze","titanium","cast_iron","magnesium","glass","nylon"]},"meta":{"timestamp":"2026-06-04T10:18:41.820Z","request_id":"ecb30eb0-c42c-4df9-8bcd-98079956d9cd"},"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":120000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7400,"monthly_call_quota":600000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/torsion-api"}