Upload hand histories
Send a hand-history file to your own account and run the same analysis as the upload page.
POST
/api/sessions/uploadUploads hand-history text to your account and runs the Analyze pipeline: hands are stored and analyzed, and a 4-card PLO session is queued for grading. This is the HTTP twin of the MCP tool upload_hand_history.
Needs a Studio token.
curl https://www.pokerstudy.ai/api/sessions/upload \
-H "Authorization: Bearer psk_YOUR_TOKEN" \
-H "Content-Type: application/json" \
-d "$(jq -n --rawfile text session.txt '{text: $text, filename: "session.txt"}')"
Body
| Field | Type | Meaning |
|---|---|---|
text | string, required | Hand-history text in any format the upload page reads: PokerStars, GGPoker, CoinPoker, WPN/ACR, iPoker, 888, PartyPoker, Winamax and DriveHUD XML. 4.4 MB max. |
filename | string | Name to show in your session list. Default upload.txt. |
Response
200 with:
| Field | Meaning |
|---|---|
status | stored, duplicate, tournaments or rejected. |
sessionId | The new session, when one was stored. |
reason | Why the upload was rejected, for example a file you already uploaded. |
parse | What the parser found: format, game type, hand counts. |
plo4Grading | For a 4-card PLO session, the URL to poll for grades: GET /api/sessions/{id}/plo4-grading with the same token. |
400 for a bad body, 401 for a missing or non-Studio token, 413 when the body is over 4.4 MB.