{"openapi":"3.0.3","info":{"title":"pokerai.bet API(GTO 策略 + 扑克引擎)","version":"1.0","description":"面向 preflop / flop / turn / river 的 GTO 策略 API。返回每个动作的混合频率(不给「推荐动作」——由你按频率选择)。preflop 与 flop 命中预解 GTO 方案库,毫秒级即时返回;solver 端点实时计算(flop 约 70 秒,turn/river 更快)。牌张输入使用无分隔字符串(\"2c2h2s\"、\"AdKd\");返回的 board 是数组([\"2c\",\"2h\",\"2s\"])。范围字符串为逗号分隔的 `hand:weight`(类别记法 AA/AKs/AKo;weight 0..1,默认 1)。\n\n⚠ 注意:下方「Test Request」按钮会用你的 key 发送真实请求,消耗你的真实月度配额。第一次用?先读教程:https://pokerai.bet/zh/docs\n"},"servers":[{"url":"https://pokerai.bet"}],"security":[{"BearerApiKey":[]},{"XApiKey":[]}],"tags":[{"name":"预解查询","description":"预解 GTO 方案,毫秒级即时返回——preflop + 完整 flop 决策树。每次调用计 1 次预解配额。"},{"name":"实时求解","description":"实时求解器(flop 约 70 秒,turn/river 更快)。流程:schedule → tree → node。"},{"name":"范围转换","description":"沿行动线更新范围(范围转换 / flop 投影范围)。"}],"paths":{"/v1/gto/preflop":{"post":{"tags":["预解查询"],"operationId":"preflopStrategy","summary":"Preflop 策略(预解)","description":"计 1 次预解配额。局面类型(RFI/Limp/Raise/3-Bet/4-Bet/5-Bet)由动作序列自动推导。","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflopRequest"},"example":{"hole_cards":"AhKh","positions":{"hero":"MP"},"preflop_version":"6max","preflop_actions":[{"position":"SB","action":"small blind","amount":0.5},{"position":"BB","action":"big blind","amount":1},{"position":"UTG","action":"raise","amount":3}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PreflopResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/QuotaExceeded"}}}},"/v1/gto/preflop/range":{"post":{"tags":["预解查询"],"operationId":"preflopRange","summary":"单局面完整 preflop 范围(预解)","description":"一次调用返回某位置 + 行动线的完整 13×13 preflop 范围——169 个手牌类型 →\nfold/call/raise 频率。不传 `hole_cards`(局面由 positions +\npreflop_actions 决定)。计 1 次预解配额(按一次调用计,不是 169 次)。适合做范围网格。\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["table_size","positions","preflop_actions"],"properties":{"table_size":{"type":"string","example":"6max"},"preflop_version":{"type":"string","enum":["6max","6max_RC_100bb_200NL","6max_RC_100bb_100NL","6max_RC_40bb"],"description":"可选;使用哪套 6max preflop 图表(同 /v1/gto/preflop)。省略则用默认。"},"positions":{"type":"object","properties":{"hero":{"type":"string","example":"BTN"}}},"preflop_actions":{"type":"array","items":{"type":"object"},"description":"从 SB/BB 开始的完整动作序列,同 /v1/gto/preflop"}}},"example":{"table_size":"6max","preflop_version":"6max","positions":{"hero":"BTN"},"preflop_actions":[{"position":"SB","action":"small blind","amount":0.5},{"position":"BB","action":"big blind","amount":1}]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"range":{"type":"object","description":"手牌类型(AA / AKs / AKo)→ {fold, call, raise};共 169 项,每项频率和约为 1","additionalProperties":{"type":"object","properties":{"fold":{"type":"number"},"call":{"type":"number"},"raise":{"type":"number"}}}},"quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"}}}}},"example":{"range":{"AA":{"fold":0,"call":0,"raise":1},"AKs":{"fold":0,"call":0,"raise":1},"72o":{"fold":1,"call":0,"raise":0}},"quota":{"used":7,"limit":100}}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NoSolution"},"429":{"$ref":"#/components/responses/QuotaExceeded"}}}},"/v1/gto/preflop/versions":{"get":{"tags":["预解查询"],"operationId":"preflopVersions","summary":"列出已安装的 preflop 策略版本(免费)","description":"/v1/gto/preflop 与 /v1/gto/preflop/range 可选的 preflop_version 取值,附各版本的可读名称,并标明默认版本(省略 preflop_version 时使用)。免费(不计配额)。请用本端点代替硬编码列表——新版本会自动出现在这里。\n","responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"versions":{"type":"array","items":{"type":"object","properties":{"id":{"type":"string","description":"把它作为 preflop_version 传入"},"label":{"type":"string"},"default":{"type":"boolean","description":"默认版本上存在且为 true"}}}},"default":{"type":"string","description":"省略 preflop_version 时使用的 id"}}},"example":{"versions":[{"id":"6max","label":"6 max 100bb Deepsolver","default":true},{"id":"6max_RC_100bb_200NL","label":"6 max 100bb GG 200NL 3b/f 2.2x - 2.5x"},{"id":"6max_RC_100bb_100NL","label":"6 max 100bb GG 100NL 3b/f"},{"id":"6max_RC_40bb","label":"6 max 40bb GG 100NL"}],"default":"6max"}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/gto/flop/tree":{"post":{"tags":["预解查询"],"operationId":"flopTree","summary":"Flop 决策树(预解)","description":"计 1 次预解配额。返回起始范围 + 全部决策节点(每个节点附一个供 /v1/gto/flop/node 使用的 token)。","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlopTreeRequest"},"examples":{"SRP":{"summary":"单加注底池(SRP)——positions:hero、raiser、caller","value":{"board":"2c2h2s","pot_type":"SRP","positions":{"hero":"UTG","raiser":"UTG","caller":"BTN"}}},"3BET":{"summary":"3-bet 底池——positions:hero、raiser(开局加注者)、three_bettor","value":{"board":"2c2h2s","pot_type":"3BET","positions":{"hero":"CO","raiser":"CO","three_bettor":"BTN"}}},"4BET":{"summary":"4-bet 底池——positions:hero、raiser(4-bet 的开局者)、three_bettor(跟注的 3-bet 者)","value":{"board":"2c2h2s","pot_type":"4BET","positions":{"hero":"CO","raiser":"CO","three_bettor":"BTN"}}},"LIMP":{"summary":"Limp 底池——positions:hero、limper(hero 或 limper 必须是 BB)","value":{"board":"2c2h2s","pot_type":"LIMP","positions":{"hero":"BB","limper":"BTN"}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlopTreeResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NoSolution"},"429":{"$ref":"#/components/responses/QuotaExceeded"}}}},"/v1/gto/flop/node":{"post":{"tags":["预解查询"],"operationId":"flopNode","summary":"Flop 节点策略(预解)——决策树单节点","description":"flop 决策树的逐节点策略(免费,token 门控)。传入 POST /v1/gto/flop/tree 签发的 `node` token。带 hole_cards → 该手牌在此节点的混合策略;省略 hole_cards → 该节点的整范围策略。\n\n这就是获取 hero 每一个 flop 决策的方法——hero 有位置、hero 面对下注、或更靠后的行动:先取树,选一个 is_hero 为 true 的节点(例如 root/CHECK/BET_13 = hero 过牌后面对下注 → fold/call/raise),把它的 token 传进来。根节点(root)是 hero 的第一个决策(OOP check/bet)。\n\nflop 树只覆盖单条街;turn/river 决策走 solver 线(/v1/gto/solver/*)。\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlopNodeRequest"},"example":{"node":"eyJ...<token from /v1/gto/flop/tree>","hole_cards":"AdKd"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeStrategyResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"$ref":"#/components/responses/Forbidden"},"404":{"$ref":"#/components/responses/NoSolution"}}}},"/v1/gto/solver":{"post":{"tags":["实时求解"],"operationId":"solverSchedule","summary":"调度一次实时求解(flop/turn/river)","description":"board 长度决定街(3=flop,4=turn,5=river)。新触发的求解计 1 次求解配额;命中缓存的求解返回 status=queryable 且无 solve_quota 字段(不计费);所有求解主机繁忙时返回 429 status=busy。\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolverScheduleRequest"},"example":{"board":"2c2h2s9d","oop_range":"AA,KK,QQ,AKs","ip_range":"JJ,TT,AQs,KQs","pot":20,"effective_stack":90,"hero":"OOP","bet_sizes":{"turn":[67],"river":[75]},"raise_sizes":{"turn":[80],"river":[125]},"donk_sizes":{"turn":[55],"river":[90]},"raise_limit":3}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolverScheduleResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"description":"求解配额超限,或所有求解主机繁忙(status=busy)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}}}},"/v1/gto/solver/tree":{"post":{"tags":["实时求解"],"operationId":"solverTree","summary":"轮询求解树与节点状态(免费)","description":"轮询直到 spot_status = queryable。要把多街求解推进到实际发出的公共牌,传入已发的牌:`turn_card`(例如 flop 求解 → 指定某张 turn),和/或 `river_card`。从 *flop* 求解唯一确定一个 river 局面需要同时传 `turn_card` 和 `river_card`;turn 求解只需 `river_card`。都省略则返回该求解自身的街。\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["solve"],"properties":{"solve":{"type":"string","description":"来自 /v1/gto/solver 的 handle"},"turn_card":{"type":"string","description":"可选;flop 求解时,已发出的 turn 牌(如 \"Td\")——返回该 turn 之下的节点。"},"river_card":{"type":"string","description":"可选;已发出的 river 牌(如 \"Qh\")。flop 求解时需与 turn_card 搭配以消除歧义。"}}},"example":{"solve":"eyJ0Ijoic2x2X3h4eXoi...(handle from /v1/gto/solver)","turn_card":"Td","river_card":"Qh"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SolverTreeResponse"}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"503":{"$ref":"#/components/responses/UpstreamUnavailable"}}}},"/v1/gto/solver/node":{"post":{"tags":["实时求解"],"operationId":"solverNode","summary":"求解结果的节点策略(免费)","description":"hero 节点 → hero 策略;villain 节点(或省略 hole_cards)→ 整范围策略。","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["node"],"properties":{"node":{"type":"string","description":"来自 /v1/gto/solver/tree 的节点 token"},"hole_cards":{"$ref":"#/components/schemas/HoleCards"}}},"example":{"node":"eyJ0Ijoic2x2X3h4eXoi...(token from /v1/gto/solver/tree)","hole_cards":"AhKh"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/NodeStrategyResponse"},{"type":"object","properties":{"node_status":{"type":"string","enum":["available","computing","queryable","expired","error"],"description":"expired = 求解已被回收/替换,请重新调度;error = 求解器单节点 strategy_error(附 message);computing = 仍在求解。"},"message":{"type":"string","description":"node_status = error 时存在"}}}]}}}},"401":{"$ref":"#/components/responses/Unauthorized"},"503":{"$ref":"#/components/responses/UpstreamUnavailable"}}}},"/v1/gto/solver/release":{"post":{"tags":["实时求解"],"operationId":"solverRelease","summary":"提前释放求解端口(免费,可选)","description":"主动表示你已完成该 solve 的查询,让它的求解端口立即回到池中,而不是一直占用到缓存 TTL 到期(池子较小时可能导致下一次请求 429 busy)。可选——不调用则按 TTL 自动回收。只在该 solve 的最后一次 /v1/gto/solver/tree 和 /v1/gto/solver/node 之后调用:释放后端口可能被复用,该 solve 句柄的后续查询会返回 node_status = expired。幂等;不会重启求解器。\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","required":["solve"],"properties":{"solve":{"type":"string","description":"来自 /v1/gto/solver 的 handle"}}},"example":{"solve":"eyJ0Ijoic2x2X3h4eXoi...(handle from /v1/gto/solver)"}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"type":"object","properties":{"released":{"type":"boolean","description":"true=释放了一个存活的端口占用;false=该 solve 已过期(no-op)"}}},"example":{"released":true}}}},"401":{"$ref":"#/components/responses/Unauthorized"}}}},"/v1/gto/range":{"post":{"tags":["范围转换"],"operationId":"rangeConvert","summary":"范围转换——沿行动线更新范围","description":"求解器 /api/range 的薄代理。全部输入由你组装,包括 solver_results(决策树)。计 1 次预解配额。输出的范围可喂给下一街的求解。\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RangeRequest"},"example":{"range_oop":"AA,KK,QQ,JJ,AKs","range_ip":"TT,99,AQs,KQs,JTs","board":"2c2h2s","node_id":"root/CHECK/BET 8.000000","solver_results":{"node_type":"action_node","player":1,"strategy":{"actions":["CHECK","BET 8.000000"],"strategy":{"AsAh":[0.6,0.4]}},"childrens":{"CHECK":{"node_type":"action_node","player":0,"strategy":{"actions":["CHECK","BET 8.000000"],"strategy":{"KsKh":[0.5,0.5]}},"childrens":{"BET 8.000000":{"node_type":"action_node","player":1,"strategy":{"actions":["FOLD","CALL","RAISE 18.000000"],"strategy":{"QsQh":[0.2,0.5,0.3]}},"childrens":{}}}}}}}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RangeResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"429":{"$ref":"#/components/responses/QuotaExceeded"},"502":{"$ref":"#/components/responses/Upstream"}}}},"/v1/gto/flop/projected-range":{"post":{"tags":["范围转换"],"operationId":"projectedRange","summary":"投影范围——沿行动线的 flop 范围更新(预解配额)","description":"按给定 board / pot_type / positions,把 flop 起始范围沿行动线向前投影。计 1 次预解配额。返回与 /v1/gto/range 相同的范围更新输出。\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectedRangeRequest"},"example":{"board":"2c2h2s","pot_type":"SRP","positions":{"hero":"UTG","raiser":"UTG","caller":"BTN"},"node_id":"root/BET_4","normalize":true,"bluff_discount_ratio":0.8,"bluff_combos_ratio":0.5,"hero_position":"oop","hero_hand":"AsKs","partner_hands":["Ac9c"]}}}},"responses":{"200":{"description":"OK","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProjectedRangeResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"404":{"$ref":"#/components/responses/NoSolution"},"429":{"$ref":"#/components/responses/QuotaExceeded"}}}},"/v1/gto/evs":{"post":{"tags":["范围转换"],"operationId":"queryEvs","summary":"节点 EV——已完成求解的逐手、逐动作期望值(免费)","description":"已完成求解在某节点的逐手、逐动作期望值。传入求解 handle(来自 /v1/gto/solver)+ node_id(来自 /v1/gto/solver/tree);可选 hand 过滤到单手。免费(已在 /v1/gto/solver 计费)。请先轮询 /v1/gto/solver/tree 直到 queryable。\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvsRequest"},"example":{"solve":"eyJ0Ijoic2x2X3h4eXoi...(handle from /v1/gto/solver)","node_id":"root"}}}},"responses":{"200":{"description":"节点 EV;若尚未收敛则返回 { spot_status: computing }。","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvsResponse"}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"403":{"description":"求解 handle 无效或不属于你"},"410":{"description":"求解已过期(TTL);请经 /v1/gto/solver 重新调度"}}}},"/v1/gto/turn/projected-range":{"post":{"tags":["范围转换"],"operationId":"turnProjectedRange","summary":"投影范围——沿 turn 行动线的 turn→river 范围更新(免费)","description":"/v1/gto/flop/projected-range 的 turn→river 对应版,用于实时 turn 求解。把进入 turn 的范围(该求解调度时所用、从求解自身配置读取)沿一条 turn 行动线收窄——包括收尾的 CALL/CHECK——得到进入 river 的范围。免费(该求解已在 /v1/gto/solver 计费),同 /v1/gto/solver/tree。返回与 /v1/gto/range 相同的范围更新输出。请先轮询 /v1/gto/solver/tree 直到 spot_status = queryable。\n","requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnProjectedRangeRequest"},"example":{"solve":"eyJ0Ijoic2x2X3h4eXoi...(handle from /v1/gto/solver)","node_id":"root/CHECK/BET 6.000000/CALL","normalize":true}}}},"responses":{"200":{"description":"收窄后的进入 river 范围;若求解尚未收敛则返回 { spot_status: computing }(继续轮询 /v1/gto/solver/tree)。","content":{"application/json":{"schema":{"oneOf":[{"$ref":"#/components/schemas/RangeResponse"},{"type":"object","properties":{"spot_status":{"type":"string","enum":["computing"]}}}]}}}},"400":{"$ref":"#/components/responses/BadRequest"},"401":{"$ref":"#/components/responses/Unauthorized"},"410":{"description":"求解已过期(TTL)——请经 /v1/gto/solver 重新调度","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"502":{"$ref":"#/components/responses/Upstream"}}}},"/health":{"get":{"summary":"健康检查","operationId":"health_health_get","responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Health Health Get"}}}}}}},"/v1/pokerkit/texture":{"post":{"tags":["语义分析"],"summary":"牌面质地","operationId":"texture_v1_pokerkit_texture_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/nuts":{"post":{"tags":["语义分析"],"summary":"坚果牌","operationId":"nuts_v1_pokerkit_nuts_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/category-combos":{"post":{"tags":["语义分析"],"summary":"类别组合数","operationId":"category_combos_v1_pokerkit_category_combos_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/board-report":{"post":{"tags":["语义分析"],"summary":"牌面报告","operationId":"board_report_v1_pokerkit_board_report_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BoardRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/hand-tier":{"post":{"tags":["语义分析"],"summary":"成手等级","operationId":"hand_tier_v1_pokerkit_hand_tier_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/draws":{"post":{"tags":["语义分析"],"summary":"听牌","operationId":"draws_v1_pokerkit_draws_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/outs":{"post":{"tags":["语义分析"],"summary":"补牌","operationId":"outs_v1_pokerkit_outs_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/blockers":{"post":{"tags":["语义分析"],"summary":"阻断牌","operationId":"blockers_v1_pokerkit_blockers_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/hand-report":{"post":{"tags":["语义分析"],"summary":"手牌报告","operationId":"hand_report_v1_pokerkit_hand_report_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/range/expand":{"post":{"tags":["范围工具"],"summary":"范围展开","operationId":"range_expand_v1_pokerkit_range_expand_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RangeExpandRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/range/value":{"post":{"tags":["范围工具"],"summary":"价值范围","operationId":"range_value_v1_pokerkit_range_value_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValueRangeRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/range/nut-advantage":{"post":{"tags":["范围工具"],"summary":"坚果优势","operationId":"range_nut_advantage_v1_pokerkit_range_nut_advantage_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NutAdvantageRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/cards/normalize":{"post":{"tags":["牌张"],"summary":"牌张规范化","operationId":"cards_normalize_v1_pokerkit_cards_normalize_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CardsRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/eval/hand":{"post":{"tags":["核心计算"],"summary":"手牌评估","operationId":"eval_hand_v1_pokerkit_eval_hand_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalHandRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/eval/compare":{"post":{"tags":["核心计算"],"summary":"多手比牌","operationId":"eval_compare_v1_pokerkit_eval_compare_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EvalCompareRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/equity":{"post":{"tags":["核心计算"],"summary":"胜率(Equity)","operationId":"equity_v1_pokerkit_equity_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquityRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/hand-strength":{"post":{"tags":["核心计算"],"summary":"牌力","operationId":"hand_strength_v1_pokerkit_hand_strength_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/HandStrengthRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/icm":{"post":{"tags":["核心计算"],"summary":"ICM","operationId":"icm_v1_pokerkit_icm_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/IcmRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/range/equity-advantage":{"post":{"tags":["核心计算"],"summary":"范围胜率优势","operationId":"range_equity_advantage_v1_pokerkit_range_equity_advantage_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EquityAdvantageRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/notation/parse":{"post":{"tags":["核心计算"],"summary":"记法解析","operationId":"notation_parse_v1_pokerkit_notation_parse_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NotationParseRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/games/state":{"post":{"tags":["对局模拟"],"summary":"对局状态","operationId":"games_state_v1_pokerkit_games_state_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameStateRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/games/step":{"post":{"tags":["对局模拟"],"summary":"对局步进","operationId":"games_step_v1_pokerkit_games_step_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/GameStepRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/notation/replay":{"post":{"tags":["对局模拟"],"summary":"牌谱回放","operationId":"notation_replay_v1_pokerkit_notation_replay_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"type":"string","default":"","title":"Authorization"}},{"name":"x-api-key","in":"header","required":false,"schema":{"type":"string","default":"","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ReplayRequest"}}}},"responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}},"422":{"description":"参数校验错误","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/v1/pokerkit/combined-openapi.json":{"get":{"tags":["元信息"],"summary":"合并 OpenAPI","description":"GTO spec 与本服务自动生成的 spec 合并为一份文档(路径不重叠;pokerkit schema 仅在重名时加前缀)。始终与当前代码一致。","operationId":"combined_openapi_v1_pokerkit_combined_openapi_json_get","responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{}}}}}}},"/v1/pokerkit/meta":{"get":{"tags":["元信息"],"summary":"元信息","operationId":"meta_v1_pokerkit_meta_get","responses":{"200":{"description":"成功响应","content":{"application/json":{"schema":{"additionalProperties":true,"type":"object","title":"Response Meta V1 Pokerkit Meta Get"}}}}}}}},"components":{"securitySchemes":{"BearerApiKey":{"type":"http","scheme":"bearer","description":"Authorization: Bearer gto_..."},"XApiKey":{"type":"apiKey","in":"header","name":"X-API-Key"}},"responses":{"BadRequest":{"description":"输入无效或缺少字段","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Unauthorized":{"description":"缺少或无效的 API key","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"NoSolution":{"description":"该局面/牌面没有 GTO 数据","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"QuotaExceeded":{"description":"月度配额超限(每月 1 号重置)","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Upstream":{"description":"后端暂不可用,请重试","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"UpstreamUnavailable":{"description":"服务自身重试后仍连不上求解器(传输错误 / 5xx)——可重试;error: upstream_unavailable","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}},"Forbidden":{"description":"token 无效或不属于你","content":{"application/json":{"schema":{"$ref":"#/components/schemas/Error"}}}}},"schemas":{"Error":{"type":"object","properties":{"error":{"type":"string","example":"missing_api_key"},"message":{"type":"string"}}},"Position":{"type":"string","enum":["SB","BB","UTG","MP","CO","BTN"]},"HoleCards":{"type":"string","description":"两张牌,无分隔符,如 \"AdKd\"。牌面 AKQJT98765432,花色 c d h s。","pattern":"^[2-9TJQKA][cdhs][2-9TJQKA][cdhs]$","example":"AdKd"},"BoardInput":{"type":"string","description":"公共牌,无分隔字符串:3 张=flop \"2c2h2s\",4 张=turn,5 张=river。","example":"2c2h2s"},"BoardOutput":{"type":"array","items":{"type":"string"},"description":"公共牌以数组返回","example":["2c","2h","2s"]},"RangeString":{"type":"string","description":"逗号分隔的 hand:weight。类别记法 AA/AKs/AKo(高牌在前);weight 0..1,默认 1。","example":"AA:1,KK,AKs:0.5,72o:0.1"},"Quota":{"type":"object","properties":{"used":{"type":"integer"},"limit":{"type":"integer"}}},"StrategyItem":{"type":"object","properties":{"action":{"type":"string","description":"check / call / fold / raise / bet"},"frequency":{"type":"number","format":"float","description":"0..1 概率"},"sizing_pot":{"type":"number","description":"相对底池的尺度,标准 % pot 约定:bet = bet ÷ pot;raise = (raise − 需跟注额) ÷ 跟注后底池。如 0.5 / 0.8 / 1。仅 bet/raise 有"},"amount_bb":{"type":"number","description":"以 BB 计的绝对 bet/raise 数额(bet/raise 时)"},"allin":{"type":"boolean","description":"动作为全下时存在且为 true"}},"required":["action","frequency"]},"PreflopRequest":{"type":"object","required":["hole_cards","positions","preflop_actions"],"properties":{"hole_cards":{"$ref":"#/components/schemas/HoleCards"},"positions":{"type":"object","required":["hero"],"properties":{"hero":{"$ref":"#/components/schemas/Position"}}},"table_size":{"type":"string","default":"6max"},"preflop_version":{"type":"string","enum":["6max","6max_RC_100bb_200NL","6max_RC_100bb_100NL","6max_RC_40bb"],"description":"可选;使用哪套 6max preflop 图表。省略用平台默认(6max)。未知值 → 400 unsupported_preflop_version。"},"preflop_actions":{"type":"array","description":"从小盲开始、到 hero 前一位为止的显式完整动作序列(不含 hero;hero 的位置在 positions.hero)。必须以小盲(0.5)、大盲(1)开头。amount 是该动作本次新投入的 BB 增量(不是累计总额);pot = 全部 amount 之和。加注后的总额必须超过当前下注并满足最小加注(= 当前下注 + 上一次加注的增量),除非 allin:true;跟注后的总额必须恰好等于当前下注,除非 allin:true。精确数额只影响 pot/sizing_pot 的精确性——GTO 频率按局面(RFI/3bet/4bet + 位置)决定,不随下注尺度变化。违规返回 400 invalid_actions。\n","items":{"type":"object","required":["position","action"],"properties":{"position":{"$ref":"#/components/schemas/Position"},"action":{"type":"string","enum":["small blind","big blind","raise","call","fold"]},"amount":{"type":"number","description":"该动作本次新投入的 BB 增量(非 fold 动作必填);fold 时省略或为 0"},"allin":{"type":"boolean","description":"可选;标记短码全下(低于最小加注的 raise/call)。为 true 时跳过最小加注校验"}}}}}},"PreflopResponse":{"type":"object","properties":{"hole_cards":{"type":"string"},"situation":{"type":"string","enum":["RFI","Limp","Raise","3-Bet","4-Bet","5-Bet"],"description":"hero 面对的桌面状态:RFI(前面全弃,开局位)/ Limp(有人平跟,无加注)/ Raise(1 次加注)/ 3-Bet / 4-Bet / 5-Bet"},"strategy":{"type":"array","items":{"$ref":"#/components/schemas/StrategyItem"}},"quota":{"$ref":"#/components/schemas/Quota"}}},"FlopPositions":{"type":"object","description":"必填的键取决于 pot_type——SRP:hero、raiser、caller;3BET/4BET:hero、raiser、three_bettor(4BET 时 raiser = 4-bet 的开局者,three_bettor = 跟注的 3-bet 者;没有 four_bettor 键);LIMP:hero、limper。hero 必须是其中一个已命名座位。","properties":{"hero":{"$ref":"#/components/schemas/Position"},"raiser":{"$ref":"#/components/schemas/Position"},"caller":{"$ref":"#/components/schemas/Position"},"three_bettor":{"$ref":"#/components/schemas/Position"},"limper":{"$ref":"#/components/schemas/Position"}}},"FlopNodeRequest":{"type":"object","required":["node"],"properties":{"node":{"type":"string","description":"来自 /v1/gto/flop/tree 的节点 token(节点的 `token` 字段)"},"hole_cards":{"$ref":"#/components/schemas/HoleCards"}}},"FlopTreeRequest":{"type":"object","required":["board","pot_type","positions"],"properties":{"board":{"$ref":"#/components/schemas/BoardInput"},"pot_type":{"type":"string","enum":["SRP","3BET","4BET","LIMP"]},"positions":{"$ref":"#/components/schemas/FlopPositions"},"flop_version":{"type":"string","enum":["6max","6max_RC_100bb_200NL","6max_RC_100bb_100NL","6max_RC_40bb"],"description":"可选;使用哪套 flop 数据集(每个 preflop 版本各解一套)。省略用默认(6max)。所选版本没有该局面数据时,服务优雅降级到 6max。未知值 → 400 unsupported_flop_version。与 preflop_version 相互独立。节点 token 会携带此版本,因此 /v1/gto/flop/node 停留在同一数据集。"}}},"FlopTreeResponse":{"type":"object","properties":{"board":{"$ref":"#/components/schemas/BoardOutput"},"pot_type":{"type":"string"},"pot":{"type":"number"},"effective_stack":{"type":"number"},"oop_range":{"$ref":"#/components/schemas/RangeString"},"ip_range":{"$ref":"#/components/schemas/RangeString"},"node_count":{"type":"integer"},"nodes":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string","example":"root/CHECK/BET_8"},"is_hero":{"type":"boolean"},"token":{"type":"string"}}}},"quota":{"$ref":"#/components/schemas/Quota"}}},"NodeStrategyResponse":{"type":"object","description":"hero 节点有 `strategy`;villain 节点(或不传 hole_cards)有 `actions` + `range_strategy`。","properties":{"node":{"type":"string"},"is_hero":{"type":"boolean"},"hole_cards":{"type":"string"},"strategy":{"type":"array","items":{"$ref":"#/components/schemas/StrategyItem"}},"actions":{"type":"array","items":{"type":"object","properties":{"action":{"type":"string"},"amount_bb":{"type":"number"},"sizing_pot":{"type":"number"},"allin":{"type":"boolean"}}}},"range_strategy":{"type":"object","additionalProperties":{"type":"array","items":{"type":"number"}},"description":"组合(如 \"AhKh\")→ 与 actions 对齐的频率数组"},"range_hand_count":{"type":"integer"}}},"SolverScheduleRequest":{"type":"object","required":["board","oop_range","ip_range","pot","effective_stack","hero"],"properties":{"board":{"$ref":"#/components/schemas/BoardInput"},"oop_range":{"$ref":"#/components/schemas/RangeString"},"ip_range":{"$ref":"#/components/schemas/RangeString"},"pot":{"type":"number"},"effective_stack":{"type":"number"},"hero":{"type":"string","enum":["OOP","IP"]},"bet_sizes":{"type":"object","description":"可选的逐街首次下注尺度(% pot);flop 默认 50%","properties":{"flop":{"type":"array","items":{"type":"integer"}},"turn":{"type":"array","items":{"type":"integer"}},"river":{"type":"array","items":{"type":"integer"}}}},"raise_sizes":{"type":"object","description":"可选的逐街加注尺度(% pot);省略的街沿用 bet_sizes/默认值","properties":{"flop":{"type":"array","items":{"type":"integer"}},"turn":{"type":"array","items":{"type":"integer"}},"river":{"type":"array","items":{"type":"integer"}}}},"donk_sizes":{"type":"object","description":"可选的 OOP donk lead 尺度(% pot);turn 默认 67%,river 默认 100%","properties":{"turn":{"type":"array","items":{"type":"integer"}},"river":{"type":"array","items":{"type":"integer"}}}},"raise_limit":{"type":"integer","minimum":1,"maximum":4,"description":"可选的全树加注次数上限;flop/turn 求解默认 3,单独 river 求解默认 4"}}},"SolverScheduleResponse":{"type":"object","properties":{"status":{"type":"string","enum":["computing","queryable","busy"]},"solve":{"type":"string","description":"供 /tree 与 /node 使用的 handle"},"solve_quota":{"allOf":[{"$ref":"#/components/schemas/Quota"}],"description":"仅在触发了新求解(已计费)时存在"}}},"SolverTreeResponse":{"type":"object","properties":{"street":{"type":"string","enum":["flop","turn","river"]},"pot":{"type":"number"},"effective_stack":{"type":"number"},"spot_status":{"type":"string","enum":["available","computing","queryable","expired","no_nodes"],"description":"no_nodes = 求解已收敛,但所查询的轮次/发牌在树中没有决策节点(终局——停止轮询)。"},"node_count":{"type":"integer"},"nodes":{"type":"array","items":{"type":"object","properties":{"node":{"type":"string"},"is_hero":{"type":"boolean"},"status":{"type":"string"},"token":{"type":"string"}}}}}},"RangeRequest":{"type":"object","required":["range_oop","range_ip","solver_results","node_id"],"properties":{"range_oop":{"$ref":"#/components/schemas/RangeString"},"range_ip":{"$ref":"#/components/schemas/RangeString"},"solver_results":{"type":"object","description":"决策树(由你组装)"},"node_id":{"type":"string","example":"root/CHECK/BET 8.000000"},"board":{"$ref":"#/components/schemas/BoardInput"},"normalize":{"type":"boolean","default":true},"explain":{"type":"boolean","default":false},"track_hands":{"type":"array","items":{"type":"string"}},"bluff_discount_ratio":{"type":"number","minimum":0,"maximum":1},"hero_position":{"type":"string","enum":["oop","ip"],"description":"可选的卡牌阻断:哪个玩家是 Hero。与 hero_hand 搭配。"},"hero_hand":{"type":"string","example":"AsKs","description":"可选的卡牌阻断:从范围中移除所有含 Hero 牌张的组合(范围对单手分析)。会在响应中回显。仅适用于 /v1/gto/range,不适用于 projected-range 封装。"}}},"RangeResponse":{"type":"object","properties":{"range_oop_new":{"$ref":"#/components/schemas/RangeString"},"range_ip_new":{"$ref":"#/components/schemas/RangeString"},"range_oop_new_raw":{"type":"string"},"range_ip_new_raw":{"type":"string"},"range_oop_new_raw_before_normalization":{"type":"string"},"range_ip_new_raw_before_normalization":{"type":"string"},"hand_ranks_oop":{"type":"string","description":"OOP 按成手强度排列的组合:'combo:rank,...'(rank 越小越强),按 rank 升序。同 rank 的并列顺序在端点间/多次运行间不保证稳定——不要依赖它。"},"hand_ranks_ip":{"type":"string","description":"hand_ranks_oop 的 IP 版。"},"hand_bottom_ranks_oop":{"type":"string","description":"hand_ranks_oop 中最弱的 bluff_combos_ratio 比例部分(诈唬候选),格式相同。"},"hand_bottom_ranks_ip":{"type":"string","description":"hand_bottom_ranks_oop 的 IP 版。"},"node_id":{"type":"string"},"board":{"$ref":"#/components/schemas/BoardOutput"},"path_length":{"type":"integer"},"bluff_discount_ratio":{"type":"number"},"bluff_combos_ratio":{"type":"number"},"quota":{"$ref":"#/components/schemas/Quota"}}},"ProjectedRangeRequest":{"type":"object","required":["board","pot_type","positions"],"properties":{"board":{"$ref":"#/components/schemas/BoardInput"},"pot_type":{"type":"string","enum":["SRP","3BET","4BET","LIMP"]},"positions":{"$ref":"#/components/schemas/FlopPositions"},"node_id":{"type":"string","default":"root","example":"root/BET_4"},"normalize":{"type":"boolean","default":true},"bluff_discount_ratio":{"type":"number","default":0.8,"minimum":0,"maximum":1},"hero_position":{"type":"string","enum":["oop","ip"],"description":"可选的卡牌阻断,与 hero_hand 搭配。"},"hero_hand":{"type":"string","example":"AsKs","description":"可选的卡牌阻断:从 villain 更新后的范围(range_*_new_raw 输出)中移除所有含 Hero 牌张的组合;同时确保 Hero 自己的范围里含有 Hero 的手牌。会回显。"},"bluff_combos_ratio":{"type":"number","minimum":0,"maximum":1,"description":"可选;视为诈唬的范围比例(范围底部)。省略用服务器的 turn/river 默认值。会回显。"},"partner_hands":{"type":"array","items":{"type":"string"},"example":["Ac9c"],"description":"可选;4 字符组合,其牌张从 villain 更新后的范围(range_*_new_raw)中移除。需要 hero_position。仅输入(不回显)。仅 flop/projected-range。"},"flop_version":{"type":"string","enum":["6max","6max_RC_100bb_200NL","6max_RC_100bb_100NL","6max_RC_40bb"],"description":"可选;使用哪套 flop 数据集(每个 preflop 版本各解一套)。省略用默认(6max)。所选版本没有该局面数据时,服务优雅降级到 6max。未知值 → 400 unsupported_flop_version。与 preflop_version 相互独立。"}}},"ProjectedRangeResponse":{"description":"字段与 RangeResponse 相同,另加从请求回显的 pot_type(共 17 个字段)。","allOf":[{"$ref":"#/components/schemas/RangeResponse"},{"type":"object","properties":{"pot_type":{"type":"string"}}}]},"TurnProjectedRangeRequest":{"type":"object","required":["solve","node_id"],"properties":{"solve":{"type":"string","description":"来自 /v1/gto/solver 的 handle(turn 求解)"},"node_id":{"type":"string","description":"一条 turn 行动线;可以以收尾的 CALL/CHECK 结束。求解器节点格式,含空格,如 \"root/CHECK/BET 6.000000/CALL\"。"},"normalize":{"type":"boolean","default":true},"bluff_discount_ratio":{"type":"number","minimum":0,"maximum":1},"hero_position":{"type":"string","enum":["oop","ip"],"description":"可选的卡牌阻断,与 hero_hand 搭配。"},"hero_hand":{"type":"string","example":"AsKs","description":"可选的卡牌阻断:从 villain 更新后的范围中移除所有含 Hero 牌张的组合。"},"partner_hands":{"type":"array","items":{"type":"string"},"example":["Ac9c"],"description":"可选;4 字符组合,其牌张从 villain 更新后的范围中移除。需要 hero_position。仅输入。"}}},"EvsRequest":{"type":"object","required":["solve","node_id"],"properties":{"solve":{"type":"string","description":"来自 /v1/gto/solver 的 handle"},"node_id":{"type":"string","example":"root","description":"来自 /v1/gto/solver/tree 的节点(求解器记法,如 \"root/CHECK/BET 6.000000\")"},"hand":{"type":"string","example":"AsKh","description":"可选;过滤到单手的 EV(否则返回全部手牌)"}}},"EvsResponse":{"type":"object","description":"该节点的逐手、逐动作 EV;每手的 EV 数组与 actions 对齐。","properties":{"node_id":{"type":"string"},"task_id":{"type":"string"},"player":{"type":"integer"},"round":{"type":"string","example":"FLOP"},"actions":{"type":"array","items":{"type":"string"},"example":["CHECK","BET 4.000000","BET 97.000000"]},"evs":{"type":"object","additionalProperties":{"type":"array","items":{"type":"number"}},"description":"hand → 逐动作 EV 数组(bb);传了 hand 时为单个数组","example":{"2c2d":[-0.826359,-0.792223,-1.643411]}}}},"BoardRequest":{"properties":{"board":{"type":"string","title":"公共牌","description":"3/4/5 张公共牌,如 'AsKsQs'","examples":["AsKsQs"]},"hand_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"手牌类型","examples":["StandardHighHand"]},"dead":{"type":"string","title":"死牌","description":"可选的死牌/已移除牌张","default":""}},"type":"object","required":["board"],"title":"BoardRequest"},"CardsRequest":{"properties":{"cards":{"type":"string","title":"牌张","description":"待规范化/校验的牌张","examples":["AsKsQs"]}},"type":"object","required":["cards"],"title":"CardsRequest"},"EquityAdvantageRequest":{"properties":{"hero":{"items":{"type":"string"},"type":"array","title":"Hero","examples":[["AA","KK","AKs"]]},"villain":{"items":{"type":"string"},"type":"array","title":"Villain","examples":[["QQ","JJ","AQs"]]},"board":{"type":"string","title":"公共牌","examples":["AsKsQs"]},"sample_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"采样次数"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"随机种子"},"hand_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"手牌类型"}},"type":"object","required":["hero","villain","board"],"title":"EquityAdvantageRequest"},"EquityRequest":{"properties":{"ranges":{"items":{"items":{"type":"string"},"type":"array"},"type":"array","title":"范围","description":"各玩家范围(记法)","examples":[[["AA","KK"],["QQ","JJ"]]]},"board":{"type":"string","title":"公共牌","default":"","examples":["AhKhQh"]},"sample_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"采样次数","description":"Monte-Carlo 采样数(有上限);不传用默认"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"随机种子","description":"用于可复现采样的随机种子"}},"type":"object","required":["ranges"],"title":"EquityRequest"},"EvalCompareRequest":{"properties":{"holdings":{"items":{"type":"string"},"type":"array","title":"手牌组","description":"待排名的 2+ 手牌","examples":[["AcAd","KcKd","JhTh"]]},"board":{"type":"string","title":"公共牌","default":"","examples":["AhKhQh"]},"hand_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"手牌类型"}},"type":"object","required":["holdings"],"title":"EvalCompareRequest"},"EvalHandRequest":{"properties":{"hole":{"type":"string","title":"底牌","examples":["AcAd"]},"board":{"type":"string","title":"公共牌","default":"","examples":["AhKhQh"]},"hand_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"手牌类型"}},"type":"object","required":["hole"],"title":"EvalHandRequest"},"GameStateRequest":{"properties":{"variant":{"type":"string","title":"玩法变体","description":"变体代码,如 NT(无限德州);见 /meta","examples":["NT"]},"starting_stacks":{"items":{"type":"integer"},"type":"array","title":"起始筹码","examples":[[200,200]]},"antes":{"items":{"type":"integer"},"type":"array","title":"前注(Ante)","examples":[[0,0]]},"blinds_or_straddles":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"盲注/Straddle","examples":[[1,2]]},"bring_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bring-in"},"small_bet":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"小注"},"big_bet":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"大注"},"min_bet":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"最小下注","description":"无限注/底池限注必填,如 2"},"ante_trimming_status":{"type":"boolean","title":"前注修剪状态","default":false},"automations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"自动化项","description":"自动化项名称;省略用 pokerkit 默认"},"actions":{"items":{"type":"string"},"type":"array","title":"动作序列","examples":[["d dh p1 AhKh","d dh p2 QsQd","p2 cbr 6"]]},"viewer":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"视角","description":"保留字段(隐藏信息层);v1 为完全信息"}},"type":"object","required":["variant","starting_stacks","antes"],"title":"GameStateRequest"},"GameStepRequest":{"properties":{"variant":{"type":"string","title":"玩法变体","description":"变体代码,如 NT(无限德州);见 /meta","examples":["NT"]},"starting_stacks":{"items":{"type":"integer"},"type":"array","title":"起始筹码","examples":[[200,200]]},"antes":{"items":{"type":"integer"},"type":"array","title":"前注(Ante)","examples":[[0,0]]},"blinds_or_straddles":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"盲注/Straddle","examples":[[1,2]]},"bring_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bring-in"},"small_bet":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"小注"},"big_bet":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"大注"},"min_bet":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"最小下注","description":"无限注/底池限注必填,如 2"},"ante_trimming_status":{"type":"boolean","title":"前注修剪状态","default":false},"automations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"自动化项","description":"自动化项名称;省略用 pokerkit 默认"},"actions":{"items":{"type":"string"},"type":"array","title":"动作序列","examples":[["d dh p1 AhKh","d dh p2 QsQd","p2 cbr 6"]]},"viewer":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"视角","description":"保留字段(隐藏信息层);v1 为完全信息"},"next_action":{"type":"string","title":"下一动作","description":"要应用的玩家/发牌动作","examples":["p1 cc"]},"expected_action_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"预期动作数","description":"乐观并发 token = 你所延续的 len(actions);不匹配返回 409"}},"type":"object","required":["variant","starting_stacks","antes","next_action"],"title":"GameStepRequest"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"详情"}},"type":"object","title":"HTTPValidationError"},"HandRequest":{"properties":{"hole":{"type":"string","title":"底牌","description":"2 张底牌,如 'JhTh'","examples":["JhTh"]},"board":{"type":"string","title":"公共牌","examples":["AsKsQs"]},"hand_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"手牌类型"},"dead":{"type":"string","title":"死牌","default":""}},"type":"object","required":["hole","board"],"title":"HandRequest"},"HandStrengthRequest":{"properties":{"hole_range":{"items":{"type":"string"},"type":"array","title":"底牌范围","description":"hero 范围/手牌(记法)","examples":[["AhKh"]]},"board":{"type":"string","title":"公共牌","default":"","examples":["AhKhQh"]},"player_count":{"type":"integer","minimum":2.0,"title":"玩家数","default":2},"sample_count":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"采样次数"},"seed":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"随机种子"}},"type":"object","required":["hole_range"],"title":"HandStrengthRequest"},"IcmRequest":{"properties":{"payouts":{"items":{"type":"number"},"type":"array","title":"奖金结构","examples":[[50,30,20]]},"chips":{"items":{"type":"number"},"type":"array","title":"筹码","examples":[[5000,3000,2000]]}},"type":"object","required":["payouts","chips"],"title":"IcmRequest"},"NotationParseRequest":{"properties":{"text":{"type":"string","title":"文本","description":"pokerkit 的 .phh 牌谱字符串"}},"type":"object","required":["text"],"title":"NotationParseRequest"},"NutAdvantageRequest":{"properties":{"hero":{"items":{"type":"string"},"type":"array","title":"Hero","description":"hero 范围(记法)","examples":[["AA","KK","AKs"]]},"villain":{"items":{"type":"string"},"type":"array","title":"Villain","description":"villain 范围(记法)","examples":[["QQ","JJ","AQs"]]},"board":{"type":"string","title":"公共牌","examples":["AsKsQs"]},"hand_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"手牌类型"}},"type":"object","required":["hero","villain","board"],"title":"NutAdvantageRequest"},"RangeExpandRequest":{"properties":{"notation":{"items":{"type":"string"},"type":"array","title":"记法","description":"范围记法 token","examples":[["AA","KQs","QQ+"]]}},"type":"object","required":["notation"],"title":"RangeExpandRequest"},"ReplayRequest":{"properties":{"text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"文本","description":"一个 .phh 字符串;或改用下方 config+actions 字段"},"variant":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"玩法变体"},"starting_stacks":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"起始筹码"},"antes":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"前注(Ante)"},"blinds_or_straddles":{"anyOf":[{"items":{"type":"integer"},"type":"array"},{"type":"null"}],"title":"盲注/Straddle"},"bring_in":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Bring-in"},"small_bet":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"小注"},"big_bet":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"大注"},"min_bet":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"最小下注"},"ante_trimming_status":{"type":"boolean","title":"前注修剪状态","default":false},"automations":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"自动化项"},"actions":{"items":{"type":"string"},"type":"array","title":"动作序列"},"index":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"步进索引","description":"只返回该步索引处的快照"}},"type":"object","title":"ReplayRequest"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"位置"},"msg":{"type":"string","title":"消息"},"type":{"type":"string","title":"错误类型"},"input":{"title":"输入"},"ctx":{"type":"object","title":"上下文"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"ValueRangeRequest":{"properties":{"board":{"type":"string","title":"公共牌","examples":["AsKsQs"]},"aggression":{"type":"string","title":"激进度","default":"SINGLE_BET","examples":["NO_BET","SINGLE_BET","RAISED"]},"floor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"类别下限","description":"可选的类别下限,如 'TWO_PAIR'(覆盖 aggression 默认)"},"hand_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"手牌类型"},"dead":{"type":"string","title":"死牌","default":""}},"type":"object","required":["board"],"title":"ValueRangeRequest"}}},"x-pokerai-public-provenance":{"sourceUrl":"https://pokerai.bet/v1/pokerkit/combined-openapi.json","generatedAt":"2026-07-22T12:05:56Z","snapshotVersion":"1.0"}}