Skip to main content

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.

Metadata

Release files for pokerai-bet 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for pokerai-bet 0.1.0
File Size Uploaded
pokerai_bet-0.1.0.tar.gz 30.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for pokerai-bet 0.1.0
File Interpreter ABI Platform
pokerai_bet-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 131.6 kB

Release files / pokerai_bet-0.1.0.tar.gz

Download URL pokerai_bet-0.1.0.tar.gz
Size 30.5 kB
Tags Source
SHA-256 checksum
How to use checksums
481db7cc0fe38f757fb6ebf6a6bf2c4cf228d00e936d19a83820f90ea8cd260e
BLAKE2b-256 checksum
How to use checksums
7e79a6ab3a26d1fddc46f968ce98e89a580c40cf64610a3a239bc4e6562ffc0b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release files / pokerai_bet-0.1.0-py3-none-any.whl

Download URL pokerai_bet-0.1.0-py3-none-any.whl
Size 101.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0bfb7f2712dafee8dc10ac11b4008d3d97b392f22e2413fc4bf8327b26820a0d
BLAKE2b-256 checksum
How to use checksums
dbb819b0ef46a2fc3926723dcd19562d788dec959763a82be5964404b89465e0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.14.4

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page