Docs topic · PokerKit card input

How do I validate and normalize poker card strings with Pokerai API?

Send one compact card string to the public PokerKit normalization endpoint before using it in a card-aware workflow.

Updated Maintained by Pokerai API

Direct answer: call POST /v1/pokerkit/cards/normalize with the required cards string. The public CardsRequest example is AsKsQs; use the current Reference before depending on any response field.

Quick facts

FactPublic contract
OperationPOST /v1/pokerkit/cards/normalize
Required bodycards, a string.
Public exampleAsKsQs.
Card notationEach card is two characters: rank AKQJT98765432 followed by suit c, d, h, or s; concatenate cards without separators.
Success shapeHTTP 200 is documented, but its public OpenAPI schema is open. Treat returned JSON fields as response data to inspect, not a fixed field-level contract.

Minimal OpenAPI-backed request

curl -s https://pokerai.bet/v1/pokerkit/cards/normalize \
  -H "Authorization: Bearer $POKERAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"cards":"AsKsQs"}'

This request uses the public CardsRequest example. A real successful call returns JSON with HTTP 200; because the current public snapshot deliberately leaves that response schema open, inspect the actual returned JSON and do not hard-code undocumented field names.

Accepted input and normalization boundary

Use compact two-character cards such as As, Kd, and Th, concatenated as one string such as AsKsQs. This endpoint validates and normalizes card input; it does not calculate equity, evaluate a hand, recommend an action, or infer a strategy.

Common errors and privacy

SignalPublic contractWhat to do
HTTP 422HTTPValidationErrorCheck that cards is present and is a JSON string, then compare the submitted notation with the current Reference.
AuthenticationThe operation lists Authorization and X-API-Key request headers.Send one supported API-key header; see Authentication.
PrivacyCards can be sensitive game or user data.Send only what is needed, keep API keys out of request bodies and logs, and redact card strings from support material when they could identify a player or hand history.

Use normalization in training, coaching, hand review, study, and research workflows. It is not real-money real-time assistance (RTA), does not provide strategy, and must not be used to guide live-table action.

Related documentation

Real-time assistance at real-money tables is prohibited.