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

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.

About Pokerai API

Pokerai API provides solver-grade GTO strategy and poker computation APIs for training products, review tools, coaches, researchers, and AI agents.

Free tier: 10 presolved lookups + 5 real-time solves per month.

Real-time assistance (RTA) at real-money tables is prohibited.

MIT licensed.

Metadata

Release files for pokerai-bet 0.2.1

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.2.1
File Size Uploaded Provenance Actions
pokerai_bet-0.2.1.tar.gz 54.1 kB Without provenance Details for pokerai_bet-0.2.1.tar.gz

Built distribution (wheel)

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

Total release size: 226.6 kB

Release files / pokerai_bet-0.2.1.tar.gz

Download URL pokerai_bet-0.2.1.tar.gz
Size 54.1 kB
Tags Source
SHA-256 checksum
How to use checksums
0b01ff75f6359058a585e139608952d95d9149e6da651cf3ec843dc57cb2515d
BLAKE2b-256 checksum
How to use checksums
f36ab072e4335ebfc9a23e24f73d70293e5de1e3645069f6e13bba604a849ea8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

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

Download URL pokerai_bet-0.2.1-py3-none-any.whl
Size 172.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
808fafa21fa6e75add83767f690fd0f0ab48469d465c5dd2ac23b2aa29116b9b
BLAKE2b-256 checksum
How to use checksums
5a6048f41c93461c33852fbea3355b4831c970e912d5735db1b5eeb27c7e68f6
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/7.0.0 CPython/3.12.14

Security for pokerai-bet 0.2.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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