Menu

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.

POST/api/play/decide

Send 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

FieldRequiredMeaning
holeyesYour cards, like ["Ah","Kd"].
my_seat, dealer_seatyesSeat numbers.
seatsyesEvery occupied seat.
valid_actionsyesfold, check, call with amount, raise with min and max.
board, pot, big_blind, in_hand, playersnoTable state.
preflop_actions, postflop_actionsnoThe line so far. Include preflop_actions so the range walk can see it.
POST/api/play/evaluate

The 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"}}'
gradeev_loss_bb
perfect0
correctunder 0.05
inaccuracyunder 0.25
mistakeunder 1
blunder1 or more