{"openapi":"3.1.0","info":{"title":"Hammock Hang API","version":"1.0.0","description":"Hammock-hang maths as an API, computed locally and deterministically — the suspension-force, ridgeline and strap-height numbers a camper or hammock hanger sets up by. It all comes back to the 30-degree rule. The force endpoint shows why: the tension in each suspension line is the occupant weight ÷ (2 × sin of the hang angle), so at a 30° hang each strap carries about one body weight, but flatten the hang to 15° and it jumps to roughly 1.9 times — which is what over-stresses straps, trees and your back when people pull a hammock drum-tight. The ridgeline endpoint sizes a structural ridgeline at about 83 % of the hammock length, the fixed line that reproduces that ~30° lay and the right sag on any pair of trees. The strapheight endpoint estimates how high to attach the straps from the distance between the trees and the seat height you want, since trees farther apart need higher anchor points to hold the angle. Everything is computed locally and deterministically, so it is instant and private. Ideal for camping, backpacking, outdoor-gear and hammock app developers, hang-calculator and trip-planning tools, and adventure software. Pure local computation — no key, no third-party service, instant. Weight and lengths in your own unit. Live, nothing stored. 3 compute endpoints.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/hammock-api","description":"oanor gateway"}],"tags":[{"name":"Hammock"},{"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":["Hammock"],"summary":"Suspension force at an angle","description":"","parameters":[{"name":"weight","in":"query","required":true,"description":"Occupant weight","schema":{"type":"string"},"example":"200"},{"name":"hang_angle_deg","in":"query","required":false,"description":"Hang angle from horizontal (default 30)","schema":{"type":"string"},"example":"30"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Each suspension line carries weight ÷ (2 × sin(hang angle)). The classic 30° hang puts about one body weight on each strap; flatten to 15° and it nearly doubles to ~1.9×, which is why a tight, level hang stresses straps, trees and your back. Aim for ~30°.","inputs":{"weight":200,"hang_angle_deg":30},"force_per_side":200,"total_on_each_tree":200,"multiple_of_body_weight":1},"meta":{"timestamp":"2026-06-06T15:30:49.038Z","request_id":"ef93194a-88cb-4354-bfe3-26086f17c35d"},"status":"ok","message":"Suspension force","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/ridgeline":{"get":{"operationId":"get_v1_ridgeline","tags":["Hammock"],"summary":"Structural ridgeline length","description":"","parameters":[{"name":"hammock_length","in":"query","required":true,"description":"Hammock length","schema":{"type":"string"},"example":"132"},{"name":"ridgeline_percent","in":"query","required":false,"description":"Ridgeline % of length (default 83)","schema":{"type":"string"},"example":"83"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"A structural ridgeline fixed at about 83 % of the hammock length gives the repeatable ~30° hang and the right amount of sag every time. Shorter ridgeline = tighter/flatter; longer = deeper. Set it once and your lay is consistent on any trees.","inputs":{"hammock_length":132,"ridgeline_percent":83},"ridgeline_length":109.56},"meta":{"timestamp":"2026-06-06T15:30:49.112Z","request_id":"bf375a9f-1f39-46cd-8eef-d3a4a893a7a3"},"status":"ok","message":"Ridgeline length","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/strapheight":{"get":{"operationId":"get_v1_strapheight","tags":["Hammock"],"summary":"Strap attach height","description":"","parameters":[{"name":"tree_distance","in":"query","required":true,"description":"Distance between trees","schema":{"type":"string"},"example":"144"},{"name":"sit_height","in":"query","required":false,"description":"Desired seat height (default 18)","schema":{"type":"string"},"example":"18"},{"name":"hang_angle_deg","in":"query","required":false,"description":"Hang angle (default 30)","schema":{"type":"string"},"example":"30"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Hang straps roughly the seat height plus the sag above the ground — taller trees (farther apart) need higher straps to keep the ~30° angle. Rule of thumb: 'foot in, head up' and the centre about chair-height off the ground; fine-tune by sliding the straps.","inputs":{"sit_height":18,"tree_distance":144,"hang_angle_deg":30},"line_rise_each_side":41.6,"strap_attach_height":61.2},"meta":{"timestamp":"2026-06-06T15:30:49.186Z","request_id":"5424ddaf-a02d-460f-b44c-674bf03f061f"},"status":"ok","message":"Strap height","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":"The 30° hang is the sweet spot: force per line = weight ÷ (2·sin angle), so flatter hangs multiply the load fast. Ridgeline ≈ 83 % of hammock length. Weight/lengths in your own unit (output matches).","service":"hammock-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/force":"Tension in each suspension line at a given hang angle.","GET /v1/ridgeline":"Structural ridgeline length for a hammock (≈ 83 %).","GET /v1/strapheight":"Strap attachment height from tree distance and sit height."},"description":"Hammock-hang maths: suspension force at a hang angle, structural ridgeline length, and strap-attachment height."},"meta":{"timestamp":"2026-06-06T15:30:49.280Z","request_id":"11c80686-a7a1-4c41-8945-1e3adc1b5acd"},"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":6960,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":436,"monthly_call_quota":55300,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1196,"monthly_call_quota":227300,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3792,"monthly_call_quota":1337000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/hammock-api"}