{"openapi":"3.1.0","info":{"title":"AI Solver API","description":"\nSolve heads-up postflop no-limit hold'em spots and get the same output as the GTO Gecko app: the strategy, the range\nand the EV of every hand at every decision.\n\n**One solve is one street.** A solve of a flop or a turn lists its *exits*: the lines that end the street. To get the\nnext street, continue from a solve with one exit and one card. There are three ways to do that:\n\n1. **Step by step.** `POST /v1/solves` with a spot, then `POST /v1/solves` with `parent`, `line` (or `exit_id`) and `card`.\n2. **One line in one request.** Add `then: [{line, card}, {line, card}]` to the spot.\n3. **Many lines and cards.** Add `expand: [{lines, cards}, {lines, cards}]`; `\"all\"` solves every line or card and\n   `\"distinct\"` skips cards that are strategically the same as one already solved.\n\nAsk `POST /v1/estimates` first: it returns the number of solves and credits for the same body, at no charge.\nAuthenticate with `Authorization: Bearer <key>`. Keys that start with `gecko_test_` run against a sandbox at no charge.\n","version":"1.0"},"paths":{"/v1/health":{"get":{"tags":["Reference"],"summary":"Service status, what the solver supports, and how fast it is now","operationId":"health_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/hands":{"get":{"tags":["Reference"],"summary":"The order of the 1,326 hands in every range and result","operationId":"hands_v1_hands_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/pricing":{"get":{"tags":["Reference"],"summary":"Credits for a solve, and the packs and plans on sale","operationId":"pricing_v1_pricing_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/account":{"get":{"tags":["Account"],"summary":"Credits, limits and usage of the key in use","operationId":"account_v1_account_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/ledger":{"get":{"tags":["Account"],"summary":"Every change of the credit balance, newest first","operationId":"ledger_v1_ledger_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/billing/checkout":{"post":{"tags":["Account"],"summary":"A payment page for a credit pack or a monthly plan","operationId":"checkout_v1_billing_checkout_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/trees":{"post":{"tags":["Solves"],"summary":"The betting tree and street exits of a spot (no charge, no solve)","operationId":"tree_v1_trees_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"},"examples":{"spot":{"summary":"A flop","value":{"board":["As","Ks","7h"],"pot":100,"stack":300,"bet_sizes":[0.33,0.75],"raise_sizes":[1.0],"max_raises":1}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/estimates":{"post":{"tags":["Solves"],"summary":"How many solves and credits a request needs (no charge)","operationId":"estimate_v1_estimates_post","requestBody":{"content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Body"},"examples":{"one street":{"summary":"Solve one street","value":{"board":["As","Ks","7h"],"pot":100,"stack":300,"ranges":[{"AA":1,"AKs":1,"QQ":0.5},{"KK":1,"AQs":1,"JTs":1}],"bet_sizes":[0.33,0.75],"raise_sizes":[1.0],"max_raises":1}},"one line":{"summary":"Flop, turn and river of one line","value":{"board":["As","Ks","7h"],"pot":100,"stack":300,"ranges":[{"AA":1,"AKs":1,"QQ":0.5},{"KK":1,"AQs":1,"JTs":1}],"bet_sizes":[0.33,0.75],"raise_sizes":[1.0],"max_raises":1,"then":[{"line":["c","b33","c"],"card":"2c"},{"line":["c","c"],"card":"9d"}]}},"many":{"summary":"Every line, each distinct turn card","value":{"board":["As","Ks","7h"],"pot":100,"stack":300,"ranges":[{"AA":1,"AKs":1,"QQ":0.5},{"KK":1,"AQs":1,"JTs":1}],"bet_sizes":[0.33,0.75],"raise_sizes":[1.0],"max_raises":1,"expand":[{"lines":"all","cards":"distinct"}],"max_credits":300}},"boards":{"summary":"The same spot on several boards","value":{"pot":100,"stack":300,"ranges":[{"AA":1,"AKs":1,"QQ":0.5},{"KK":1,"AQs":1,"JTs":1}],"bet_sizes":[0.33,0.75],"raise_sizes":[1.0],"max_raises":1,"boards":[["As","Ks","7h"],["Qd","Jd","2c"]]}}}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/solves":{"post":{"tags":["Solves"],"summary":"Solve a spot, or the next street of a finished solve","operationId":"create_v1_solves_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"idempotency-key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Idempotency-Key"}},{"name":"prefer","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefer"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Body"},"examples":{"one street":{"summary":"Solve one street","value":{"board":["As","Ks","7h"],"pot":100,"stack":300,"ranges":[{"AA":1,"AKs":1,"QQ":0.5},{"KK":1,"AQs":1,"JTs":1}],"bet_sizes":[0.33,0.75],"raise_sizes":[1.0],"max_raises":1}},"next street":{"summary":"The next street of a finished solve","value":{"parent":"slv_...","line":["c","b33","c"],"card":"2c"}},"one line":{"summary":"Flop, turn and river of one line","value":{"board":["As","Ks","7h"],"pot":100,"stack":300,"ranges":[{"AA":1,"AKs":1,"QQ":0.5},{"KK":1,"AQs":1,"JTs":1}],"bet_sizes":[0.33,0.75],"raise_sizes":[1.0],"max_raises":1,"then":[{"line":["c","b33","c"],"card":"2c"},{"line":["c","c"],"card":"9d"}]}},"many":{"summary":"Every line, each distinct turn card","value":{"board":["As","Ks","7h"],"pot":100,"stack":300,"ranges":[{"AA":1,"AKs":1,"QQ":0.5},{"KK":1,"AQs":1,"JTs":1}],"bet_sizes":[0.33,0.75],"raise_sizes":[1.0],"max_raises":1,"expand":[{"lines":"all","cards":"distinct"}],"max_credits":300}},"boards":{"summary":"The same spot on several boards","value":{"pot":100,"stack":300,"ranges":[{"AA":1,"AKs":1,"QQ":0.5},{"KK":1,"AQs":1,"JTs":1}],"bet_sizes":[0.33,0.75],"raise_sizes":[1.0],"max_raises":1,"boards":[["As","Ks","7h"],["Qd","Jd","2c"]]}}}}}},"responses":{"202":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}},"get":{"tags":["Solves"],"summary":"Your requests, newest first","operationId":"list_solves_v1_solves_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":200,"minimum":1,"default":50,"title":"Limit"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/solves/{solve_id}":{"get":{"tags":["Solves"],"summary":"Status of a solve; for a request with expand, its progress","operationId":"get_v1_solves__solve_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"solve_id","in":"path","required":true,"schema":{"type":"string","title":"Solve Id"}},{"name":"prefer","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Prefer"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/solves/{solve_id}/result":{"get":{"tags":["Solves"],"summary":"The solution: strategy, range and EV of every hand at every decision, and the street exits","operationId":"result_v1_solves__solve_id__result_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"solve_id","in":"path","required":true,"schema":{"type":"string","title":"Solve Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/solves/{solve_id}/exits":{"get":{"tags":["Solves"],"summary":"The lines that end the street of a finished solve","operationId":"exits_v1_solves__solve_id__exits_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"solve_id","in":"path","required":true,"schema":{"type":"string","title":"Solve Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/solves/{solve_id}/children":{"get":{"tags":["Solves"],"summary":"The next-street solves under a solve","operationId":"children_v1_solves__solve_id__children_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"solve_id","in":"path","required":true,"schema":{"type":"string","title":"Solve Id"}},{"name":"scope","in":"query","required":false,"schema":{"type":"string","pattern":"^(children|tree)$","default":"children","title":"Scope"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":500,"minimum":1,"default":100,"title":"Limit"}},{"name":"after","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"After"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/solves/{solve_id}/nodes":{"get":{"tags":["Solves"],"summary":"The decisions of a result, without per-hand data","operationId":"nodes_v1_solves__solve_id__nodes_get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"solve_id","in":"path","required":true,"schema":{"type":"string","title":"Solve Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/solves/{solve_id}/nodes/{node_id}":{"get":{"tags":["Solves"],"summary":"One decision of a result: range, strategy and EV of each hand","operationId":"node_v1_solves__solve_id__nodes__node_id__get","security":[{"HTTPBearer":[]}],"parameters":[{"name":"solve_id","in":"path","required":true,"schema":{"type":"string","title":"Solve Id"}},{"name":"node_id","in":"path","required":true,"schema":{"type":"string","title":"Node Id"}},{"name":"hands","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hands"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}},"/v1/warmup":{"post":{"tags":["Solves"],"summary":"Start a solver before the first solve (no charge)","operationId":"warmup_v1_warmup_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}},"security":[{"HTTPBearer":[]}]}},"/v1/solves/{solve_id}/cancel":{"post":{"tags":["Solves"],"summary":"Stop a request: waiting solves are cancelled and not charged","operationId":"cancel_v1_solves__solve_id__cancel_post","security":[{"HTTPBearer":[]}],"parameters":[{"name":"solve_id","in":"path","required":true,"schema":{"type":"string","title":"Solve Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"4XX":{"description":"An error, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}},"5XX":{"description":"A failure on our side, as application/problem+json","content":{"application/problem+json":{"schema":{"$ref":"#/components/schemas/Problem"}}}}}}}},"components":{"schemas":{"Problem":{"properties":{"type":{"type":"string","title":"Type"},"title":{"type":"string","title":"Title"},"status":{"type":"integer","title":"Status"},"code":{"type":"string","title":"Code"},"detail":{"type":"string","title":"Detail"},"request_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Request Id"}},"type":"object","required":["type","title","status","code","detail"],"title":"Problem","description":"Every error, as `application/problem+json`. `code` is stable; act on it, not on the text."}},"securitySchemes":{"HTTPBearer":{"type":"http","description":"Your API key: gecko_live_... or gecko_test_...","scheme":"bearer"}}}}