{"openapi":"3.1.0","info":{"title":"Spring Coil API","version":"1.0.0","description":"Helical compression-spring maths as an API, computed locally and deterministically. The rate endpoint computes the spring rate from the wire diameter, the mean coil diameter and the number of active coils using k = G·d⁴/(8·D³·n), where the shear modulus G is taken from the material (music wire and spring steel, stainless, phosphor bronze, beryllium copper, titanium and more) or supplied directly — and it reports the rate in newtons per millimetre, newtons per metre and pounds per inch, along with the spring index C = D/d. The force endpoint relates force and deflection through F = k·x in both directions, taking the rate directly or deriving it from the geometry. The stress endpoint computes the shear stress in the wire, τ = 8·F·D·Kw/(π·d³), applying the Wahl correction factor Kw = (4C−1)/(4C−4) + 0.615/C for curvature and direct shear, and also reports the uncorrected stress. Lengths are in millimetres, force in newtons and stress in megapascals. Everything is computed locally and deterministically, so it is instant and private. A design aid — keep the spring index between about 4 and 12 and confirm against the material's allowable stress. Ideal for mechanical-design and CAD tools, spring-selection and prototyping apps, maker and robotics projects, and engineering calculators. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is helical-spring design; for beam deflection use a beam API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/springcoil-api","description":"oanor gateway"}],"tags":[{"name":"Spring"},{"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/force":{"get":{"operationId":"get_v1_force","tags":["Spring"],"summary":"Force ↔ deflection","description":"","parameters":[{"name":"spring_rate","in":"query","required":false,"description":"Spring rate k (N/mm)","schema":{"type":"string"},"example":"2"},{"name":"wire_diameter","in":"query","required":false,"description":"Or geometry: wire d","schema":{"type":"string"}},{"name":"mean_diameter","in":"query","required":false,"description":"mean D","schema":{"type":"string"}},{"name":"active_coils","in":"query","required":false,"description":"active coils n","schema":{"type":"string"}},{"name":"deflection","in":"query","required":false,"description":"Deflection x mm (to get force)","schema":{"type":"string"},"example":"10"},{"name":"force","in":"query","required":false,"description":"Or force N (to get deflection)","schema":{"type":"string"}},{"name":"material","in":"query","required":false,"description":"Material (with geometry)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"mode":"deflection_to_force","note":"F = k · x. Provide a spring_rate, or the geometry (wire_diameter, mean_diameter, active_coils) to derive it.","force_N":20,"deflection_mm":10,"spring_rate_N_per_mm":2},"meta":{"timestamp":"2026-06-04T01:59:05.354Z","request_id":"bd679c73-f764-4a82-bae9-8cd73b8f26cc"},"status":"ok","message":"Force <-> deflection","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/rate":{"get":{"operationId":"get_v1_rate","tags":["Spring"],"summary":"Spring rate from geometry","description":"","parameters":[{"name":"wire_diameter","in":"query","required":true,"description":"Wire diameter d (mm)","schema":{"type":"string"},"example":"2"},{"name":"mean_diameter","in":"query","required":true,"description":"Mean coil diameter D (mm)","schema":{"type":"string"},"example":"20"},{"name":"active_coils","in":"query","required":true,"description":"Active coils n","schema":{"type":"string"},"example":"10"},{"name":"material","in":"query","required":false,"description":"music_wire|stainless_steel|… (default music_wire)","schema":{"type":"string"},"example":"music_wire"},{"name":"shear_modulus","in":"query","required":false,"description":"Or explicit G (MPa)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Spring index C = D/d; aim for 4–12. Rate in newtons per millimetre of deflection.","formula":"k = G·d⁴ / (8·D³·n).","material":"music_wire","spring_rate":{"N_per_m":1982.5,"N_per_mm":1.9825,"lb_per_in":11.32037},"active_coils":10,"spring_index":10,"mean_diameter_mm":20,"wire_diameter_mm":2,"shear_modulus_mpa":79300},"meta":{"timestamp":"2026-06-04T01:59:05.441Z","request_id":"df41c044-e46a-4035-ab0f-3eeddd50f5c0"},"status":"ok","message":"Spring rate from 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/stress":{"get":{"operationId":"get_v1_stress","tags":["Spring"],"summary":"Wire shear stress (Wahl)","description":"","parameters":[{"name":"wire_diameter","in":"query","required":true,"description":"Wire diameter d (mm)","schema":{"type":"string"},"example":"2"},{"name":"mean_diameter","in":"query","required":true,"description":"Mean diameter D (mm)","schema":{"type":"string"},"example":"20"},{"name":"force","in":"query","required":false,"description":"Force N","schema":{"type":"string"},"example":"19.825"},{"name":"deflection","in":"query","required":false,"description":"Or deflection x (with rate/coils)","schema":{"type":"string"}},{"name":"active_coils","in":"query","required":false,"description":"Active coils (to derive force)","schema":{"type":"string"}},{"name":"material","in":"query","required":false,"description":"Material","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"τ = 8·F·D·Kw / (π·d³). Wahl factor Kw = (4C−1)/(4C−4) + 0.615/C accounts for curvature and direct shear.","force_N":19.825,"wahl_factor":1.14483,"spring_index":10,"shear_factor_Ks":1.05,"mean_diameter_mm":20,"shear_stress_mpa":144.489,"wire_diameter_mm":2,"shear_stress_uncorrected_mpa":126.21},"meta":{"timestamp":"2026-06-04T01:59:05.536Z","request_id":"9786b128-4675-4262-9fb6-82160d8b0bf6"},"status":"ok","message":"Wire shear stress (Wahl)","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":"springcoil","note":"Helical compression-spring maths — computed locally and deterministically, no key, no third-party service. mm / N / MPa.","endpoints":["/v1/rate","/v1/force","/v1/stress","/v1/meta"],"materials":["music_wire","steel","spring_steel","stainless_steel","phosphor_bronze","beryllium_copper","brass","titanium","inconel","monel"]},"meta":{"timestamp":"2026-06-04T01:59:05.613Z","request_id":"ca08f244-6b80-4f21-939a-56b43f36d2da"},"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":15000,"rps_limit":5,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2400,"monthly_call_quota":80000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7400,"monthly_call_quota":406000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/springcoil-api"}