Forge simulation API - POST a board state, get the played-out game as JSON GET /health liveness probe GET /openapi.json this API as an OpenAPI 3.0 document GET /docs interactive Swagger UI over that document POST /simulate body = board state as JSON (see /openapi.json for the schema) or the raw 'state' mode file format ?turns=N stop after N turns counted from the state's turn ?timeout=S wall-clock cap in seconds (bounded by the server) ?passive=1 passive AI: only the scripted actions fire ?finalState=1 include the end position as a re-runnable state file ?gameLog=1 include the engine's full game log ?applyOnly=1 don't play; report the position as applied ?stopAtPhase=MAIN2 end the game when that phase of the starting turn ends (a JSON body may carry any of these run controls itself; the body wins) POST /report same request, but the response is the scene-by-scene walkthrough as HTML (card images load from Scryfall) Scripted actions, per player: "play" casts spells from hand and "activate" activates abilities, both as part of the game with real costs paid; "cast" (top-level) instead opens the game with spells already on the stack, costs presumed paid in the authored state. Card ids are optional in JSON: name your target and the server numbers it. Response fields: result, winner, turnLimitReached, turns, players (with manaPool), actions, scenes (feed to boardstate-cli/visualize.py), and - only when requested - finalState (fork it into any other mode) and gameLog. Simulations run one at a time; concurrent requests queue. Example: curl -s -H 'Content-Type: application/json' localhost:8724/simulate -d '{ "turn": 3, "activePlayer": 0, "activePhase": "MAIN2", "turns": 1, "players": [{"battlefield": ["Mountain"], "hand": ["Lightning Bolt"], "play": "Lightning Bolt->Grizzly Bears"}, {"battlefield": ["Grizzly Bears"]}]}'