{"openapi":"3.1.0","info":{"title":"Cross-Stitch API","version":"1.0.0","description":"Cross-stitch and embroidery maths as an API, computed locally and deterministically — the design-size, fabric and floss numbers a cross-stitcher, embroidery designer or needlework-shop works a project out with. The design-size endpoint turns a stitch count and a fabric count (stitches per inch) into the finished size: size = stitch count ÷ fabric count, so a 140 × 98 design on 14-count Aida finishes at 10 × 7 inches (25.4 × 17.8 cm), smaller on 18-count and larger on 11-count because a higher count packs more stitches per inch — and it returns the total stitch count (width × height) that drives the floss and the hours. The fabric-needed endpoint adds a margin on every side to give the fabric to cut: design size + twice the margin per dimension, with the usual 3 inches per side for hooping, framing and finishing, so a 10 × 7 design wants a 16 × 13 inch cut. The thread-length endpoint estimates floss from the geometry of a full cross — the front two diagonals plus the back returns is about (2√2 + 2) ÷ fabric count inches per stitch — so 5,000 stitches on 14-count is roughly 1,724 inches, about 44 m, and it estimates the skeins given the number of strands (a 6-strand skein is ~8 m). Everything is computed locally and deterministically, so it is instant and private. Ideal for cross-stitch and embroidery pattern tools, needlework-shop and kit apps, and craft-project calculators. Pure local computation — no key, no third-party service, instant. Floss figures are planning estimates — buy a little extra and dye-lot match. 3 compute endpoints. For sewing yardage use a sewing API; for knitting gauge a knitting API.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/embroidery-api","description":"oanor gateway"}],"tags":[{"name":"CrossStitch"},{"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/design-size":{"get":{"operationId":"get_v1_design_size","tags":["CrossStitch"],"summary":"Finished size from stitch and fabric count","description":"","parameters":[{"name":"stitch_count_w","in":"query","required":true,"description":"Stitches across (width)","schema":{"type":"string"},"example":"140"},{"name":"stitch_count_h","in":"query","required":true,"description":"Stitches down (height)","schema":{"type":"string"},"example":"98"},{"name":"fabric_count","in":"query","required":true,"description":"Fabric count (stitches per inch, e.g. 14)","schema":{"type":"string"},"example":"14"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The finished size = the stitch count ÷ the fabric count (stitches per inch). A 140 × 98 design on 14-count Aida is 10 × 7 inches (25.4 × 17.8 cm); the same chart on 18-count finishes smaller and on 11-count larger, because a higher count packs more stitches per inch. The total stitch count (width × height) drives the floss and the hours.","inputs":{"fabric_count":14,"stitch_count_h":98,"stitch_count_w":140},"width_cm":25.4,"width_in":10,"height_cm":17.78,"height_in":7,"total_stitches":13720},"meta":{"timestamp":"2026-06-07T08:17:52.992Z","request_id":"e52d770f-4acd-409d-9256-7559fa791ec1"},"status":"ok","message":"Design size","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/fabric-needed":{"get":{"operationId":"get_v1_fabric_needed","tags":["CrossStitch"],"summary":"Cut fabric size with margin","description":"","parameters":[{"name":"design_width_in","in":"query","required":true,"description":"Design width (in)","schema":{"type":"string"},"example":"10"},{"name":"design_height_in","in":"query","required":true,"description":"Design height (in)","schema":{"type":"string"},"example":"7"},{"name":"margin_in","in":"query","required":false,"description":"Margin per side (in, default 3)","schema":{"type":"string"},"example":"3"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"The fabric to cut = the design size plus a margin on every side, so add twice the margin to each dimension. The usual margin is 3 inches per side for hooping, framing and finishing — a 10 × 7 design wants a 16 × 13 inch cut. Skimp on the margin and there is no room to mount or frame the finished piece.","inputs":{"margin_in":3,"design_width_in":10,"design_height_in":7},"fabric_width_cm":40.64,"fabric_width_in":16,"fabric_height_cm":33.02,"fabric_height_in":13},"meta":{"timestamp":"2026-06-07T08:17:53.078Z","request_id":"a64abdab-9564-4fb5-bcce-3c69852259b6"},"status":"ok","message":"Fabric needed","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/thread-length":{"get":{"operationId":"get_v1_thread_length","tags":["CrossStitch"],"summary":"Floss length and skeins","description":"","parameters":[{"name":"stitch_count","in":"query","required":true,"description":"Total stitches","schema":{"type":"string"},"example":"5000"},{"name":"fabric_count","in":"query","required":true,"description":"Fabric count (stitches per inch)","schema":{"type":"string"},"example":"14"},{"name":"strands","in":"query","required":false,"description":"Strands used (default 2)","schema":{"type":"string"},"example":"2"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Floss use is estimated from the geometry of a full cross on the fabric: front two diagonals plus the back returns is about (2√2 + 2) ÷ fabric count inches per stitch. 5,000 stitches on 14-count is roughly 1,724 inches — about 44 m of finished stitching. A 6-strand skein is ~8 m, so stitching with 2 strands yields ~24 m of usable thread per skein; this is a planning estimate — buy a little extra and dye-lot match.","inputs":{"strands":2,"fabric_count":14,"stitch_count":5000},"total_thread_m":43.8,"skeins_estimate":1.83,"total_thread_in":1724.4,"thread_per_stitch_in":0.3449},"meta":{"timestamp":"2026-06-07T08:17:53.163Z","request_id":"61c11709-b67d-4bb2-acee-1836ce8803d2"},"status":"ok","message":"Thread 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/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"Fabric count = stitches per inch. size = stitch_count/count; fabric = design + 2·margin; thread/stitch ≈ (2√2+2)/count inches. For sewing yardage use a sewing API; for knitting gauge a knitting API.","service":"embroidery-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/design-size":"Finished width/height and total stitches from stitch count and fabric count.","GET /v1/fabric-needed":"Cut fabric size from the design size and a margin.","GET /v1/thread-length":"Floss length and skein estimate from stitch count and fabric count."},"description":"Cross-stitch / embroidery maths: finished design size from stitch and fabric count, cut fabric size with margins, and floss length."},"meta":{"timestamp":"2026-06-07T08:17:53.219Z","request_id":"af5e5da3-bfac-4174-a167-bdd792be90b2"},"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":5800,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":650,"monthly_call_quota":54000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":2200,"monthly_call_quota":238000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":7100,"monthly_call_quota":1080000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/embroidery-api"}