{
  "openapi": "3.1.0",
  "info": {
    "title": "AnonGTO Solver API",
    "version": "1.0.0",
    "summary": "NLHE GTO strategies from preflop to river in under a second.",
    "description": "POST /v1/solve answers one decision: send your game state (table + streets for a hand from preflop, or board + pot_bb + players for custom postflop ranges) and get back the GTO strategy and EV for the player to act. Requests are strict: typed actions only, unknown fields refused, and every error names its field in error.path (a JSON Pointer). Amounts are in big blinds. Free keys: https://anongto.com/api/#get-key; plans: https://anongto.com/api/pricing/. Human docs: https://anongto.com/api/docs/ (Markdown: https://anongto.com/api/docs.md). For study and analysis tools, not for use during play.",
    "contact": {
      "url": "https://anongto.com/api/"
    }
  },
  "servers": [
    {
      "url": "https://api.anongto.com"
    }
  ],
  "security": [
    {
      "bearer": []
    }
  ],
  "paths": {
    "/v1/solve": {
      "post": {
        "operationId": "solve",
        "summary": "Solve one decision (hand from preflop or custom postflop ranges)",
        "description": "Stateless: send table + streets for a hand from preflop, or board + pot_bb + players for custom postflop ranges (2 or 3 players). Prior street solves are memoized server-side; pair with POST /v1/warm for cached sub-10ms hits. Unknown fields anywhere: 400.",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SolveRequest"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "The decision",
            "headers": {
              "X-Quota-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests allowed today"
              },
              "X-Quota-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Requests left today"
              },
              "X-Quota-Total-Limit": {
                "schema": {
                  "type": "integer"
                },
                "description": "Capped keys only: the key's lifetime cap"
              },
              "X-Quota-Total-Remaining": {
                "schema": {
                  "type": "integer"
                },
                "description": "Capped keys only: requests left in total"
              },
              "Server-Timing": {
                "schema": {
                  "type": "string",
                  "examples": [
                    "server;dur=8, solve;dur=0"
                  ]
                },
                "description": "Time on our server and the part spent solving, in ms (same as timing)"
              },
              "X-Server-Region": {
                "schema": {
                  "type": "string"
                },
                "description": "Which server answered"
              }
            },
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Answer"
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          },
          "504": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/warm": {
      "post": {
        "operationId": "warm",
        "summary": "Pre-warm a decision or range transition in the background (returns 202 immediately, free of solve quota)",
        "description": "Same authentication, request shapes (HandSolve, RangesSolve), and synchronous 400/422 validation as POST /v1/solve. Simple client rule: whenever the table state changes and it is not your turn yet (including closed streets during deal animations and 3-way spots warmed via MW3_MEMO), fire-and-forget POST /v1/warm with { table, streets }. Free of solve quota (requires remaining solve quota > 0, capped at max(20, 4 * solves_used_today) uncached warms/day; cache hits and dedup joins unlimited; separate 2x per_min rate limit).",
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/SolveRequest"
              }
            }
          }
        },
        "responses": {
          "202": {
            "description": "Warm request accepted",
            "content": {
              "application/json": {
                "schema": {
                  "oneOf": [
                    {
                      "type": "object",
                      "required": [
                        "id",
                        "status"
                      ],
                      "properties": {
                        "id": {
                          "type": "string",
                          "pattern": "^slv_[a-f0-9]{20}$",
                          "description": "Trace id for the queued background warm (2-way or 3-way)"
                        },
                        "status": {
                          "type": "string",
                          "enum": [
                            "warming"
                          ]
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "status"
                      ],
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "ready"
                          ],
                          "description": "Already cached (including closed-street range transitions or instant on-chart preflop); zero work needed"
                        }
                      }
                    },
                    {
                      "type": "object",
                      "required": [
                        "status",
                        "reason"
                      ],
                      "properties": {
                        "status": {
                          "type": "string",
                          "enum": [
                            "skipped"
                          ]
                        },
                        "reason": {
                          "type": "string",
                          "enum": [
                            "quota",
                            "warm_cap",
                            "busy"
                          ]
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "400": {
            "$ref": "#/components/responses/Error"
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "413": {
            "$ref": "#/components/responses/Error"
          },
          "422": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          },
          "503": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/solves/{id}/trace": {
      "get": {
        "operationId": "getSolveTrace",
        "summary": "Inspect the full hand & execution trace for a solve (24h TTL, caller-scoped, free of solve quota)",
        "description": "Returns the full execution trace (request, actions[], ev_bb, nodes[] with our_solve and warm.request/response, steps[], input_ranges, timing) for a POST /v1/solve ID created by your API key within the last 24 hours. Free of solve quota (120 req/min rate limit). Step through any trace on an interactive poker table at https://anongto.com/api/latency/.",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^slv_[a-f0-9]{20}$"
            },
            "description": "The solve ID (slv_...) returned by POST /v1/solve",
            "examples": {
              "default": {
                "value": "slv_dced614b1e934b91ba00"
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The solve execution trace",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SolveTrace"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/solves/{id}/nodes/{index}": {
      "get": {
        "operationId": "getSolveTraceNode",
        "summary": "Fetch 169-class hand_classes & per-seat player_ranges at one trace node (24h TTL, caller-scoped, free of solve quota)",
        "description": "Returns the 169-class GTO strategy (actions[], hand_classes when to_act is present) and per-seat reaching ranges (player_ranges) at chronological node index (0 .. nodes.length - 1) of a solve trace created by your API key within the last 24 hours. Free of solve quota (120 req/min rate limit).",
        "parameters": [
          {
            "name": "id",
            "in": "path",
            "required": true,
            "schema": {
              "type": "string",
              "pattern": "^slv_[a-f0-9]{20}$"
            },
            "description": "The solve ID (slv_...) returned by POST /v1/solve",
            "examples": {
              "default": {
                "value": "slv_dced614b1e934b91ba00"
              }
            }
          },
          {
            "name": "index",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "minimum": 0
            },
            "description": "Zero-based chronological node index from trace.nodes[]",
            "examples": {
              "default": {
                "value": 8
              }
            }
          }
        ],
        "responses": {
          "200": {
            "description": "169-class strategy and per-seat reaching ranges at this node",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/SolveTraceNode"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "403": {
            "$ref": "#/components/responses/Error"
          },
          "404": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/account": {
      "get": {
        "operationId": "getAccount",
        "summary": "Your key's plan, limits and 30 days of usage",
        "responses": {
          "200": {
            "description": "The account",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Account"
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/account/rotate": {
      "post": {
        "operationId": "rotateKey",
        "summary": "A new key for the same plan; the old one keeps working 24 hours",
        "responses": {
          "200": {
            "description": "The new key (shown once)",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "key": {
                      "type": "string"
                    },
                    "prefix": {
                      "type": "string"
                    },
                    "previous_key_stops_at": {
                      "type": "string",
                      "format": "date-time"
                    }
                  }
                }
              }
            }
          },
          "401": {
            "$ref": "#/components/responses/Error"
          },
          "429": {
            "$ref": "#/components/responses/Error"
          }
        }
      }
    },
    "/v1/status": {
      "get": {
        "operationId": "getStatus",
        "summary": "Is every part up, and 90 days of uptime (no key)",
        "security": [],
        "responses": {
          "200": {
            "description": "Status",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "ok": {
                      "type": "boolean"
                    },
                    "status": {
                      "type": "string",
                      "enum": [
                        "operational",
                        "degraded"
                      ]
                    },
                    "parts": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "boolean"
                      }
                    },
                    "checked_at": {
                      "type": "string",
                      "format": "date-time"
                    },
                    "uptime_90d_pct": {
                      "type": [
                        "number",
                        "null"
                      ]
                    },
                    "days": {
                      "type": "array",
                      "items": {
                        "type": "object",
                        "properties": {
                          "day": {
                            "type": "string",
                            "format": "date"
                          },
                          "checks": {
                            "type": "integer"
                          },
                          "uptime_pct": {
                            "type": "number"
                          }
                        }
                      }
                    }
                  }
                }
              }
            }
          }
        }
      }
    },
    "/v1/demo": {
      "get": {
        "operationId": "demo",
        "summary": "Saved answers for a few fixed spots (no key). Without `preset`, lists the presets.",
        "security": [],
        "parameters": [
          {
            "name": "preset",
            "in": "query",
            "schema": {
              "type": "string"
            },
            "description": "A demo spot (not a table preset), e.g. chart-flop-btn, chart-river-btn, flop-bb"
          },
          {
            "name": "detail",
            "in": "query",
            "schema": {
              "type": "string",
              "enum": [
                "summary",
                "classes",
                "combos"
              ],
              "default": "classes",
              "description": "Demo query parameter only: summary (aggregate only), classes (hand_classes), combos (combos)."
            }
          }
        ],
        "responses": {
          "200": {
            "description": "The saved request and answer",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearer": {
        "type": "http",
        "scheme": "bearer",
        "description": "Your key (agto_…) as Authorization: Bearer <key>. X-API-Key: <key> works too."
      }
    },
    "responses": {
      "Error": {
        "description": "An error",
        "content": {
          "application/json": {
            "schema": {
              "$ref": "#/components/schemas/Error"
            }
          }
        }
      }
    },
    "schemas": {
      "SolveRequest": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/HandSolve"
          },
          {
            "$ref": "#/components/schemas/RangesSolve"
          }
        ],
        "description": "No mode field: send table + streets for a hand from preflop, or board + pot_bb + players for custom postflop ranges."
      },
      "HandSolve": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "table",
          "streets"
        ],
        "description": "A hand from the deal. The decision answered is the next action of the last street given (preflop when there is no flop).",
        "properties": {
          "table": {
            "oneOf": [
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "seats",
                  "stack_bb",
                  "rake"
                ],
                "description": "Shorthand table: expands seats (2-9) to canonical preflop seat order (STR last when straddle is true), with stack_bb for every seat and optional per-seat overrides in stacks_bb.",
                "properties": {
                  "seats": {
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 9
                  },
                  "stack_bb": {
                    "type": "number",
                    "exclusiveMinimum": 0,
                    "description": "Default starting stack for every seat, in bb"
                  },
                  "stacks_bb": {
                    "type": "object",
                    "additionalProperties": {
                      "type": "number",
                      "exclusiveMinimum": 0
                    },
                    "description": "Optional per-seat stack overrides, e.g. {\"BTN\": 80}"
                  },
                  "rake": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": false,
                    "required": [
                      "pct"
                    ],
                    "properties": {
                      "pct": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 10
                      },
                      "cap_bb": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "minimum": 0
                      }
                    },
                    "description": "null: no rake"
                  },
                  "ante_bb": {
                    "type": "number",
                    "minimum": 0,
                    "default": 0,
                    "description": "Per player"
                  },
                  "straddle": {
                    "type": "boolean",
                    "default": false,
                    "description": "The STR seat straddles 2 bb"
                  }
                }
              },
              {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "max_seats",
                  "seats",
                  "rake"
                ],
                "description": "Longhand table: explicit seat list in preflop order with per-seat stack_bb.",
                "properties": {
                  "max_seats": {
                    "type": "integer",
                    "minimum": 2,
                    "maximum": 9
                  },
                  "seats": {
                    "type": "array",
                    "minItems": 2,
                    "maxItems": 9,
                    "description": "Exactly max_seats entries in preflop order (first to act preflop first; BB last; STR last when straddle is true); names unique; heads-up SB, BB.",
                    "items": {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "seat",
                        "stack_bb"
                      ],
                      "properties": {
                        "seat": {
                          "type": "string",
                          "enum": [
                            "UTG",
                            "UTG1",
                            "UTG2",
                            "LJ",
                            "MP",
                            "HJ",
                            "CO",
                            "BTN",
                            "SB",
                            "BB",
                            "STR"
                          ]
                        },
                        "stack_bb": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "description": "At the start of the hand, before blinds and antes"
                        }
                      }
                    }
                  },
                  "rake": {
                    "type": [
                      "object",
                      "null"
                    ],
                    "additionalProperties": false,
                    "required": [
                      "pct"
                    ],
                    "properties": {
                      "pct": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 10
                      },
                      "cap_bb": {
                        "type": [
                          "number",
                          "null"
                        ],
                        "minimum": 0
                      }
                    },
                    "description": "null: no rake"
                  },
                  "ante_bb": {
                    "type": "number",
                    "minimum": 0,
                    "default": 0,
                    "description": "Per player"
                  },
                  "straddle": {
                    "type": "boolean",
                    "default": false,
                    "description": "The STR seat straddles 2 bb"
                  }
                }
              }
            ],
            "description": "Your table (shorthand or longhand). The server decides how to answer it (our charts when one is close, our preflop solver live otherwise) and says how close the answer is in quality."
          },
          "streets": {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "preflop"
            ],
            "properties": {
              "preflop": {
                "type": "array",
                "items": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "seat",
                        "type"
                      ],
                      "properties": {
                        "seat": {
                          "type": "string",
                          "enum": [
                            "UTG",
                            "UTG1",
                            "UTG2",
                            "LJ",
                            "MP",
                            "HJ",
                            "CO",
                            "BTN",
                            "SB",
                            "BB",
                            "STR"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "fold",
                            "check",
                            "call",
                            "all_in"
                          ]
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "seat",
                        "type",
                        "to_bb"
                      ],
                      "properties": {
                        "seat": {
                          "type": "string",
                          "enum": [
                            "UTG",
                            "UTG1",
                            "UTG2",
                            "LJ",
                            "MP",
                            "HJ",
                            "CO",
                            "BTN",
                            "SB",
                            "BB",
                            "STR"
                          ]
                        },
                        "type": {
                          "type": "string",
                          "enum": [
                            "raise"
                          ]
                        },
                        "to_bb": {
                          "type": "number",
                          "exclusiveMinimum": 0,
                          "description": "The street total raised to, in bb"
                        }
                      }
                    }
                  ],
                  "examples": [
                    {
                      "seat": "UTG",
                      "type": "fold"
                    },
                    {
                      "seat": "BTN",
                      "type": "raise",
                      "to_bb": 2.5
                    },
                    {
                      "seat": "BB",
                      "type": "call"
                    }
                  ]
                },
                "maxItems": 40,
                "description": "EVERY preflop action in order, folds included ([] = the first decision). Out of turn: 400 invalid_poker_state at its path"
              },
              "flop": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "cards",
                  "actions"
                ],
                "properties": {
                  "cards": {
                    "type": "array",
                    "items": {
                      "type": "string",
                      "pattern": "^[2-9TJQKA][cdhs]$",
                      "examples": [
                        "Jh"
                      ]
                    },
                    "minItems": 3,
                    "maxItems": 3
                  },
                  "actions": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "fold",
                                "check",
                                "call",
                                "all_in"
                              ]
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "type",
                            "to_bb"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "bet",
                                "raise"
                              ]
                            },
                            "to_bb": {
                              "type": "number",
                              "exclusiveMinimum": 0,
                              "description": "The player's street total after the action, in bb"
                            }
                          }
                        }
                      ],
                      "examples": [
                        {
                          "type": "check"
                        },
                        {
                          "type": "bet",
                          "to_bb": 1.28
                        },
                        {
                          "type": "raise",
                          "to_bb": 6.5
                        },
                        {
                          "type": "call"
                        },
                        {
                          "type": "all_in"
                        }
                      ]
                    },
                    "maxItems": 12
                  }
                }
              },
              "turn": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "card",
                  "actions"
                ],
                "properties": {
                  "card": {
                    "type": "string",
                    "pattern": "^[2-9TJQKA][cdhs]$",
                    "examples": [
                      "Jh"
                    ]
                  },
                  "actions": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "fold",
                                "check",
                                "call",
                                "all_in"
                              ]
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "type",
                            "to_bb"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "bet",
                                "raise"
                              ]
                            },
                            "to_bb": {
                              "type": "number",
                              "exclusiveMinimum": 0,
                              "description": "The player's street total after the action, in bb"
                            }
                          }
                        }
                      ],
                      "examples": [
                        {
                          "type": "check"
                        },
                        {
                          "type": "bet",
                          "to_bb": 1.28
                        },
                        {
                          "type": "raise",
                          "to_bb": 6.5
                        },
                        {
                          "type": "call"
                        },
                        {
                          "type": "all_in"
                        }
                      ]
                    },
                    "maxItems": 12
                  }
                },
                "description": "Needs flop"
              },
              "river": {
                "type": "object",
                "additionalProperties": false,
                "required": [
                  "card",
                  "actions"
                ],
                "properties": {
                  "card": {
                    "type": "string",
                    "pattern": "^[2-9TJQKA][cdhs]$",
                    "examples": [
                      "Jh"
                    ]
                  },
                  "actions": {
                    "type": "array",
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "type"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "fold",
                                "check",
                                "call",
                                "all_in"
                              ]
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "type",
                            "to_bb"
                          ],
                          "properties": {
                            "type": {
                              "type": "string",
                              "enum": [
                                "bet",
                                "raise"
                              ]
                            },
                            "to_bb": {
                              "type": "number",
                              "exclusiveMinimum": 0,
                              "description": "The player's street total after the action, in bb"
                            }
                          }
                        }
                      ],
                      "examples": [
                        {
                          "type": "check"
                        },
                        {
                          "type": "bet",
                          "to_bb": 1.28
                        },
                        {
                          "type": "raise",
                          "to_bb": 6.5
                        },
                        {
                          "type": "call"
                        },
                        {
                          "type": "all_in"
                        }
                      ]
                    },
                    "maxItems": 12
                  }
                },
                "description": "Needs turn"
              }
            },
            "description": "A street before the last one given must be closed (else 422 street_open)"
          },
          "sizing": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "auto_simplified"
                ],
                "description": "Default when omitted: automatic size policy, preferring one bet size on the flop when the size-picker network says a single size captures the spot cleanly (falling back to a wider multi-size menu when needed), with standard turn/river menus."
              },
              {
                "type": "string",
                "enum": [
                  "auto_mixed"
                ],
                "description": "Automatic size policy using the size-picker network's full multi-size GTO mix on the flop (two-player postflop only), with standard turn/river menus."
              },
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "bet": {
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 3,
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "pct"
                          ],
                          "properties": {
                            "pct": {
                              "type": "number",
                              "exclusiveMinimum": 0,
                              "description": "% of the pot"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "bb"
                          ],
                          "properties": {
                            "bb": {
                              "type": "number",
                              "exclusiveMinimum": 0
                            }
                          }
                        }
                      ]
                    }
                  },
                  "raise": {
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 3,
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "pct"
                          ],
                          "properties": {
                            "pct": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "description": "% of the pot after calling"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "bb"
                          ],
                          "properties": {
                            "bb": {
                              "type": "number",
                              "exclusiveMinimum": 0
                            }
                          }
                        }
                      ]
                    }
                  },
                  "call": {
                    "type": "boolean",
                    "description": "Include (true) or remove (false) Call / Limp / Cold-call from the solved tree at this node."
                  },
                  "all_in": {
                    "type": "boolean",
                    "description": "Include (true) or remove (false) All-in from the solved tree at this node."
                  }
                },
                "description": "Custom action & bet/raise CRUD menu applied to the current preflop or postflop decision node (preflop uses raise/call/all_in; postflop uses bet/raise/call/all_in across both HU and 3-way)."
              }
            ],
            "default": "auto_simplified",
            "description": "Optional sizing & action-menu override (accepted on preflop and postflop hand requests as well as custom-range requests): \"auto_simplified\" (default), \"auto_mixed\" (2-player postflop only), or custom {\"bet\"?, \"raise\"?, \"call\"?, \"all_in\"?}.",
            "examples": [
              "auto_simplified",
              "auto_mixed",
              {
                "bet": [
                  {
                    "pct": 33
                  },
                  {
                    "pct": 75
                  }
                ],
                "raise": [
                  {
                    "pct": 60
                  }
                ]
              },
              {
                "call": true,
                "raise": [
                  {
                    "bb": 7.5
                  }
                ],
                "all_in": false
              }
            ]
          },
          "include": {
            "type": "object",
            "additionalProperties": false,
            "description": "Optional composable output selector. Default when omitted returns aggregate actions[] only (~1.5 KB). hand_classes and combos return separate top-level keys and may both be true in the same request.",
            "properties": {
              "hand_classes": {
                "type": "boolean",
                "default": false,
                "description": "Include top-level hand_classes (169-class map)"
              },
              "combos": {
                "type": "boolean",
                "default": false,
                "description": "Include top-level combos (1326-combo map on postflop; 169-class map on preflop)"
              },
              "hole_cards": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[2-9TJQKA][cdhs]$",
                  "examples": [
                    "Jh"
                  ]
                },
                "minItems": 2,
                "maxItems": 2,
                "uniqueItems": true,
                "description": "One combo (2 distinct cards, either order; not on the board): adds top-level hole_cards for the player to act. Duplicate or board card: 400 at /include/hole_cards/0 or /1.",
                "examples": [
                  [
                    "Ah",
                    "Kh"
                  ]
                ]
              }
            }
          }
        },
        "examples": [
          {
            "table": {
              "seats": 6,
              "stack_bb": 100,
              "rake": {
                "pct": 5,
                "cap_bb": 0.6
              }
            },
            "streets": {
              "preflop": [
                {
                  "seat": "UTG",
                  "type": "fold"
                },
                {
                  "seat": "HJ",
                  "type": "fold"
                },
                {
                  "seat": "CO",
                  "type": "fold"
                },
                {
                  "seat": "BTN",
                  "type": "raise",
                  "to_bb": 2.5
                },
                {
                  "seat": "SB",
                  "type": "fold"
                },
                {
                  "seat": "BB",
                  "type": "call"
                }
              ],
              "flop": {
                "cards": [
                  "Jh",
                  "9s",
                  "4d"
                ],
                "actions": [
                  {
                    "type": "check"
                  },
                  {
                    "type": "bet",
                    "to_bb": 1.28
                  },
                  {
                    "type": "call"
                  }
                ]
              },
              "turn": {
                "card": "2c",
                "actions": []
              }
            },
            "include": {
              "hand_classes": true
            }
          },
          {
            "table": {
              "seats": 2,
              "stack_bb": 40,
              "rake": null
            },
            "streets": {
              "preflop": [
                {
                  "seat": "SB",
                  "type": "raise",
                  "to_bb": 2
                }
              ]
            }
          },
          {
            "table": {
              "seats": 6,
              "stack_bb": 100,
              "rake": {
                "pct": 5,
                "cap_bb": 0.6
              }
            },
            "streets": {
              "preflop": [
                {
                  "seat": "UTG",
                  "type": "fold"
                },
                {
                  "seat": "HJ",
                  "type": "fold"
                },
                {
                  "seat": "CO",
                  "type": "fold"
                },
                {
                  "seat": "BTN",
                  "type": "raise",
                  "to_bb": 2.5
                },
                {
                  "seat": "SB",
                  "type": "fold"
                },
                {
                  "seat": "BB",
                  "type": "call"
                }
              ],
              "flop": {
                "cards": [
                  "Jh",
                  "9s",
                  "4d"
                ],
                "actions": [
                  {
                    "type": "check"
                  }
                ]
              }
            },
            "sizing": "auto_mixed",
            "include": {
              "hole_cards": [
                "Kh",
                "Ah"
              ]
            }
          }
        ]
      },
      "RangesSolve": {
        "type": "object",
        "additionalProperties": false,
        "required": [
          "board",
          "pot_bb",
          "players"
        ],
        "description": "One postflop street from your ranges. 3 players: the 3-way solver (a prototype; 3-way flop network ~10 s, 3-way turn network ~3 s, exact river), no per-action EVs, one 3-way solve at a time across all keys (503 busy: retry in a few seconds).",
        "properties": {
          "board": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[2-9TJQKA][cdhs]$",
              "examples": [
                "Jh"
              ]
            },
            "minItems": 3,
            "maxItems": 5,
            "uniqueItems": true,
            "description": "3, 4 or 5 distinct cards; the street is its length.",
            "examples": [
              [
                "Jh",
                "9s",
                "4d"
              ]
            ]
          },
          "pot_bb": {
            "type": "number",
            "exclusiveMinimum": 0,
            "description": "The pot at the start of this street"
          },
          "players": {
            "type": "array",
            "minItems": 2,
            "maxItems": 3,
            "description": "In postflop order: the first acts first",
            "items": {
              "type": "object",
              "additionalProperties": false,
              "required": [
                "seat",
                "stack_bb",
                "range"
              ],
              "properties": {
                "seat": {
                  "type": "string",
                  "pattern": "^[A-Za-z0-9+]{1,8}$",
                  "description": "A name for the answer",
                  "examples": [
                    "BB",
                    "BTN"
                  ]
                },
                "stack_bb": {
                  "type": "number",
                  "exclusiveMinimum": 0,
                  "description": "Behind at the start of this street"
                },
                "range": {
                  "oneOf": [
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "text"
                      ],
                      "properties": {
                        "text": {
                          "type": "string",
                          "maxLength": 5000,
                          "description": "Range text: \"AA, AKs, AQs:0.5, 22+, ATs+, 77-99, K9o-KQo, AhKh\". Later items override earlier ones."
                        }
                      }
                    },
                    {
                      "type": "object",
                      "additionalProperties": false,
                      "required": [
                        "weights"
                      ],
                      "properties": {
                        "weights": {
                          "type": "array",
                          "items": {
                            "type": "number",
                            "minimum": 0,
                            "maximum": 1
                          },
                          "minItems": 1326,
                          "maxItems": 1326,
                          "description": "1,326 weights; card id = rank*4+suit (2c=0 … As=51); combo of cards a<b at b*(b-1)/2+a."
                        }
                      }
                    }
                  ]
                }
              }
            }
          },
          "actions": {
            "type": "array",
            "items": {
              "oneOf": [
                {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "type"
                  ],
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "fold",
                        "check",
                        "call",
                        "all_in"
                      ]
                    }
                  }
                },
                {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "type",
                    "to_bb"
                  ],
                  "properties": {
                    "type": {
                      "type": "string",
                      "enum": [
                        "bet",
                        "raise"
                      ]
                    },
                    "to_bb": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "The player's street total after the action, in bb"
                    }
                  }
                }
              ],
              "examples": [
                {
                  "type": "check"
                },
                {
                  "type": "bet",
                  "to_bb": 1.28
                },
                {
                  "type": "raise",
                  "to_bb": 6.5
                },
                {
                  "type": "call"
                },
                {
                  "type": "all_in"
                }
              ]
            },
            "maxItems": 12,
            "default": [],
            "description": "This street's actions so far, in order"
          },
          "sizing": {
            "oneOf": [
              {
                "type": "string",
                "enum": [
                  "auto_simplified"
                ],
                "description": "Default when omitted: automatic size policy, preferring one bet size on the flop when the size-picker network says a single size captures the spot cleanly (falling back to a wider multi-size menu when needed), with standard turn/river menus."
              },
              {
                "type": "string",
                "enum": [
                  "auto_mixed"
                ],
                "description": "Automatic size policy using the size-picker network's full multi-size GTO mix on the flop (two-player postflop only), with standard turn/river menus."
              },
              {
                "type": "object",
                "additionalProperties": false,
                "properties": {
                  "bet": {
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 3,
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "pct"
                          ],
                          "properties": {
                            "pct": {
                              "type": "number",
                              "exclusiveMinimum": 0,
                              "description": "% of the pot"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "bb"
                          ],
                          "properties": {
                            "bb": {
                              "type": "number",
                              "exclusiveMinimum": 0
                            }
                          }
                        }
                      ]
                    }
                  },
                  "raise": {
                    "type": "array",
                    "minItems": 0,
                    "maxItems": 3,
                    "items": {
                      "oneOf": [
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "pct"
                          ],
                          "properties": {
                            "pct": {
                              "type": "integer",
                              "exclusiveMinimum": 0,
                              "description": "% of the pot after calling"
                            }
                          }
                        },
                        {
                          "type": "object",
                          "additionalProperties": false,
                          "required": [
                            "bb"
                          ],
                          "properties": {
                            "bb": {
                              "type": "number",
                              "exclusiveMinimum": 0
                            }
                          }
                        }
                      ]
                    }
                  },
                  "call": {
                    "type": "boolean",
                    "description": "Include (true) or remove (false) Call / Limp / Cold-call from the solved tree at this node."
                  },
                  "all_in": {
                    "type": "boolean",
                    "description": "Include (true) or remove (false) All-in from the solved tree at this node."
                  }
                },
                "description": "Custom action & bet/raise CRUD menu applied to the current preflop or postflop decision node (preflop uses raise/call/all_in; postflop uses bet/raise/call/all_in across both HU and 3-way)."
              }
            ],
            "default": "auto_simplified",
            "description": "Optional sizing & action-menu override (accepted on preflop and postflop hand requests as well as custom-range requests): \"auto_simplified\" (default), \"auto_mixed\" (2-player postflop only), or custom {\"bet\"?, \"raise\"?, \"call\"?, \"all_in\"?}.",
            "examples": [
              "auto_simplified",
              "auto_mixed",
              {
                "bet": [
                  {
                    "pct": 33
                  },
                  {
                    "pct": 75
                  }
                ],
                "raise": [
                  {
                    "pct": 60
                  }
                ]
              },
              {
                "call": true,
                "raise": [
                  {
                    "bb": 7.5
                  }
                ],
                "all_in": false
              }
            ]
          },
          "rake": {
            "type": [
              "object",
              "null"
            ],
            "additionalProperties": false,
            "required": [
              "pct"
            ],
            "properties": {
              "pct": {
                "type": "number",
                "minimum": 0,
                "maximum": 10
              },
              "cap_bb": {
                "type": [
                  "number",
                  "null"
                ],
                "minimum": 0
              }
            },
            "description": "null: no rake"
          },
          "include": {
            "type": "object",
            "additionalProperties": false,
            "description": "Optional composable output selector. Default when omitted returns aggregate actions[] only (~1.5 KB). hand_classes and combos return separate top-level keys and may both be true in the same request.",
            "properties": {
              "hand_classes": {
                "type": "boolean",
                "default": false,
                "description": "Include top-level hand_classes (169-class map)"
              },
              "combos": {
                "type": "boolean",
                "default": false,
                "description": "Include top-level combos (1326-combo map on postflop; 169-class map on preflop)"
              },
              "hole_cards": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^[2-9TJQKA][cdhs]$",
                  "examples": [
                    "Jh"
                  ]
                },
                "minItems": 2,
                "maxItems": 2,
                "uniqueItems": true,
                "description": "One combo (2 distinct cards, either order; not on the board): adds top-level hole_cards for the player to act. Duplicate or board card: 400 at /include/hole_cards/0 or /1.",
                "examples": [
                  [
                    "Ah",
                    "Kh"
                  ]
                ]
              }
            }
          }
        },
        "examples": [
          {
            "board": [
              "Jh",
              "9s",
              "4d",
              "2c"
            ],
            "pot_bb": 10.5,
            "players": [
              {
                "seat": "BB",
                "stack_bb": 94.5,
                "range": {
                  "text": "AA,KK,AKs:0.5"
                }
              },
              {
                "seat": "BTN",
                "stack_bb": 94.5,
                "range": {
                  "text": "22+, A2s+, K2s+, ATo+"
                }
              }
            ],
            "actions": [
              {
                "type": "check"
              },
              {
                "type": "bet",
                "to_bb": 3.5
              }
            ],
            "sizing": {
              "bet": [
                {
                  "pct": 33
                },
                {
                  "pct": 75
                }
              ],
              "raise": [
                {
                  "pct": 60
                }
              ]
            },
            "rake": {
              "pct": 5,
              "cap_bb": 3
            },
            "include": {
              "combos": true
            }
          },
          {
            "board": [
              "Jh",
              "9s",
              "4d"
            ],
            "pot_bb": 9,
            "players": [
              {
                "seat": "SB",
                "stack_bb": 97,
                "range": {
                  "text": "22+, A2s+, K9s+, ATo+"
                }
              },
              {
                "seat": "BB",
                "stack_bb": 97,
                "range": {
                  "text": "22+, A2s+, K2s+, A2o+, K9o+"
                }
              },
              {
                "seat": "BTN",
                "stack_bb": 97,
                "range": {
                  "text": "22+, A2s+, K5s+, A7o+, KTo+"
                }
              }
            ],
            "actions": [
              {
                "type": "check"
              }
            ]
          }
        ]
      },
      "HoleCardsAnswer": {
        "type": "object",
        "required": [
          "cards",
          "combo",
          "class",
          "seat",
          "granularity",
          "in_range",
          "weight",
          "ev_bb",
          "actions"
        ],
        "description": "Only when the request sent hole_cards: that combo at this decision, for the player to act. Not in range (zero weight, or a class missing from a preflop strategy solved live): in_range false, reason not_in_range, weight 0 (null where weights are unknown), ev_bb and actions null.",
        "properties": {
          "cards": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[2-9TJQKA][cdhs]$",
              "examples": [
                "Jh"
              ]
            },
            "minItems": 2,
            "maxItems": 2,
            "description": "Higher card first, as hands names combos",
            "examples": [
              [
                "Ah",
                "Kh"
              ]
            ]
          },
          "combo": {
            "type": "string",
            "examples": [
              "AhKh"
            ],
            "description": "The key hands uses with detail combos"
          },
          "class": {
            "type": "string",
            "examples": [
              "AKs"
            ]
          },
          "seat": {
            "type": "string",
            "description": "The player to act (= to_act)"
          },
          "granularity": {
            "type": "string",
            "enum": [
              "combo",
              "class"
            ],
            "description": "combo postflop; class preflop (charts and our preflop solver answer per hand class: the combo has its class's numbers)"
          },
          "in_range": {
            "type": [
              "boolean",
              "null"
            ],
            "description": "null when it cannot be told (preflop from our preflop solver: no range weights)"
          },
          "weight": {
            "type": [
              "number",
              "null"
            ],
            "description": "The combo's weight in the actor's range (4 decimals); null preflop from our preflop solver"
          },
          "ev_bb": {
            "type": [
              "number",
              "null"
            ],
            "description": "The combo's EV (2 decimals); null where the answer has no EVs (3 players, our preflop solver) or not in range"
          },
          "actions": {
            "type": [
              "array",
              "null"
            ],
            "description": "The top-level actions (same label, type, to_bb) with this combo's frequency (4 decimals) and per-action EV (2 decimals); null when not in range",
            "items": {
              "type": "object",
              "required": [
                "label",
                "type",
                "frequency",
                "ev_bb"
              ],
              "properties": {
                "label": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "fold",
                    "check",
                    "call",
                    "bet",
                    "raise",
                    "all_in"
                  ]
                },
                "to_bb": {
                  "type": "number"
                },
                "frequency": {
                  "type": "number"
                },
                "ev_bb": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              }
            }
          },
          "reason": {
            "type": "string",
            "enum": [
              "not_in_range"
            ],
            "description": "Only when in_range is false"
          }
        }
      },
      "Answer": {
        "type": "object",
        "required": [
          "id",
          "street",
          "to_act",
          "pot_bb",
          "to_call_bb",
          "actions"
        ],
        "properties": {
          "id": {
            "type": "string",
            "description": "The trace id, for support"
          },
          "street": {
            "type": "string",
            "enum": [
              "preflop",
              "flop",
              "turn",
              "river"
            ]
          },
          "board": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[2-9TJQKA][cdhs]$",
              "examples": [
                "Jh"
              ]
            },
            "description": "The board, as an array of cards"
          },
          "positions": {
            "type": "object",
            "description": "Heads-up: oop and ip; 3 players: order",
            "properties": {
              "oop": {
                "type": "string"
              },
              "ip": {
                "type": "string"
              },
              "order": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "players": {
            "type": "integer",
            "description": "Number of active players on this street"
          },
          "folded": {
            "type": "array",
            "items": {
              "type": "string"
            },
            "description": "Seats that folded on this street (3-way)"
          },
          "to_act": {
            "type": "string",
            "description": "A seat name, as in your table or players"
          },
          "pot_bb": {
            "type": "number"
          },
          "to_call_bb": {
            "type": "number"
          },
          "ev_bb": {
            "type": [
              "number",
              "null"
            ],
            "description": "The range's EV here, in bb"
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "label",
                "type",
                "frequency"
              ],
              "properties": {
                "label": {
                  "type": "string",
                  "examples": [
                    "check",
                    "bet 1.82",
                    "raise 7.3",
                    "allin 97.5"
                  ],
                  "description": "The key hand_classes[*].strategy and combos[*].strategy use"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "fold",
                    "check",
                    "call",
                    "bet",
                    "raise",
                    "all_in"
                  ]
                },
                "to_bb": {
                  "type": "number",
                  "description": "bet / raise / all_in only: the street total after the action"
                },
                "frequency": {
                  "type": "number"
                },
                "ev_bb": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              }
            }
          },
          "hand_classes": {
            "type": "object",
            "description": "Included when include.hand_classes is true: 169-class map (\"AKs\", \"QQ\", ...); look up by name, key order is not guaranteed",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "combos": {
                  "type": "integer"
                },
                "weight": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "ev_bb": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "strategy": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "combos": {
            "type": "object",
            "description": "Included when include.combos is true: 1326-combo map on postflop (\"AhKh\", ...; 169-class map on preflop); look up by name, key order is not guaranteed",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "combos": {
                  "type": "integer"
                },
                "weight": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "ev_bb": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "strategy": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "hole_cards": {
            "$ref": "#/components/schemas/HoleCardsAnswer"
          },
          "input_ranges": {
            "type": "object",
            "description": "Postflop responses only (2-way and 3-way): per-seat provenance of the starting ranges entering this street, keyed by seat name (e.g. BB, BTN, or SB/BB/BTN).",
            "additionalProperties": {
              "type": "object",
              "required": [
                "source",
                "warmed",
                "warm_id"
              ],
              "properties": {
                "source": {
                  "type": "string",
                  "enum": [
                    "preflop",
                    "flop",
                    "turn",
                    "custom"
                  ],
                  "description": "Where this seat's starting range came from"
                },
                "warmed": {
                  "type": "boolean",
                  "description": "true when this seat's input range or street solve was populated by POST /v1/warm"
                },
                "warm_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^slv_[a-f0-9]{20}$",
                  "description": "The POST /v1/warm trace ID when warmed is true, else null"
                }
              }
            }
          },
          "timing": {
            "type": "object",
            "description": "Your total time minus server_ms is the network",
            "properties": {
              "server_ms": {
                "type": "integer",
                "description": "Time on our server once the request had arrived"
              },
              "solve_ms": {
                "type": "integer",
                "description": "The part of server_ms spent solving (0 on cache hits)"
              },
              "warm_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^slv_[a-f0-9]{20}$"
                },
                "description": "Trace IDs of any POST /v1/warm jobs that populated cached streets/ranges used by this solve (empty array when none)"
              },
              "server": {
                "type": "string",
                "description": "Which server answered"
              }
            }
          },
          "quota": {
            "type": "object",
            "properties": {
              "used": {
                "type": "integer"
              },
              "limit": {
                "type": "integer"
              },
              "total_used": {
                "type": "integer"
              },
              "total_limit": {
                "type": "integer"
              }
            }
          }
        }
      },
      "Table": {
        "oneOf": [
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "seats",
              "stack_bb",
              "rake"
            ],
            "description": "Shorthand table: expands seats (2-9) to canonical preflop seat order (STR last when straddle is true), with stack_bb for every seat and optional per-seat overrides in stacks_bb.",
            "properties": {
              "seats": {
                "type": "integer",
                "minimum": 2,
                "maximum": 9
              },
              "stack_bb": {
                "type": "number",
                "exclusiveMinimum": 0,
                "description": "Default starting stack for every seat, in bb"
              },
              "stacks_bb": {
                "type": "object",
                "additionalProperties": {
                  "type": "number",
                  "exclusiveMinimum": 0
                },
                "description": "Optional per-seat stack overrides, e.g. {\"BTN\": 80}"
              },
              "rake": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": false,
                "required": [
                  "pct"
                ],
                "properties": {
                  "pct": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10
                  },
                  "cap_bb": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  }
                },
                "description": "null: no rake"
              },
              "ante_bb": {
                "type": "number",
                "minimum": 0,
                "default": 0,
                "description": "Per player"
              },
              "straddle": {
                "type": "boolean",
                "default": false,
                "description": "The STR seat straddles 2 bb"
              }
            }
          },
          {
            "type": "object",
            "additionalProperties": false,
            "required": [
              "max_seats",
              "seats",
              "rake"
            ],
            "description": "Longhand table: explicit seat list in preflop order with per-seat stack_bb.",
            "properties": {
              "max_seats": {
                "type": "integer",
                "minimum": 2,
                "maximum": 9
              },
              "seats": {
                "type": "array",
                "minItems": 2,
                "maxItems": 9,
                "description": "Exactly max_seats entries in preflop order (first to act preflop first; BB last; STR last when straddle is true); names unique; heads-up SB, BB.",
                "items": {
                  "type": "object",
                  "additionalProperties": false,
                  "required": [
                    "seat",
                    "stack_bb"
                  ],
                  "properties": {
                    "seat": {
                      "type": "string",
                      "enum": [
                        "UTG",
                        "UTG1",
                        "UTG2",
                        "LJ",
                        "MP",
                        "HJ",
                        "CO",
                        "BTN",
                        "SB",
                        "BB",
                        "STR"
                      ]
                    },
                    "stack_bb": {
                      "type": "number",
                      "exclusiveMinimum": 0,
                      "description": "At the start of the hand, before blinds and antes"
                    }
                  }
                }
              },
              "rake": {
                "type": [
                  "object",
                  "null"
                ],
                "additionalProperties": false,
                "required": [
                  "pct"
                ],
                "properties": {
                  "pct": {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 10
                  },
                  "cap_bb": {
                    "type": [
                      "number",
                      "null"
                    ],
                    "minimum": 0
                  }
                },
                "description": "null: no rake"
              },
              "ante_bb": {
                "type": "number",
                "minimum": 0,
                "default": 0,
                "description": "Per player"
              },
              "straddle": {
                "type": "boolean",
                "default": false,
                "description": "The STR seat straddles 2 bb"
              }
            }
          }
        ],
        "description": "Your table (shorthand or longhand). The server decides how to answer it (our charts when one is close, our preflop solver live otherwise) and says how close the answer is in quality."
      },
      "TraceStep": {
        "type": "object",
        "required": [
          "street",
          "status",
          "ms",
          "warm_id",
          "actions_count"
        ],
        "description": "One street step in a solve execution trace.",
        "properties": {
          "street": {
            "type": "string",
            "enum": [
              "preflop",
              "flop",
              "turn",
              "river"
            ]
          },
          "board": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[2-9TJQKA][cdhs]$",
              "examples": [
                "Jh"
              ]
            },
            "description": "Board cards dealt on or through this street (omitted on preflop)"
          },
          "status": {
            "type": "string",
            "enum": [
              "instant",
              "warmed",
              "cached",
              "solved"
            ],
            "description": "instant (preflop chart lookup), warmed (hit from POST /v1/warm), cached (hit from prior solve memo/range cache), or solved (solved live)"
          },
          "ms": {
            "type": "integer",
            "minimum": 0,
            "description": "Measured server time spent on this street step, in ms"
          },
          "warm_id": {
            "type": [
              "string",
              "null"
            ],
            "pattern": "^slv_[a-f0-9]{20}$",
            "description": "The POST /v1/warm trace ID when status is warmed, else null"
          },
          "actions_count": {
            "type": "integer",
            "minimum": 0,
            "description": "Number of actions replayed on this street"
          }
        }
      },
      "TraceNode": {
        "type": "object",
        "required": [
          "index",
          "street",
          "board",
          "pot_bb",
          "to_act",
          "closed_street",
          "trigger",
          "is_target",
          "warm"
        ],
        "description": "One chronological game-state transition in a solve trace (deal, player action, or target decision).",
        "properties": {
          "index": {
            "type": "integer",
            "minimum": 0
          },
          "street": {
            "type": "string",
            "enum": [
              "preflop",
              "flop",
              "turn",
              "river"
            ]
          },
          "board": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[2-9TJQKA][cdhs]$",
              "examples": [
                "Jh"
              ]
            }
          },
          "pot_bb": {
            "type": "number"
          },
          "to_act": {
            "type": [
              "string",
              "null"
            ],
            "description": "Seat acting next at this state, or null when closed_street is true"
          },
          "closed_street": {
            "type": "boolean"
          },
          "trigger": {
            "type": "string",
            "description": "Human-readable transition label, e.g. \"Deal flop Jh 9s 4d\" or \"BB check\""
          },
          "is_target": {
            "type": "boolean",
            "description": "true on the decision node answered by POST /v1/solve"
          },
          "our_solve": {
            "type": [
              "object",
              "boolean",
              "null"
            ],
            "description": "Present when this caller invoked POST /v1/solve at this state node (highlighting prior/target solves along the hand path).",
            "properties": {
              "id": {
                "type": "string",
                "pattern": "^slv_[a-f0-9]{20}$"
              },
              "server_ms": {
                "type": "integer",
                "minimum": 0
              },
              "solve_ms": {
                "type": "integer",
                "minimum": 0
              },
              "step_status": {
                "type": "string",
                "enum": [
                  "instant",
                  "warmed",
                  "cached",
                  "solved"
                ]
              },
              "warm_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^slv_[a-f0-9]{20}$"
                }
              }
            }
          },
          "warm": {
            "type": "object",
            "required": [
              "sent",
              "id",
              "status"
            ],
            "properties": {
              "sent": {
                "type": "boolean",
                "description": "Whether this caller sent POST /v1/warm at this exact state prefix"
              },
              "id": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^slv_[a-f0-9]{20}$"
              },
              "status": {
                "type": [
                  "string",
                  "null"
                ],
                "enum": [
                  "warming",
                  "ready",
                  "skipped",
                  null
                ]
              },
              "reason": {
                "type": "string",
                "enum": [
                  "quota",
                  "warm_cap",
                  "busy"
                ]
              },
              "ms": {
                "type": [
                  "integer",
                  "null"
                ],
                "minimum": 0
              },
              "request": {
                "$ref": "#/components/schemas/SolveRequest"
              },
              "response": {
                "type": [
                  "object",
                  "null"
                ],
                "description": "Recorded 202 Accepted reply from POST /v1/warm when sent is true"
              }
            }
          },
          "solve": {
            "type": "object",
            "required": [
              "step_status",
              "ms",
              "warm_id"
            ],
            "properties": {
              "step_status": {
                "type": "string",
                "enum": [
                  "instant",
                  "warmed",
                  "cached",
                  "solved"
                ]
              },
              "ms": {
                "type": "integer",
                "minimum": 0
              },
              "warm_id": {
                "type": [
                  "string",
                  "null"
                ],
                "pattern": "^slv_[a-f0-9]{20}$"
              }
            }
          }
        }
      },
      "SolveTraceNode": {
        "type": "object",
        "required": [
          "id",
          "index",
          "street",
          "board",
          "pot_bb",
          "to_act",
          "player_ranges"
        ],
        "description": "169-class strategy and per-seat reaching ranges returned by GET /v1/solves/{id}/nodes/{index} (24h TTL, caller-scoped, free of solve quota).",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^slv_[a-f0-9]{20}$"
          },
          "index": {
            "type": "integer",
            "minimum": 0
          },
          "street": {
            "type": "string",
            "enum": [
              "preflop",
              "flop",
              "turn",
              "river"
            ]
          },
          "board": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[2-9TJQKA][cdhs]$",
              "examples": [
                "Jh"
              ]
            }
          },
          "pot_bb": {
            "type": "number"
          },
          "to_act": {
            "type": [
              "string",
              "null"
            ]
          },
          "closed_street": {
            "type": "boolean"
          },
          "ev_bb": {
            "type": [
              "number",
              "null"
            ]
          },
          "actions": {
            "type": "array",
            "items": {
              "type": "object",
              "required": [
                "label",
                "type",
                "frequency"
              ],
              "properties": {
                "label": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "fold",
                    "check",
                    "call",
                    "bet",
                    "raise",
                    "all_in"
                  ]
                },
                "to_bb": {
                  "type": "number"
                },
                "frequency": {
                  "type": "number"
                },
                "ev_bb": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              }
            }
          },
          "hand_classes": {
            "type": [
              "object",
              "null"
            ],
            "description": "169-class strategy map for to_act (null on closed streets)",
            "additionalProperties": {
              "type": "object",
              "properties": {
                "combos": {
                  "type": "integer"
                },
                "weight": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "ev_bb": {
                  "type": [
                    "number",
                    "null"
                  ]
                },
                "strategy": {
                  "type": "object",
                  "additionalProperties": {
                    "type": "number"
                  }
                }
              }
            }
          },
          "player_ranges": {
            "type": "object",
            "description": "Per-seat 169-class reaching ranges keyed by active seat name (e.g. BB, BTN, or SB/BB/BTN).",
            "additionalProperties": {
              "type": "object",
              "additionalProperties": {
                "oneOf": [
                  {
                    "type": "number",
                    "minimum": 0,
                    "maximum": 1
                  },
                  {
                    "type": "object",
                    "properties": {
                      "combos": {
                        "type": "integer"
                      },
                      "weight": {
                        "type": "number",
                        "minimum": 0,
                        "maximum": 1
                      }
                    }
                  }
                ]
              }
            }
          }
        }
      },
      "SolveTrace": {
        "type": "object",
        "required": [
          "id",
          "created_at",
          "mode",
          "street",
          "players",
          "to_act",
          "pot_bb",
          "to_call_bb",
          "steps",
          "timing"
        ],
        "description": "Execution trace returned by GET /v1/solves/{id}/trace (24h TTL, caller-scoped).",
        "properties": {
          "id": {
            "type": "string",
            "pattern": "^slv_[a-f0-9]{20}$"
          },
          "created_at": {
            "type": "string",
            "format": "date-time"
          },
          "mode": {
            "type": "string",
            "enum": [
              "hand",
              "ranges"
            ]
          },
          "street": {
            "type": "string",
            "enum": [
              "preflop",
              "flop",
              "turn",
              "river"
            ]
          },
          "board": {
            "type": "array",
            "items": {
              "type": "string",
              "pattern": "^[2-9TJQKA][cdhs]$",
              "examples": [
                "Jh"
              ]
            }
          },
          "positions": {
            "type": "object",
            "properties": {
              "oop": {
                "type": "string"
              },
              "ip": {
                "type": "string"
              },
              "order": {
                "type": "array",
                "items": {
                  "type": "string"
                }
              }
            }
          },
          "players": {
            "type": "integer",
            "minimum": 2
          },
          "to_act": {
            "type": "string"
          },
          "pot_bb": {
            "type": "number"
          },
          "to_call_bb": {
            "type": "number"
          },
          "ev_bb": {
            "type": [
              "number",
              "null"
            ],
            "description": "The acting player's range EV at the solved decision, in bb (null on 3-way)"
          },
          "request": {
            "$ref": "#/components/schemas/SolveRequest"
          },
          "actions": {
            "type": "array",
            "description": "Solved GTO actions at the target decision node",
            "items": {
              "type": "object",
              "required": [
                "label",
                "type",
                "frequency"
              ],
              "properties": {
                "label": {
                  "type": "string"
                },
                "type": {
                  "type": "string",
                  "enum": [
                    "fold",
                    "check",
                    "call",
                    "bet",
                    "raise",
                    "all_in"
                  ]
                },
                "to_bb": {
                  "type": "number"
                },
                "frequency": {
                  "type": "number"
                },
                "ev_bb": {
                  "type": [
                    "number",
                    "null"
                  ]
                }
              }
            }
          },
          "hole_cards": {
            "$ref": "#/components/schemas/HoleCardsAnswer"
          },
          "nodes": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceNode"
            },
            "description": "Chronological state transitions from deal through the solved target node, with per-node POST /v1/warm telemetry"
          },
          "input_ranges": {
            "type": "object",
            "description": "Postflop traces only (2-way and 3-way): per-seat provenance of starting ranges.",
            "additionalProperties": {
              "type": "object",
              "required": [
                "source",
                "warmed",
                "warm_id"
              ],
              "properties": {
                "source": {
                  "type": "string",
                  "enum": [
                    "preflop",
                    "flop",
                    "turn",
                    "custom"
                  ]
                },
                "warmed": {
                  "type": "boolean"
                },
                "warm_id": {
                  "type": [
                    "string",
                    "null"
                  ],
                  "pattern": "^slv_[a-f0-9]{20}$"
                }
              }
            }
          },
          "steps": {
            "type": "array",
            "items": {
              "$ref": "#/components/schemas/TraceStep"
            },
            "description": "Ordered street execution steps (1 to 4 steps)"
          },
          "timing": {
            "type": "object",
            "properties": {
              "server_ms": {
                "type": "integer"
              },
              "solve_ms": {
                "type": "integer"
              },
              "warm_ids": {
                "type": "array",
                "items": {
                  "type": "string",
                  "pattern": "^slv_[a-f0-9]{20}$"
                }
              },
              "server": {
                "type": "string"
              }
            }
          }
        }
      },
      "Account": {
        "type": "object",
        "properties": {
          "key": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string"
              },
              "prefix": {
                "type": "string"
              },
              "tier": {
                "type": "string",
                "enum": [
                  "free",
                  "trial",
                  "builder",
                  "pro",
                  "business"
                ]
              },
              "tier_label": {
                "type": "string"
              },
              "source": {
                "type": "string"
              },
              "email": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "created_at": {
                "type": "string",
                "format": "date-time"
              },
              "expires_at": {
                "type": [
                  "string",
                  "null"
                ],
                "format": "date-time"
              }
            }
          },
          "limits": {
            "type": "object",
            "properties": {
              "per_day": {
                "type": "integer"
              },
              "per_min": {
                "type": "integer"
              },
              "concurrency": {
                "type": "integer"
              },
              "batch_max_items": {
                "type": "integer"
              },
              "webhooks": {
                "type": "boolean"
              },
              "total_cap": {
                "type": [
                  "integer",
                  "null"
                ]
              }
            }
          },
          "usage": {
            "type": "object",
            "properties": {
              "today": {
                "type": "object",
                "properties": {
                  "used": {
                    "type": "integer"
                  },
                  "limit": {
                    "type": "integer"
                  },
                  "resets_at": {
                    "type": "string",
                    "format": "date-time"
                  }
                }
              },
              "total": {
                "type": "object",
                "properties": {
                  "used": {
                    "type": "integer"
                  },
                  "limit": {
                    "type": "integer"
                  }
                }
              },
              "days": {
                "type": "array",
                "items": {
                  "type": "object",
                  "properties": {
                    "day": {
                      "type": "string",
                      "format": "date"
                    },
                    "total": {
                      "type": "integer"
                    },
                    "by_street": {
                      "type": "object",
                      "additionalProperties": {
                        "type": "integer"
                      }
                    }
                  }
                }
              }
            }
          },
          "billing": {
            "type": "object",
            "properties": {
              "managed": {
                "type": "boolean"
              }
            }
          },
          "webhook_secret": {
            "type": [
              "string",
              "null"
            ]
          }
        }
      },
      "Error": {
        "type": "object",
        "required": [
          "error"
        ],
        "properties": {
          "error": {
            "type": "object",
            "required": [
              "code",
              "message",
              "path"
            ],
            "properties": {
              "code": {
                "type": "string",
                "enum": [
                  "invalid_request",
                  "invalid_range",
                  "unknown_field",
                  "invalid_json",
                  "invalid_poker_state",
                  "unauthorized",
                  "body_too_large",
                  "line_not_in_tree",
                  "line_over",
                  "unsolvable",
                  "preflop_open",
                  "street_open",
                  "unsupported_table",
                  "multiway",
                  "rate_limited",
                  "quota_exceeded",
                  "busy",
                  "timeout",
                  "not_ready",
                  "method_not_allowed",
                  "internal",
                  "forbidden",
                  "not_found"
                ]
              },
              "message": {
                "type": "string",
                "description": "What went wrong and how to fix it"
              },
              "path": {
                "type": "string",
                "description": "A JSON Pointer to the field (\"/streets/preflop/2/to_bb\"), or \"\" for the whole body",
                "examples": [
                  "/streets/preflop/2/to_bb"
                ]
              }
            }
          }
        }
      }
    }
  }
}