{"openapi":"3.1.0","info":{"title":"Cribbage Score API","version":"1.0.0","description":"Cribbage hand-scoring maths as an API, computed locally and deterministically — the count a cribbage player, app or league tallies a hand by. The score endpoint takes the four-card hand and the starter (cut) card and returns the full breakdown by the rules: every distinct combination of cards summing to fifteen scores 2, each pair scores 2 (so three of a kind is 6 and four is 12), each run of three or more consecutive cards scores its length — counting the duplicate runs that pairs create — a four-card flush in the hand is 4 (five with the starter is 5, and the crib only scores a five-card flush), and his nobs, a Jack in hand matching the starter’s suit, is 1. It correctly scores the famous best hand, J-5-5-5 with a fifth 5 cut, at the maximum 29. The count endpoint tallies just fifteens, pairs and runs for any one to eight cards — useful for checking part of a hand or the pegging pile. Everything is computed locally and deterministically, so it is instant and private. Ideal for cribbage, card-game, board-game-companion and scoring app developers, score-verification and teaching tools, and game software. Pure local computation — no key, no third-party service, instant. Cards as rank+suit (5H, TD, JS). Live, nothing stored. 2 compute endpoints.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/cribbage-api","description":"oanor gateway"}],"tags":[{"name":"Cribbage"},{"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/count":{"get":{"operationId":"get_v1_count","tags":["Cribbage"],"summary":"Partial count","description":"","parameters":[{"name":"cards","in":"query","required":true,"description":"Any 1–8 cards","schema":{"type":"string"},"example":"5H,5S,5C"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK"},"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/score":{"get":{"operationId":"get_v1_score","tags":["Cribbage"],"summary":"Score a hand","description":"","parameters":[{"name":"hand","in":"query","required":true,"description":"Four cards (rank+suit)","schema":{"type":"string"},"example":"5H,5S,5C,JD"},{"name":"starter","in":"query","required":true,"description":"Starter / cut card","schema":{"type":"string"},"example":"5D"},{"name":"is_crib","in":"query","required":false,"description":"true for the crib (5-card flush only)","schema":{"type":"string"},"example":"false"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK"},"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"},"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":7600,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":402,"monthly_call_quota":58600,"rps_limit":6,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1130,"monthly_call_quota":237200,"rps_limit":15,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3602,"monthly_call_quota":1368000,"rps_limit":40,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/cribbage-api"}