{"openapi":"3.1.0","info":{"title":"Sewing & Fabric API","version":"1.0.0","description":"Sewing and fabric-estimating maths as an API, computed locally and deterministically — the yardage numbers a sewist, quilter or curtain-maker works a project out with. The yardage endpoint lays cut pieces onto a bolt: pieces per row = floor(fabric width ÷ piece width), rows = ceil(quantity ÷ per row), and the fabric length = rows × piece height plus a waste allowance — six 18×22-inch pieces from 44-inch quilting cotton need about 2 yards. The curtain endpoint sizes drapery for fullness: drops = ceil(window width × fullness ÷ fabric width), where 2× is a standard gather and 2.5–3× is luxe, and each drop is the finished length plus top and bottom hems (rounded up to the pattern repeat) — a 60-inch window at 2.5× fullness on 54-inch fabric takes three drops and about 8.3 yards. The binding endpoint sizes quilt binding: length = perimeter + overlap for corners and joins, strips = ceil(length ÷ fabric width) cut at the strip width. Everything is computed locally and deterministically, so it is instant and private. Ideal for sewing, quilting, home-decor, upholstery and craft app developers, fabric-calculator and project-planning tools, and sewing education. Pure local computation — no key, no third-party service, instant. Imperial inches in; yards and metres out. Live, nothing stored. 3 compute endpoints. Add pattern-repeat allowance for prints; a planning aid.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/sewing-api","description":"oanor gateway"}],"tags":[{"name":"Sewing"},{"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/binding":{"get":{"operationId":"get_v1_binding","tags":["Sewing"],"summary":"Quilt binding","description":"","parameters":[{"name":"quilt_width","in":"query","required":true,"description":"Quilt width (in)","schema":{"type":"string"},"example":"60"},{"name":"quilt_height","in":"query","required":true,"description":"Quilt height (in)","schema":{"type":"string"},"example":"80"},{"name":"strip_width","in":"query","required":false,"description":"Binding strip width (in, default 2.5)","schema":{"type":"string"}},{"name":"fabric_width","in":"query","required":false,"description":"Fabric width (in, default 44)","schema":{"type":"string"}},{"name":"overlap","in":"query","required":false,"description":"Corner/join overlap (in, default 10)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Binding length = perimeter + overlap for corners and joins. Strips = ceil(binding length ÷ fabric width), each cut at the strip width (2.5\" makes a common double-fold binding).","inputs":{"quilt_width":60,"strip_width":2.5,"fabric_width":44,"quilt_height":80},"strips_needed":7,"perimeter_inches":280,"fabric_length_yards":0.4861,"fabric_length_inches":17.5,"fabric_length_meters":0.4445,"binding_length_inches":290},"meta":{"timestamp":"2026-06-06T07:14:09.691Z","request_id":"4811186a-5c31-4043-8f3b-8c4d9ed95fdb"},"status":"ok","message":"Quilt binding","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/curtain":{"get":{"operationId":"get_v1_curtain","tags":["Sewing"],"summary":"Curtain fabric","description":"","parameters":[{"name":"window_width","in":"query","required":true,"description":"Window/rod width (in)","schema":{"type":"string"},"example":"60"},{"name":"finished_length","in":"query","required":true,"description":"Finished curtain length (in)","schema":{"type":"string"},"example":"84"},{"name":"fullness","in":"query","required":false,"description":"Fullness ratio (default 2)","schema":{"type":"string"},"example":"2.5"},{"name":"fabric_width","in":"query","required":false,"description":"Fabric width (in, default 54)","schema":{"type":"string"},"example":"54"},{"name":"hem_allowance","in":"query","required":false,"description":"Top+bottom hems (in, default 16)","schema":{"type":"string"}},{"name":"pattern_repeat","in":"query","required":false,"description":"Pattern repeat (in)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Drops = ceil(window width × fullness ÷ fabric width). Each drop is the finished length plus hems (rounded up to the pattern repeat). 2× fullness is standard, 2.5–3× for a luxe gather.","drops":3,"inputs":{"fullness":2.5,"fabric_width":54,"window_width":60,"hem_allowance":16,"finished_length":84},"cut_length_inches":100,"total_length_yards":8.3333,"fabric_width_needed":150,"total_length_inches":300,"total_length_meters":7.62},"meta":{"timestamp":"2026-06-06T07:14:09.787Z","request_id":"c6121e11-e087-4bf4-b5ea-97ed2f46edb9"},"status":"ok","message":"Curtain fabric","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/yardage":{"get":{"operationId":"get_v1_yardage","tags":["Sewing"],"summary":"Fabric for cut pieces","description":"","parameters":[{"name":"piece_width","in":"query","required":true,"description":"Piece width (in)","schema":{"type":"string"},"example":"18"},{"name":"piece_height","in":"query","required":true,"description":"Piece height (in)","schema":{"type":"string"},"example":"22"},{"name":"quantity","in":"query","required":false,"description":"Number of pieces (default 1)","schema":{"type":"string"},"example":"6"},{"name":"fabric_width","in":"query","required":false,"description":"Bolt width (in, default 44)","schema":{"type":"string"},"example":"44"},{"name":"waste_percent","in":"query","required":false,"description":"Waste % (default 10)","schema":{"type":"string"}}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Pieces per row = floor(fabric width ÷ piece width); rows = ceil(quantity ÷ per row); fabric length = rows × piece height, plus waste. Add pattern-repeat allowance for prints.","inputs":{"quantity":6,"piece_width":18,"fabric_width":44,"piece_height":22,"waste_percent":10},"rows_needed":3,"length_yards":2.0167,"length_inches":72.6,"length_meters":1.844,"pieces_per_row":2},"meta":{"timestamp":"2026-06-06T07:14:09.859Z","request_id":"cb2b33c4-4afd-4290-bf69-b2a5f837167b"},"status":"ok","message":"Fabric yardage","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":"Imperial inches in, yards and metres out. Defaults: 44\" quilting cotton / 54\" home-dec fabric, 2× curtain fullness, 2.5\" binding. Add pattern-repeat allowance for prints. A planning aid.","service":"sewing-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/binding":"Quilt binding strip length and fabric from the quilt perimeter.","GET /v1/curtain":"Curtain fabric: drops, cut length and total from window width and fullness.","GET /v1/yardage":"Fabric length to cut N pieces of a size from a bolt of a width."},"description":"Sewing & fabric maths: fabric yardage for cut pieces, curtain fabric with fullness, and quilt binding."},"meta":{"timestamp":"2026-06-06T07:14:09.952Z","request_id":"19d91fb9-f0c0-4cdd-b453-f1187357043d"},"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":5550,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":545,"monthly_call_quota":52500,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1490,"monthly_call_quota":229000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":4550,"monthly_call_quota":1265000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/sewing-api"}