{"openapi":"3.1.0","info":{"title":"Notation Parser API","version":"0.1.0","description":"Pay-per-call API (x402, USDC) that reads compact game notation (mah-jongg hands, Tablut boards, playing cards) into clean structured JSON for agents and game builders. Informational only; not an official notation standard or game ruling.","x-guidance":"Use POST /v1/parse-notation with JSON bodies. Unpaid calls receive HTTP 402 with x402 payment terms. See /llms.txt.","termsOfService":"https://ordstirr.com/agents/terms","contact":{"url":"https://ordstirr.com"}},"servers":[{"url":"https://notation.ordstirr.com"}],"paths":{"/health":{"get":{"operationId":"health","summary":"Free health check","security":[],"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/v1/parse-notation":{"post":{"operationId":"parseGameNotation","summary":"Read mah-jongg hand, Tablut board or playing-card notation into structured JSON","description":"Send a kind (mahjong-hand, tafl-board or playing-cards) and the notation as text (or an array of codes; for tafl-board, \"start\", 9 row strings, or one string with / between rows). Returns named pieces, counts, a canonical compact form and warnings. Reads notation only: it does not check legality, score, or referee. Not an official notation standard of any game. Unpaid calls receive HTTP 402 with x402 payment terms. Invalid input is rejected with HTTP 400 and never charged.","x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.01"},"protocols":[{"x402":{}}]},"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"kind":{"type":"string","enum":["mahjong-hand","tafl-board","playing-cards"],"description":"What the notation is."},"text":{"description":"The notation. A string (max 400 characters) or an array of codes/rows. Mahjong: \"123c 55d EEE RdRd\". Tafl: \"start\" or 9 rows of 9 joined with \"/\". Cards: \"As 10h Kd\".","oneOf":[{"type":"string","maxLength":400},{"type":"array","maxItems":80,"items":{"type":"string","maxLength":40}}]}},"required":["kind","text"],"additionalProperties":false},"example":{"kind":"mahjong-hand","text":"123c 55d EEE RdRd F1"}}}},"responses":{"200":{"description":"Result","content":{"application/json":{"schema":{"type":"object"},"example":{"kind":"mahjong-hand","tiles":[{"code":"1c","name":"1 Characters","group":"characters"},{"code":"2c","name":"2 Characters","group":"characters"},{"code":"3c","name":"3 Characters","group":"characters"}],"tile_count":11,"playing_tile_count":10,"bonus_tile_count":1,"compact":"123c 55d EEE RdRd F1","counts":{"1c":1,"2c":1,"3c":1,"5d":2,"E":3,"Rd":2,"F1":1},"by_group":{"characters":3,"bamboo":0,"dots":2,"winds":3,"dragons":2,"flowers":1,"seasons":0},"honour_tiles":5,"warnings":[],"tile_codes":"1c-9c characters, 1b-9b bamboo, 1d-9d dots, E S W N winds, Rd Gd Wd dragons, F1-F4 flowers, S1-S4 seasons (S alone is South).","note":"Reads notation only: it does not check that a hand, board or deal is legal, score it, or referee a move. The codes are Ordstirr's own documented conventions (tile names after Babcock 1923, board after Linnaeus 1732, standard 52-card deck); this is not an official notation standard of any game.","terms_url":"https://ordstirr.com/agents/terms","notice":"Informational only, not an official notation standard or game ruling. Review before relying on it."}}}},"400":{"description":"Invalid input (never charged)"},"402":{"description":"Payment required (x402). See the PAYMENT-REQUIRED header."},"413":{"description":"Request body too large (never charged)"}}}}}}