{"openapi":"3.1.0","info":{"title":"Knitting Gauge API","version":"1.0.0","description":"Knitting and crochet gauge maths as an API, computed locally and deterministically. The stitches endpoint turns a gauge — the standard stitches and rows per 10 cm measured from a tension swatch — into the number of stitches to cast on for a target width and the number of rows for a target length; at 22 stitches and 30 rows per 10 cm, a 50 cm wide by 60 cm long piece needs 110 stitches and 180 rows. The gauge endpoint works backwards from a measured swatch, converting a count over a measured distance into stitches (or rows) per 10 cm, per centimetre and per inch — 33 stitches over 15 cm is a gauge of 22 per 10 cm. The convert-pattern endpoint re-scales a pattern written for one gauge to your own gauge so the finished garment keeps its intended size: your count = pattern count · (your gauge / pattern gauge), so a 100-stitch cast-on at a 20-per-10 cm pattern becomes 110 at your 22-per-10 cm tension. Dimensions are in centimetres. Everything is computed locally and deterministically, so it is instant and private. Ideal for knitting, crochet, pattern-design, craft-marketplace and maker app developers, gauge and tension calculators, and yarn-shop tools. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 endpoints. This is gauge and stitch maths; works for crochet too by using your stitch gauge.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/knitting-api","description":"oanor gateway"}],"tags":[{"name":"Knitting"},{"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/convert-pattern":{"get":{"operationId":"get_v1_convert_pattern","tags":["Knitting"],"summary":"Convert pattern between gauges","description":"","parameters":[{"name":"pattern_count","in":"query","required":true,"description":"Pattern stitch count","schema":{"type":"string"},"example":"100"},{"name":"pattern_gauge","in":"query","required":true,"description":"Pattern gauge (per 10 cm)","schema":{"type":"string"},"example":"20"},{"name":"your_gauge","in":"query","required":true,"description":"Your gauge (per 10 cm)","schema":{"type":"string"},"example":"22"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"To keep the finished size, your count = pattern count · (your gauge / pattern gauge). 100 sts at a 20/10 cm pattern gauge becomes 110 at your 22/10 cm gauge.","inputs":{"your_gauge":22,"pattern_count":100,"pattern_gauge":20},"your_count":110,"your_count_exact":110,"finished_dimension_cm":50},"meta":{"timestamp":"2026-06-05T19:50:19.655Z","request_id":"c5506f6f-a930-40f6-8418-ba3cc73b443f"},"status":"ok","message":"Convert pattern between gauges","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/gauge":{"get":{"operationId":"get_v1_gauge","tags":["Knitting"],"summary":"Gauge from a swatch","description":"","parameters":[{"name":"count","in":"query","required":true,"description":"Stitches/rows counted","schema":{"type":"string"},"example":"33"},{"name":"measured_cm","in":"query","required":true,"description":"Distance measured (cm)","schema":{"type":"string"},"example":"15"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Gauge per 10 cm = count/measured · 10. Counting 33 stitches over 15 cm gives 22 stitches per 10 cm.","inputs":{"count":33,"measured_cm":15},"per_cm":2.2,"per_10cm":22,"per_inch":5.588},"meta":{"timestamp":"2026-06-05T19:50:19.731Z","request_id":"ee3a18dc-8296-4797-9917-97e94f76a84d"},"status":"ok","message":"Gauge from swatch","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/stitches":{"get":{"operationId":"get_v1_stitches","tags":["Knitting"],"summary":"Stitches/rows for dimensions","description":"","parameters":[{"name":"stitches_per_10cm","in":"query","required":false,"description":"Stitch gauge per 10 cm","schema":{"type":"string"},"example":"22"},{"name":"width_cm","in":"query","required":false,"description":"Target width (cm)","schema":{"type":"string"},"example":"50"},{"name":"rows_per_10cm","in":"query","required":false,"description":"Row gauge per 10 cm","schema":{"type":"string"},"example":"30"},{"name":"length_cm","in":"query","required":false,"description":"Target length (cm)","schema":{"type":"string"},"example":"60"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Stitches = (width/10)·gauge, rows = (length/10)·row-gauge, with gauge measured per 10 cm. Cast on the rounded stitch count.","rows":180,"inputs":{"width_cm":50,"length_cm":60,"rows_per_10cm":30,"stitches_per_10cm":22},"stitches":110,"rows_exact":180,"stitches_exact":110},"meta":{"timestamp":"2026-06-05T19:50:19.840Z","request_id":"0cfd9f42-4dfe-472e-84a1-85755aa766a0"},"status":"ok","message":"Stitches for dimensions","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":"Gauge is stitches (or rows) per 10 cm — the knitting standard. Dimensions in centimetres. Works for crochet too (substitute your stitch gauge).","service":"knitting-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/gauge":"Gauge per 10 cm (and per inch) from a measured swatch.","GET /v1/stitches":"Stitches/rows for a target width/length at a gauge.","GET /v1/convert-pattern":"Re-scale a pattern's stitch count from its gauge to yours."},"description":"Knitting & crochet gauge maths: stitches and rows for target dimensions, gauge from a swatch, and converting a pattern between gauges."},"meta":{"timestamp":"2026-06-05T19:50:19.933Z","request_id":"e89c61f3-6d12-4657-a3d0-6fa6fc0a0685"},"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":7300,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":360,"monthly_call_quota":73000,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1000,"monthly_call_quota":325000,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3200,"monthly_call_quota":1720000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/knitting-api"}