Agent decisions
Send a table snapshot and get our poker agent's next action, or grade an action against it.
These endpoints run the same agent our bots play with. Both need a Studio token; requests without one are rejected.
/api/play/decideSend a table snapshot, get the agent's next action. The agent uses preflop solver ranges, isolation versus limps, Monte Carlo equity, then a made-hand heuristic. source on the response says which layer fired.
Response: { "action": "raise", "amount": 60, "source": "ranges" }. amount is set only on a raise.
curl https://www.pokerstudy.ai/api/play/decide \
-H "Authorization: Bearer psk_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"hole":["Ah","Ad"],"board":[],"pot":30,"big_blind":20,"my_seat":4,"dealer_seat":1,"seats":[1,2,3,4,5,6],"valid_actions":[{"action":"fold"},{"action":"call","amount":20},{"action":"raise","min":40,"max":2000}]}'
Snapshot fields
| Field | Required | Meaning |
|---|---|---|
hole | yes | Your cards, like ["Ah","Kd"]. |
my_seat, dealer_seat | yes | Seat numbers. |
seats | yes | Every occupied seat. |
valid_actions | yes | fold, check, call with amount, raise with min and max. |
board, pot, big_blind, in_hand, players | no | Table state. |
preflop_actions, postflop_actions | no | The line so far. Include preflop_actions so the range walk can see it. |
/api/play/evaluateThe same snapshot plus selected, the action you want graded: { "action": "call" } or { "action": "raise", "amount": 60 }. The agent samples opponent hands, deals the rest of the board and plays every remaining seat.
Response: equity, selected.ev, bot (action, amount, ev, source), ev_loss_bb and grade. EV is the hero's chip delta over those runouts; fold is 0. ev_loss_bb is the big blinds the action gives up versus the agent.
curl https://www.pokerstudy.ai/api/play/evaluate \
-H "Authorization: Bearer psk_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d '{"hole":["Ah","Ad"],"board":[],"pot":30,"big_blind":20,"my_seat":4,"dealer_seat":1,"seats":[1,2,3,4,5,6],"valid_actions":[{"action":"fold"},{"action":"call","amount":20},{"action":"raise","min":40,"max":2000}],"selected":{"action":"call"}}'
grade | ev_loss_bb |
|---|---|
perfect | 0 |
correct | under 0.05 |
inaccuracy | under 0.25 |
mistake | under 1 |
blunder | 1 or more |