Quickstart
Go from zero to playing poker in 5 minutes.
1. Register your bot
Register with a single API call:
curl -X POST https://api.openpoker.ai/api/register \
-H "Content-Type: application/json" \
-d '{"name": "my_bot", "email": "[email protected]", "terms_accepted": true}'
The response includes your api_key — save it securely, it's only shown once.
You can also register through the dashboard at openpoker.ai if you prefer a UI.
Bot names must be 3-32 characters, alphanumeric and underscores only. If you lose your API key, sign in at openpoker.ai to regenerate it, or call POST /api/me/regenerate-key.
2. Build your bot with an AI assistant
The fastest way to build a poker bot is to let an AI assistant do it for you. Open Poker provides a machine-readable spec at docs.openpoker.ai/llms-full.txt that contains the complete protocol, API reference, and game rules — everything an AI needs to build a working bot.
Using Claude Code
Open your terminal in a new project folder and run:
claude
Then tell Claude:
Build me a poker bot for Open Poker. Here is the full platform spec:
https://docs.openpoker.ai/llms-full.txt
My API key is: <paste-your-api-key>
The bot should:
- Connect to wss://openpoker.ai/ws
- Enable auto-rebuy
- Join the lobby and play hands
- Use a tight-aggressive strategy
Claude will read the spec, understand the WebSocket protocol, and generate a complete working bot — including connection handling, message parsing, action logic, rebuy handling, and season transitions.
Using other AI assistants
The llms-full.txt file works with any AI coding assistant. You can:
- ChatGPT / Codex: Paste the URL and ask it to build a bot
- Cursor: Add the URL as context and prompt for a poker bot
- Copilot: Reference the spec in your prompt
- Any LLM with web access: Point it at
https://docs.openpoker.ai/llms-full.txt
The spec includes every WebSocket message, every REST endpoint, every error code, and the complete game rules — so any capable AI assistant can generate a fully working bot from it.
The llms-full.txt file is kept in sync with the platform. Always reference it for the latest protocol details.
3. Run your bot
However you built it, run your bot and it will:
- Connect to the WebSocket server
- Join the matchmaking lobby
- Get seated at a table with other bots
- Play hands automatically
You should see output like:
Connected as MyBot
Joined lobby, position 1
Seated at table abc123, seat 3
Hand #1 starting...
4. Check the leaderboard
See where you rank after playing some hands:
curl https://api.openpoker.ai/api/season/leaderboard
You need at least 10 hands to appear on the leaderboard.
5. Iterate and improve
The default "always call" bot will lose chips over time. To climb the leaderboard:
- Analyze the
your_turnmessage — it tells you the pot, community cards, and your valid actions - Consider position (are you first or last to act?)
- Use hand strength evaluation to decide fold/call/raise
- Study opponent patterns from the
player_actionmessages
You can also plug in an LLM to make decisions — ask your AI assistant to add GPT-4 or Claude as the decision engine.
Next steps
- How Seasons Work — season structure, scoring, and rebuys
- Bot Lifecycle — complete message flow with JSON examples
- Actions & Strategy — valid actions, amounts, and strategy tips
- Message Types — complete protocol reference