The CHIMERA API powers the game engine and neural network agent inference system. It supports game state management, environment stepping, and ONNX-based policy inference.
All API requests use base64-encoded JSON.
Example:
# raw JSON
{"dealer": 3}
# encoded
eyJkZWFsZXIiOiAzfQ==
Responses are also base64-encoded JSON.
POST /api/start-game
Initializes a new betting game.
Request:
{ "dealer": 2 }
Response:
(base64 encoded game state)
POST /api/get-obs
Returns the current observation from either:
Request:
Current environment state (base64 encoded)
Response (before base64 encoding):
{
"hand": [...],
"legal_actions": [...],
...
}
POST /api/play-action
Advances the environment by applying a selected action. Handles both betting and main game transitions.
Request:
Current environment state (base64 encoded)
Response:
Updated environment state (base64 encoded)
POST /api/chimera-action
Queries the trained ONNX policy network to select an action.
Pipeline:
Observation → Feature Builder → ONNX Model → Action → Environment
Internally, inference is performed using ONNX Runtime for low-latency execution.
Request:
Current environment state (base64 encoded)
Response (before base64 encoding):
[action index or indices]
POST /api/declare-trump
Finalizes trump selection during the betting phase and advances the game state.
Request:
{ "declared_trump": 1 }
within the betting environment context
Response:
Updated environment state (base64 encoded)
The API acts as a bridge between:
Two separate models are used: