Aggregator
API Reference
OpenAPI 3.1 specification. 14 endpoints, 30 schemas, two wallet modes. Everything you need to integrate 180+ games.
Integrate in Minutes
$ lmgame-api --quickstart
Authenticate
Send your API key in the x-api-key header. All endpoints require tenant authentication.
x-api-key: "sk_live_..."Launch Session
POST /launch with playerId, gameCode, and currency. Get back a game URL.
POST /api/v1/aggregator/launchProcess Bets
Use /play for instant games or /bet + /win for granular wallet control.
POST /api/v1/aggregator/playTwo Wallet Modes
Internal wallet (we manage balances) or Seamless wallet (we callback to your endpoints).
Idempotent
All transactional endpoints are idempotent on transactionId. Safe to retry.
Instant + Session
Single-call /play for instant games. Multi-step /session-game/* for blackjack, mines, etc.
API Key Auth
Simple x-api-key header authentication. One key per tenant, rotatable from admin.
14 API Endpoints
$ lmgame-api --list-routes
/api/v1/aggregator/gamesList available games
/api/v1/agent/gamesSmart game discovery
/api/v1/agent/playPlay instant game
/api/v1/agent/batchBatch play with strategy
/api/v1/agent/session/startStart session game
/api/v1/agent/session/actionSession action
/api/v1/agent/balanceCheck balance
/api/v1/agent/historyBet history + analytics
/api/v1/agent/strategy/setSave strategy
/mcp/manifestMCP manifest
/mcp/tools/listList MCP tools
/mcp/tools/callExecute MCP tool
/api/v1/aggregator/launchCreate a game session
/api/v1/aggregator/sessionsList active sessions
/api/v1/aggregator/session/closeClose a session
/api/v1/aggregator/balanceGet player balance
/api/v1/aggregator/betPlace a bet (debit)
/api/v1/aggregator/winRecord a win (credit)
/api/v1/aggregator/rollbackRollback a bet
/api/v1/aggregator/playPlay instant game
/api/v1/aggregator/session-game/startStart session game
/api/v1/aggregator/session-game/actionSession game action
/api/v1/aggregator/session-game/cashoutCashout session game
/api/v1/aggregator/session-game/stateGet session game state
/api/v1/aggregator/rounds/{roundId}Get round details
Code Samples
$ curl --help lmgame
curl -X POST https://play.lmgamelabs.com/api/v1/aggregator/launch \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "playerId": "player_abc123", "gameCode": "dice", "currency": "USD", "language": "en", "mode": "real", "returnUrl": "https://your-site.com/lobby" }'
curl -X POST https://play.lmgamelabs.com/api/v1/aggregator/play \ -H "x-api-key: YOUR_API_KEY" \ -H "Content-Type: application/json" \ -d '{ "sessionToken": "your_session_token", "gameCode": "dice", "stake": 10.00, "options": { "target": 50, "direction": "over" } }'
{
"status": "ok",
"roundId": "r_abc123",
"result": {
"outcome": 67.23,
"target": 50,
"direction": "over",
"win": true,
"multiplier": 2.02,
"payout": 20.20
},
"balance": 1510.20,
"transactionId": "tx_play_001"
}Type Definitions
$ lmgame-api --describe-schemas
Two Wallet Modes
$ lmgame-api --wallet-modes
Internal Wallet
Zero IntegrationWe manage player balances via an internal ledger. Players are auto-created on first game launch. Zero wallet integration required.
Seamless Wallet
Full ControlWe call back to your webhook endpoints for every balance check, debit, credit, and rollback. Full control over player funds.
API Key Security
$ lmgame-api --auth-info
Security Best Practices
Keep keys server-side only
Never expose API keys in client-side code or mobile apps.
Rotate keys periodically
Generate new keys from the admin panel. Old keys are revoked instantly.
Use IP allowlisting
Restrict API access to your server IPs for production environments.
Monitor usage
Track API calls in the admin dashboard. Anomalies trigger alerts.
Ready to Integrate?
Get your API key and start integrating 180+ provably fair games today.
$ Full OpenAPI 3.1 spec available on request