Official Python client for the Pokerai API — solver-grade GTO strategy for 6-max No-Limit Hold'em. Auto-generated from the OpenAPI spec.
Project description
pokerai-bet
Official Python client for the Pokerai API — solver-grade GTO strategy
for 6-max No-Limit Hold'em, over HTTP. Typed, httpx-based, auto-generated from the
OpenAPI spec so it always tracks the live API.
Get a free API key at https://pokerai.bet/login. Docs: https://pokerai.bet/docs.en
pip install pokerai-bet # distribution name; import as `pokerai`
Quickstart
Preflop GTO strategy for a hand facing an action line:
from pokerai import AuthenticatedClient
from pokerai.api.lookup import preflop_strategy
from pokerai.models import (
PreflopRequest,
PreflopRequestPositions,
PreflopRequestPreflopActionsItem,
PreflopRequestPreflopActionsItemAction as Act,
)
from pokerai.models.position import Position
client = AuthenticatedClient(base_url="https://pokerai.bet", token="gto_your_key")
req = PreflopRequest(
hole_cards="AhKh",
positions=PreflopRequestPositions(hero=Position.MP),
preflop_actions=[
PreflopRequestPreflopActionsItem(position=Position.SB, action=Act.SMALL_BLIND, amount=0.5),
PreflopRequestPreflopActionsItem(position=Position.BB, action=Act.BIG_BLIND, amount=1),
PreflopRequestPreflopActionsItem(position=Position.UTG, action=Act.RAISE, amount=3),
],
)
result = preflop_strategy.sync(client=client, body=req)
print(result) # situation="Raise", strategy=[{action:"raise", frequency:1.0, amount_bb:9, ...}]
Layout
Every endpoint is a module under pokerai.api.<tag> with four functions:
| function | blocking? | returns |
|---|---|---|
sync |
yes | parsed model (or None) |
sync_detailed |
yes | full Response (status + parsed) |
asyncio |
no | parsed model |
asyncio_detailed |
no | full Response |
Tags: lookup (preflop + flop presolved), solver (real-time turn/river), range (range updates).
Request/response models live in pokerai.models. Auth is your API key via
AuthenticatedClient(token=...) (sent as Authorization: Bearer).
Not into constructing model objects?
This client is fully typed but verbose (it's generated). If you'd rather drive the API from an LLM agent, see @pokerai/mcp — the same API as MCP tools. Or call the HTTP endpoints directly; see the reference.
MIT licensed.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pokerai_bet-0.1.0.tar.gz.
File metadata
- Download URL: pokerai_bet-0.1.0.tar.gz
- Upload date:
- Size: 30.5 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
481db7cc0fe38f757fb6ebf6a6bf2c4cf228d00e936d19a83820f90ea8cd260e
|
|
| MD5 |
206e3327bb5967bcc5aa1f0df8a63bda
|
|
| BLAKE2b-256 |
7e79a6ab3a26d1fddc46f968ce98e89a580c40cf64610a3a239bc4e6562ffc0b
|
File details
Details for the file pokerai_bet-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pokerai_bet-0.1.0-py3-none-any.whl
- Upload date:
- Size: 101.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.14.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
0bfb7f2712dafee8dc10ac11b4008d3d97b392f22e2413fc4bf8327b26820a0d
|
|
| MD5 |
71c62e5d521932f5c72bbcc718a5b58c
|
|
| BLAKE2b-256 |
dbb819b0ef46a2fc3926723dcd19562d788dec959763a82be5964404b89465e0
|