{"openapi":"3.1.0","info":{"title":"Canasta Scoring API","version":"1.0.0","description":"Canasta card-game scoring as an API, computed locally and deterministically and exactly — the point counting that makes Canasta famously fiddly, done for you. The card-value endpoint totals the point value of a hand or meld: a joker is 50, aces and twos 20, eights through kings 10, fours through sevens and black threes 5, and a red three a 100-point bonus card — so a joker, an ace, a king, a seven and a red three come to 185. The bonus endpoint adds the round bonuses: a natural (pure) canasta is 500, a mixed canasta 300, each red three 100 (all four double to 800), going out 100, and going out concealed a further 100 — two naturals, a mixed, three red threes and going out is 1,700. The hand-score endpoint nets it out: the card points you melded, plus the bonuses, minus the card points left stranded in your hand when the round ends. Everything is computed locally and deterministically, so it is instant and exact. Ideal for Canasta apps, online card-room scorekeepers, club and family game-night tools, and learning aids. Pure local computation — no key, no third-party service, instant. Exact integer maths. Live, nothing stored. 3 compute endpoints. Classic Canasta values; rule variants differ.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/canasta-api","description":"oanor gateway"}],"tags":[{"name":"Canasta"},{"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/bonus":{"get":{"operationId":"get_v1_bonus","tags":["Canasta"],"summary":"Canasta and round bonuses","description":"","parameters":[{"name":"natural_canastas","in":"query","required":false,"description":"Number of natural canastas","schema":{"type":"string"},"example":"2"},{"name":"mixed_canastas","in":"query","required":false,"description":"Number of mixed canastas","schema":{"type":"string"},"example":"1"},{"name":"red_threes","in":"query","required":false,"description":"Red threes (0-4)","schema":{"type":"string"},"example":"3"},{"name":"going_out","in":"query","required":false,"description":"Went out this round","schema":{"type":"string"},"example":"true"},{"name":"concealed","in":"query","required":false,"description":"Went out concealed","schema":{"type":"string"},"example":"false"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Bonuses: a natural (pure) canasta is 500, a mixed canasta 300, each red three 100 (all four double to 800), going out 100, and going out concealed a further 100. A team needs at least one canasta to go out. Red threes count against you if you have not melded.","inputs":{"concealed":false,"going_out":true,"red_threes":3,"mixed_canastas":1,"natural_canastas":2},"total_bonus":1700,"going_out_points":100,"red_three_points":300,"mixed_canasta_points":300,"natural_canasta_points":1000},"meta":{"timestamp":"2026-06-06T15:30:41.468Z","request_id":"802b3066-fbc2-42a2-96c4-015b0bb2f66e"},"status":"ok","message":"Bonuses","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/card-value":{"get":{"operationId":"get_v1_card_value","tags":["Canasta"],"summary":"Point value of cards","description":"","parameters":[{"name":"cards","in":"query","required":true,"description":"Comma-separated ranks (joker,a,k,7,red3,...)","schema":{"type":"string"},"example":"joker,a,k,7,red3"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Card points in Canasta: a joker is 50; aces and twos (wild) 20; eights through kings 10; fours through sevens and black threes 5; a red three is a 100-point bonus card. These are the values that count toward melds and the minimum opening meld — bonuses for canastas and going out are separate.","inputs":{"cards":"joker,a,k,7,red3"},"breakdown":{"7":5,"a":20,"k":10,"red3":100,"joker":50},"total_points":185},"meta":{"timestamp":"2026-06-06T15:30:41.562Z","request_id":"bafee282-5f1e-43c6-b931-cbd3b97847bf"},"status":"ok","message":"Card value","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/hand-score":{"get":{"operationId":"get_v1_hand_score","tags":["Canasta"],"summary":"Net hand score","description":"","parameters":[{"name":"melded_points","in":"query","required":true,"description":"Card points melded","schema":{"type":"string"},"example":"200"},{"name":"bonus_points","in":"query","required":false,"description":"Bonus points","schema":{"type":"string"},"example":"700"},{"name":"hand_points","in":"query","required":false,"description":"Card points left in hand","schema":{"type":"string"},"example":"45"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Hand score = the card points you melded, plus the canasta/red-three/going-out bonuses, minus the card points left in your hand when the round ends. Cards still in hand are a straight penalty, so meld them or go out. First team to 5,000 points wins the game.","inputs":{"hand_points":45,"bonus_points":700,"melded_points":200},"net_score":855},"meta":{"timestamp":"2026-06-06T15:30:41.649Z","request_id":"16b34480-a09f-4859-b9ce-64aaec45f20f"},"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/meta":{"get":{"operationId":"get_v1_meta","tags":["Meta"],"summary":"Spec","description":"","parameters":[],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"notes":"Classic Canasta values: joker 50, A/2 20, 8–K 10, 4–7 & black 3 = 5, red 3 = 100. Canasta 500/300, red threes 100 (×2 if all four), going out 100 (+100 concealed). Game to 5,000. Rule variants differ.","service":"canasta-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/bonus":"Canasta, red-three and going-out bonuses.","GET /v1/card-value":"Total point value of a list of cards (comma-separated ranks).","GET /v1/hand-score":"Net hand score = melded points + bonuses − points in hand."},"description":"Canasta scoring: card point values, meld/canasta/red-three/going-out bonuses, and the net hand score."},"meta":{"timestamp":"2026-06-06T15:30:41.754Z","request_id":"d0327439-2fe5-42ab-a0a7-614039810ee9"},"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":6500,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":355,"monthly_call_quota":90000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1170,"monthly_call_quota":360000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3620,"monthly_call_quota":1600000,"rps_limit":48,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/canasta-api"}