{"openapi":"3.1.0","info":{"title":"Cross Stitch API","version":"1.0.0","description":"Cross-stitch and counted-thread maths as an API, computed locally and deterministically — the design-size and floss numbers a stitcher plans a pattern with. The design endpoint turns a stitch count into a finished size on a given fabric count: design size = stitch count ÷ fabric count (stitches per inch), so a 140×98-stitch chart on 14-count Aida stitches up at 10×7 inches (25.4×17.8 cm); it adds the fabric to cut with a margin (≈3 inches each side for the hoop and finishing), reports the total stitches, and converts the same chart to another count — that 140×98 design shrinks to 7.8×5.4 inches on 18-count. The floss endpoint estimates the skeins of thread: skeins ≈ ceil(stitches ÷ stitches-per-skein), where about 1,200 full cross-stitches per skein is typical for two strands on 14-count, and it makes sure you buy at least one skein per colour. Everything is computed locally and deterministically, so it is instant and private. Ideal for cross-stitch, embroidery, needlework and craft-pattern app developers, pattern-and-kit and fabric tools, and needlework education. Pure local computation — no key, no third-party service, instant. Fabric count is stitches per inch; sizes in inches and centimetres. Live, nothing stored. 2 compute endpoints. Floss/skein figures are estimates — buy a little extra.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/crossstitch-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":{"get":{"operationId":"get_v1_design","tags":["CrossStitch"],"summary":"Design size & fabric","description":"","parameters":[{"name":"stitch_width","in":"query","required":true,"description":"Stitches across","schema":{"type":"string"},"example":"140"},{"name":"stitch_height","in":"query","required":true,"description":"Stitches down","schema":{"type":"string"},"example":"98"},{"name":"fabric_count","in":"query","required":true,"description":"Fabric count (stitches/inch)","schema":{"type":"string"},"example":"14"},{"name":"margin","in":"query","required":false,"description":"Margin each side (in, default 3)","schema":{"type":"string"},"example":"3"},{"name":"convert_to_count","in":"query","required":false,"description":"Also convert to this count","schema":{"type":"string"},"example":"18"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Design size = stitch count ÷ fabric count (stitches per inch). Add a margin (≈3\") each side for the hoop and finishing. A higher count makes a smaller, finer piece.","inputs":{"margin":3,"fabric_count":14,"stitch_width":140,"stitch_height":98},"converted":{"fabric_count":18,"design_width_inches":7.7778,"design_height_inches":5.4444},"total_stitches":13720,"design_width_cm":25.4,"fabric_width_cm":40.64,"design_height_cm":17.78,"fabric_height_cm":33.02,"design_width_inches":10,"fabric_width_inches":16,"design_height_inches":7,"fabric_height_inches":13},"meta":{"timestamp":"2026-06-06T07:14:09.146Z","request_id":"0b08efc5-c3b6-43b2-a409-ec2c783cf507"},"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/floss":{"get":{"operationId":"get_v1_floss","tags":["CrossStitch"],"summary":"Floss / skein estimate","description":"","parameters":[{"name":"stitches","in":"query","required":true,"description":"Total stitches","schema":{"type":"string"},"example":"5000"},{"name":"stitches_per_skein","in":"query","required":false,"description":"Stitches per skein (default 1200)","schema":{"type":"string"}},{"name":"colors","in":"query","required":false,"description":"Number of colours","schema":{"type":"string"},"example":"8"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Skeins ≈ ceil(stitches ÷ stitches-per-skein); ~1,200 stitches/skein is typical for 2 strands on 14-count (more on finer counts). Buy at least one skein per colour — partial colours still need a whole skein.","inputs":{"colors":8,"stitches":5000,"stitches_per_skein":1200},"skeins_to_buy":8,"skeins_by_thread":5},"meta":{"timestamp":"2026-06-06T07:14:09.238Z","request_id":"12f5977b-d6ba-42aa-bc8b-fd2c493a5e0e"},"status":"ok","message":"Floss estimate","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 is stitches per inch (14/16/18 Aida; for evenweave stitched over 2, halve the thread count). Add ~3\" margin each side. Floss/skein counts are estimates — buy a little extra.","service":"crossstitch-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/floss":"Skeins of floss to buy from the stitch count (and colour count).","GET /v1/design":"Stitched size, fabric to buy and a count conversion from the stitch count and fabric count."},"description":"Cross-stitch maths: design size on a fabric count, fabric needed with margin, count conversion and floss/skein estimating."},"meta":{"timestamp":"2026-06-06T07:14:09.302Z","request_id":"8821249b-6295-46ac-9552-aa0fc355aa95"},"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":5850,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":360,"monthly_call_quota":55500,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1010,"monthly_call_quota":236000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3250,"monthly_call_quota":1335000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/crossstitch-api"}