{"openapi":"3.1.0","info":{"title":"Chainmaille API","version":"1.0.0","description":"Chainmaille maths as an API, computed locally and deterministically — the aspect-ratio and ring numbers a maille artist weaves to. The aspect endpoint computes the all-important Aspect Ratio = inner diameter ÷ wire diameter, and solves for whichever of the three you are missing, then lists the weaves that ring will make: AR, not absolute size, decides everything — too low and the rings won’t close through each other, too high and the weave goes floppy, so a 6.4 mm ID on 1.6 mm wire is AR 4.0, good for European 4-in-1, Byzantine, box chain and more. The ring endpoint does the material maths: wire per ring ≈ π × (inner diameter + wire diameter) — the mean-diameter circumference — so those AR-4 rings take about 25 mm of wire each and weigh roughly 0.4 g in steel; pass a wire length to get how many rings it yields, or a ring count to get the total wire and weight, in any of nine metals from aluminium to silver. Everything is computed locally and deterministically, so it is instant and private. Ideal for chainmaille, jewelry, cosplay-armour and maker app developers, ring-buying and project-estimator tools, and craft software. Pure local computation — no key, no third-party service, instant. Dimensions in mm. Live, nothing stored. 2 compute endpoints. For wire-gauge ↔ mm use a wire-gauge API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/chainmaille-api","description":"oanor gateway"}],"tags":[{"name":"Chainmaille"},{"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/aspect":{"get":{"operationId":"get_v1_aspect","tags":["Chainmaille"],"summary":"Aspect ratio + weaves","description":"","parameters":[{"name":"inner_diameter","in":"query","required":false,"description":"Inner diameter (mm)","schema":{"type":"string"},"example":"6.4"},{"name":"wire_diameter","in":"query","required":false,"description":"Wire diameter (mm)","schema":{"type":"string"},"example":"1.6"},{"name":"aspect_ratio","in":"query","required":false,"description":"Aspect ratio (provide any two)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Aspect Ratio = inner diameter ÷ wire diameter. It, not absolute size, decides which weaves work: too low and rings won't close through each other, too high and the weave is floppy. European 4-in-1 likes ~3.8–5.5; Byzantine ~3–4; dragonscale ~3–3.6.","inputs":{"aspect_ratio":4,"wire_diameter":1.6,"inner_diameter":6.4},"aspect_ratio":4,"wire_diameter":1.6,"inner_diameter":6.4,"suitable_weaves":["european-4-in-1","byzantine","box-chain","half-persian-3-1","full-persian-6-1","japanese-6-in-1","helm-chain"]},"meta":{"timestamp":"2026-06-06T07:13:57.916Z","request_id":"29ac2e80-b645-4740-b825-2cfb1958fe94"},"status":"ok","message":"Aspect ratio","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/ring":{"get":{"operationId":"get_v1_ring","tags":["Chainmaille"],"summary":"Wire length + weight per ring","description":"","parameters":[{"name":"inner_diameter","in":"query","required":true,"description":"Inner diameter (mm)","schema":{"type":"string"},"example":"6.4"},{"name":"wire_diameter","in":"query","required":true,"description":"Wire diameter (mm)","schema":{"type":"string"},"example":"1.6"},{"name":"material","in":"query","required":false,"description":"steel, stainless, aluminum, copper, brass, silver, …","schema":{"type":"string"},"example":"steel"},{"name":"density_g_cm3","in":"query","required":false,"description":"Custom density (g/cm³)","schema":{"type":"string"}},{"name":"wire_length_m","in":"query","required":false,"description":"Wire length (m) → rings yield","schema":{"type":"string"}},{"name":"ring_count","in":"query","required":false,"description":"Ring count → total wire & weight","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Wire per ring ≈ π × (inner diameter + wire diameter) — the mean-diameter circumference. Weight = wire volume × density. Add a little for cut loss and the kerf of the saw or cutter.","inputs":{"material":"steel","density_g_cm3":7.85,"wire_diameter":1.6,"inner_diameter":6.4},"wire_per_ring_in":0.9895,"wire_per_ring_mm":25.133,"weight_per_ring_g":0.3967},"meta":{"timestamp":"2026-06-06T07:13:58.013Z","request_id":"97f74abd-d763-487a-98c8-c7515e7c0f50"},"status":"ok","message":"Ring math","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":"Aspect Ratio = ID ÷ WD; dimensions in mm. Wire per ring = π × (ID + WD); weight = volume × material density (steel 7.85 g/cm³). For wire-gauge ↔ mm conversion use a wire-gauge API.","service":"chainmaille-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/ring":"Wire length and weight per ring, plus rings from a wire length or totals for a ring count.","GET /v1/aspect":"Aspect ratio (and the missing dimension) from inner diameter, wire diameter or AR, with suitable weaves."},"description":"Chainmaille maths: ring aspect ratio, per-ring wire length & weight, and rings from a length of wire."},"meta":{"timestamp":"2026-06-06T07:13:58.094Z","request_id":"4553c4e8-1b41-455f-b6d8-0e7991403712"},"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":6720,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":414,"monthly_call_quota":57400,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1152,"monthly_call_quota":232500,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3645,"monthly_call_quota":1356000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/chainmaille-api"}