{"openapi":"3.1.0","info":{"title":"Blackjack Strategy API","version":"1.0.0","description":"Blackjack maths as an API, computed locally and deterministically and exactly — the hand value, the textbook basic-strategy play and the dealer odds, the numbers that hold the house edge to half a percent. The hand-value endpoint scores a hand the way the table does: aces count 11 unless that busts, then 1, so it reports the best total, whether it is soft (an ace still counting 11, safe to hit) or hard, whether it busts, and whether two cards make a blackjack. The strategy endpoint gives the correct basic-strategy action — hit, stand, double or split — for any hand against the dealer's upcard, for the standard 4-to-8-deck game where the dealer stands on soft 17 with double-after-split allowed: 16 against a 10 hits, a pair of 8s always splits, soft 18 doubles against a 6 but hits against a 9, and 11 doubles against everything but an ace. The dealer-odds endpoint gives the dealer's bust probability by upcard — a 5 or 6 busts about 42 % of the time, an ace only 12 % — the reason you stand on stiffs against weak upcards. Everything is computed locally and deterministically, so it is instant and exact. Ideal for blackjack trainers and strategy apps, card-game and casino-game tools, learning aids, and game back-ends. Pure local computation — no key, no third-party service, instant. Live, nothing stored. 3 compute endpoints. Educational — not betting advice; the house always keeps an edge.","contact":{"name":"PremiumApi","url":"https://www.oanor.com/by/premiumapi"}},"servers":[{"url":"https://api.oanor.com/blackjack-api","description":"oanor gateway"}],"tags":[{"name":"Blackjack"},{"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/dealer-odds":{"get":{"operationId":"get_v1_dealer_odds","tags":["Blackjack"],"summary":"Dealer bust probability","description":"","parameters":[{"name":"dealer","in":"query","required":true,"description":"Dealer upcard (2-10, j, q, k, a)","schema":{"type":"string"},"example":"6"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Dealer bust probability by upcard, standing on soft 17. A 5 or 6 up is the dealer's weakest (busts ~42 %) — the 'bust cards' you press your bets and stand more against; a 7-through-ace up is strong, so you hit your stiffs harder. Approximate infinite-deck figures.","inputs":{"dealer":"6"},"bust_probability_pct":42.3},"meta":{"timestamp":"2026-06-06T15:30:39.826Z","request_id":"9ec501b4-291f-42f5-aa7c-ee3a36820b2b"},"status":"ok","message":"Dealer odds","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-value":{"get":{"operationId":"get_v1_hand_value","tags":["Blackjack"],"summary":"Best hand value","description":"","parameters":[{"name":"cards","in":"query","required":true,"description":"Comma-separated cards (2-10, j, q, k, a)","schema":{"type":"string"},"example":"a,7"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Aces count 11 unless that busts the hand, then 1 — a 'soft' total still has an ace counted as 11, so it can't bust on the next card. A two-card 21 is a blackjack (pays 3:2). Hit a soft hand freely; a hard 12–16 is the danger zone.","soft":true,"total":18,"inputs":{"cards":"a,7"},"is_bust":false,"is_blackjack":false},"meta":{"timestamp":"2026-06-06T15:30:39.911Z","request_id":"1c09f7f2-9fea-47e3-8bcc-56390d0e3416"},"status":"ok","message":"Hand 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/strategy":{"get":{"operationId":"get_v1_strategy","tags":["Blackjack"],"summary":"Basic-strategy action","description":"","parameters":[{"name":"cards","in":"query","required":true,"description":"Your cards (e.g. 8,8 or a,7)","schema":{"type":"string"},"example":"8,8"},{"name":"dealer","in":"query","required":true,"description":"Dealer upcard (2-10, j, q, k, a)","schema":{"type":"string"},"example":"10"}],"security":[{"oanorKey":[]}],"responses":{"200":{"description":"OK","content":{"application/json":{"example":{"data":{"note":"Basic strategy for 4–8 decks, dealer stands on soft 17, double-after-split allowed. Double and split apply only to a fresh two-card hand; otherwise hit or stand. Following basic strategy holds the house edge to about half a percent — but it is a guide, not a guarantee on any single hand.","soft":false,"basis":"pair","total":16,"action":"P","inputs":{"cards":"8,8","dealer":"10"},"action_label":"split"},"meta":{"timestamp":"2026-06-06T15:30:40.018Z","request_id":"e13f818b-8f86-4b61-839d-dd14cb565de6"},"status":"ok","message":"Basic strategy","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":"4–8 deck, dealer stands soft 17, DAS. Cards: 2-10, j/q/k, a. Strategy double/split assume a two-card hand. Educational — not betting advice; the house always keeps an edge.","service":"blackjack-api","endpoints":{"GET /v1/meta":"This document.","GET /v1/strategy":"Basic-strategy action (hit/stand/double/split) for a hand vs a dealer upcard.","GET /v1/hand-value":"Best total, soft/hard, bust and blackjack for a set of cards.","GET /v1/dealer-odds":"Dealer bust probability by upcard."},"description":"Blackjack maths: best hand value, the basic-strategy action for a hand vs a dealer upcard, and the dealer's bust probability by upcard."},"meta":{"timestamp":"2026-06-06T15:30:40.112Z","request_id":"b12aae84-426f-43c9-95fd-67d1def2147c"},"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":7000,"rps_limit":2,"hard_limit":true},{"slug":"starter","name":"Starter","price_cents_month":395,"monthly_call_quota":95000,"rps_limit":8,"hard_limit":true},{"slug":"pro","name":"Pro","price_cents_month":1230,"monthly_call_quota":380000,"rps_limit":20,"hard_limit":true},{"slug":"mega","name":"Mega","price_cents_month":3720,"monthly_call_quota":1650000,"rps_limit":48,"hard_limit":true}],"x-oanor-marketplace-url":"https://www.oanor.com/api/blackjack-api"}