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: 1,000 presolved lookups + 25 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.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.2.0
File Size Uploaded Provenance Actions
pokerai_bet-0.2.0.tar.gz 53.5 kB Without provenance Details for pokerai_bet-0.2.0.tar.gz

Built distribution (wheel)

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

Total release size: 225.0 kB

Release files / pokerai_bet-0.2.0.tar.gz

Download URL pokerai_bet-0.2.0.tar.gz
Size 53.5 kB
Tags Source
SHA-256 checksum
How to use checksums
f0cc20aaffe5918927aec9c3e73bc353dec5b51cc5a964dd83f1238bf62a9ce8
BLAKE2b-256 checksum
How to use checksums
76f57f15313a58cf9ec13d4fdb665223641ba88955b4b8ce8fbfd36fde5a2aaf
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.0-py3-none-any.whl

Download URL pokerai_bet-0.2.0-py3-none-any.whl
Size 171.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
8cb9443f02409a33af4d1408b7b2a08f7c5a4152cb799591bc2d131d3134af67
BLAKE2b-256 checksum
How to use checksums
816a41a2bc43a0103c3460c8224f5d2f7a1ef733f5ebd435716732dbd90e7541
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.0

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