{"openapi":"3.1.0","info":{"title":"PokerSolver","version":"0.1.0","description":"Solver answers one spot at a time, for study away from the tables. See /accuracy for what each answer stands on."},"servers":[{"url":"https://pokersolver.app/api/v1"}],"paths":{"/get_capabilities":{"post":{"operationId":"get_capabilities","summary":"What PokerSolver covers","description":"Game modes, stack ranges, accepted hand history exports, answer fields and limits.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{}}}}},"responses":{"200":{"description":"The answer, a `job_id` and the wait, or `unsupported_reason`."},"400":{"description":"Bad input, with `error`."}}}},"/solve_hand":{"post":{"operationId":"solve_hand","summary":"Solve a spot or read a hand","description":"Solver answer from settings (`spot`, one decision) or a raw export (`hand_history`, the first hand, every decision to its end). Gives frequencies, or a `job_id` and the wait. For study away from the tables. Pots with three or more players after the flop are not answered.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"spot":{"type":"object","properties":{"game":{"type":"object","description":"The game. get_capabilities lists what we have. The closest chart answers, and `match` says how close.","properties":{"variant":{"type":"string","enum":["holdem","omaha"]},"format":{"type":"string","enum":["cash","spin"]},"table":{"type":"string","enum":["6max","5max","4max","3max","hu"]},"stack_bb":{"type":"number"},"small_blind_bb":{"type":"number"},"ante_bb":{"type":"number"},"rake_cap_bb":{"type":"number"},"stacks_bb":{"type":"object","description":"A spin's stack per seat.","additionalProperties":{"type":"number"}},"eq_model":{"type":"string","enum":["ICM","chip EV"]}},"required":["table"]},"hero":{"type":"string","enum":["UTG","HJ","CO","BTN","SB","BB"],"description":"The seat you ask about."},"hand":{"type":"string","description":"A hand class, like K9s."},"cards":{"type":"string","description":"Two cards, like Ks9s. Needed after the flop."},"line":{"type":"array","description":"The preflop so far. Seats not named have folded.","items":{"type":"object","properties":{"seat":{"type":"string","enum":["UTG","HJ","CO","BTN","SB","BB"]},"action":{"type":"string","enum":["fold","check","call","raise","allin"]},"size_bb":{"type":"number","description":"The total a raise goes to."}},"required":["seat","action"]}},"board":{"type":"string","description":"The flop, like Kd7s2c."},"postflop":{"type":"array","items":{"type":"string"},"description":"The line after the flop: send back the `line` an answer gave, with TURN <card> and RIVER <card> where they are dealt, or SIZE <bb> for another player's bet."}},"required":["game","hero"]},"hand_history":{"type":"string","description":"Raw hand history text."},"account":{"type":"string","description":"The number your first answer gave. Leave it out on the first call."}}}}}},"responses":{"200":{"description":"The answer, a `job_id` and the wait, or `unsupported_reason`."},"400":{"description":"Bad input, with `error`."}}}},"/get_result":{"post":{"operationId":"get_result","summary":"Get a waiting answer","description":"The answer for a `job_id`, or how much longer to wait.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"job_id":{"type":"string","description":"From solve_hand."},"account":{"type":"string","description":"The number your first answer gave. Leave it out on the first call."}},"required":["job_id"]}}}},"responses":{"200":{"description":"The answer, a `job_id` and the wait, or `unsupported_reason`."},"400":{"description":"Bad input, with `error`."}}}},"/get_preflop":{"post":{"operationId":"get_preflop","summary":"Preflop answer for one spot","description":"What the chart does with one hand in one preflop spot. Never a whole chart.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"game":{"type":"object","description":"The game. get_capabilities lists what we have. The closest chart answers, and `match` says how close.","properties":{"variant":{"type":"string","enum":["holdem","omaha"]},"format":{"type":"string","enum":["cash","spin"]},"table":{"type":"string","enum":["6max","5max","4max","3max","hu"]},"stack_bb":{"type":"number"},"small_blind_bb":{"type":"number"},"ante_bb":{"type":"number"},"rake_cap_bb":{"type":"number"},"stacks_bb":{"type":"object","description":"A spin's stack per seat.","additionalProperties":{"type":"number"}},"eq_model":{"type":"string","enum":["ICM","chip EV"]}},"required":["table"]},"hero":{"type":"string","enum":["UTG","HJ","CO","BTN","SB","BB"],"description":"The seat you ask about."},"hand":{"type":"string","description":"A hand class, like K9s."},"cards":{"type":"string","description":"Two cards, like Ks9s. Needed after the flop."},"line":{"type":"array","description":"The preflop so far. Seats not named have folded.","items":{"type":"object","properties":{"seat":{"type":"string","enum":["UTG","HJ","CO","BTN","SB","BB"]},"action":{"type":"string","enum":["fold","check","call","raise","allin"]},"size_bb":{"type":"number","description":"The total a raise goes to."}},"required":["seat","action"]}},"board":{"type":"string","description":"The flop, like Kd7s2c."},"postflop":{"type":"array","items":{"type":"string"},"description":"The line after the flop: send back the `line` an answer gave, with TURN <card> and RIVER <card> where they are dealt, or SIZE <bb> for another player's bet."},"account":{"type":"string","description":"The number your first answer gave. Leave it out on the first call."}},"required":["game","hero"]}}}},"responses":{"200":{"description":"The answer, a `job_id` and the wait, or `unsupported_reason`."},"400":{"description":"Bad input, with `error`."}}}},"/equity":{"post":{"operationId":"equity","summary":"Equity by enumeration","description":"Each hand or range's share of the pot, by enumerating every matchup and runout.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"hands":{"type":"array","items":{"type":"string"},"description":"2 to 6 hands or ranges: AhKh, QQ+, AKs."},"board":{"type":"string","description":"0, 3, 4 or 5 cards."},"dead":{"type":"string","description":"Other known cards."}},"required":["hands"]}}}},"responses":{"200":{"description":"The answer, a `job_id` and the wait, or `unsupported_reason`."},"400":{"description":"Bad input, with `error`."}}}},"/combos":{"post":{"operationId":"combos","summary":"Count combos","description":"How many combos of a range are left on a board, and what each makes.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"string","description":"Like AK,AQ,KQ."},"board":{"type":"string","description":"The board."}},"required":["range"]}}}},"responses":{"200":{"description":"The answer, a `job_id` and the wait, or `unsupported_reason`."},"400":{"description":"Bad input, with `error`."}}}},"/pot_odds":{"post":{"operationId":"pot_odds","summary":"Pot odds","description":"The equity a call needs.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"pot":{"type":"number","description":"What is in the middle, the bet you face included."},"to_call":{"type":"number"}},"required":["pot","to_call"]}}}},"responses":{"200":{"description":"The answer, a `job_id` and the wait, or `unsupported_reason`."},"400":{"description":"Bad input, with `error`."}}}},"/icm":{"post":{"operationId":"icm","summary":"ICM equity","description":"Each stack's share of the prizes by Malmuth-Harville, which is a model.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"stacks":{"type":"array","items":{"type":"number"}},"payouts":{"type":"array","items":{"type":"number"}}},"required":["stacks","payouts"]}}}},"responses":{"200":{"description":"The answer, a `job_id` and the wait, or `unsupported_reason`."},"400":{"description":"Bad input, with `error`."}}}},"/request_game_mode":{"post":{"operationId":"request_game_mode","summary":"Request a game mode","description":"Ask for a game we don't cover. It joins a queue that may take a long time.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"game":{"type":"object","description":"The game. get_capabilities lists what we have. The closest chart answers, and `match` says how close.","properties":{"variant":{"type":"string","enum":["holdem","omaha"]},"format":{"type":"string","enum":["cash","spin"]},"table":{"type":"string","enum":["6max","5max","4max","3max","hu"]},"stack_bb":{"type":"number"},"small_blind_bb":{"type":"number"},"ante_bb":{"type":"number"},"rake_cap_bb":{"type":"number"},"stacks_bb":{"type":"object","description":"A spin's stack per seat.","additionalProperties":{"type":"number"}},"eq_model":{"type":"string","enum":["ICM","chip EV"]}},"required":["table"]},"account":{"type":"string","description":"The number your first answer gave. Leave it out on the first call."}},"required":["game"]}}}},"responses":{"200":{"description":"The answer, a `job_id` and the wait, or `unsupported_reason`."},"400":{"description":"Bad input, with `error`."}}}},"/get_account":{"post":{"operationId":"get_account","summary":"Account","description":"Credits on an account number.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","properties":{"account":{"type":"string","description":"The number your first answer gave. Leave it out on the first call."}},"required":["account"]}}}},"responses":{"200":{"description":"The answer, a `job_id` and the wait, or `unsupported_reason`."},"400":{"description":"Bad input, with `error`."}}}}}}