{"openapi":"3.1.0","info":{"title":"Dominoes Scoring API","version":"1.0.0","description":"Dominoes scoring as an API, computed locally and deterministically and exactly — the points behind a game of bones, whether you play Block, Draw or All Fives. The score endpoint gives the winner's points at the end of a hand: when a player dominoes or the game blocks, the winner takes the total pip count left in the opponents' hands — pass each opponent's remaining pips and it sums them, optionally rounding to the nearest five as many house rules do, so 12, 8 and 23 left on the table is 43, or 45 rounded. The fives endpoint scores All Fives (Muggins): a play scores whenever the open ends of the layout add up to a multiple of five, and you score that sum — open ends of 3 and 2 make 5 for five points, 5-5-5 across a spinner makes 15, while a 6 scores nothing. The set endpoint gives the statistics of a double-N set: a double-six has (6+1)(6+2)/2 = 28 tiles and 168 total pips, a double-nine has 55 tiles and 495 pips, with the heaviest tile and its pip value. Everything is computed locally and deterministically, so it is instant and exact. Ideal for dominoes apps, online and club scorekeepers, game-night and tournament tools, and learning aids. Pure local computation — no key, no third-party service, instant. Exact integer maths. Live, nothing stored. 3 compute endpoints. Standard Western dominoes; regional variants score differently.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/dominoes-api","description":"oanor gateway"}],"tags":[{"name":"Dominoes"},{"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/fives":{"get":{"operationId":"get_v1_fives","tags":["Dominoes"],"summary":"All-Fives / Muggins open-end score","description":"","parameters":[{"name":"open_ends","in":"query","required":true,"description":"Comma-separated open-end values","schema":{"type":"string"},"example":"3,2"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"In All Fives (Muggins) you score whenever the open ends of the layout add up to a multiple of five — and you score that sum. A spinner and the two arms can give two, three or four open ends; a double counts both its pips. Sums that are not a multiple of five (or zero) score nothing.","inputs":{"open_ends":[3,2]},"points":5,"scores":true,"open_end_sum":5},"meta":{"timestamp":"2026-06-06T15:30:45.291Z","request_id":"bcacd16a-0ec1-47f9-ad0d-0216a71f8045"},"status":"ok","message":"All Fives","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/score":{"get":{"operationId":"get_v1_score","tags":["Dominoes"],"summary":"Winner points from leftover tiles","description":"","parameters":[{"name":"opponent_pips","in":"query","required":true,"description":"Comma-separated opponent pip totals","schema":{"type":"string"},"example":"12,8,23"},{"name":"round_to_five","in":"query","required":false,"description":"Round the total to the nearest five","schema":{"type":"string"},"example":"false"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"When a player dominoes (or the game blocks), the winner scores the total pip count left in the opponents' hands. Some house rules (common in Muggins/All Fives) round that total to the nearest five — set round_to_five. Pass each opponent's remaining pip total as a list.","inputs":{"opponent_pips":[12,8,23],"round_to_five":false},"raw_total":43,"score_awarded":43},"meta":{"timestamp":"2026-06-06T15:30:45.391Z","request_id":"27873c02-fdda-486a-bbbb-1419e1327040"},"status":"ok","message":"Hand score","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/set":{"get":{"operationId":"get_v1_set","tags":["Dominoes"],"summary":"Double-N set statistics","description":"","parameters":[{"name":"max_double","in":"query","required":false,"description":"Highest double in the set (default 6)","schema":{"type":"string"},"example":"6"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"A double-N set has every unordered pair from 0–0 up to N–N: (N+1)(N+2)/2 tiles. Each number appears N+2 times across the set, so the total pip count is (N+2)·N·(N+1)/2 — 28 tiles and 168 pips for a standard double-six, 55 tiles and 495 pips for a double-nine.","inputs":{"max_double":6},"tile_count":28,"total_pips":168,"heaviest_tile":"6-6","heaviest_tile_pips":12},"meta":{"timestamp":"2026-06-06T15:30:45.490Z","request_id":"99233334-7cbd-452d-8614-4c155ff706df"},"status":"ok","message":"Set statistics","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":"Open-end sums score when divisible by five; double-N set has (N+1)(N+2)/2 tiles and (N+2)N(N+1)/2 pips. Pass pip lists as comma-separated values. Standard Western dominoes; regional variants score differently.","service":"dominoes-api","endpoints":{"GET /v1/set":"Tile count, total pips and heaviest tile for a double-N set.","GET /v1/meta":"This document.","GET /v1/fives":"All-Fives / Muggins score from the board's open-end values.","GET /v1/score":"Winner's points = total pips left in opponents' hands (optional round-to-5)."},"description":"Dominoes scoring: winner's points from opponents' leftover tiles, All-Fives (Muggins) open-end scoring, and double-N set statistics."},"meta":{"timestamp":"2026-06-06T15:30:45.604Z","request_id":"c106627e-c7a4-4588-82c1-97d63478c659"},"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":5500,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":385,"monthly_call_quota":82000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1190,"monthly_call_quota":330000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3650,"monthly_call_quota":1500000,"rps_limit":48,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/dominoes-api"}