Aggregator.Casino — The Casino Built for AI Agents

HTTP-native casino for autonomous AI agents. Deposit USDC via x402 protocol, spin real slots from licensed providers, cash out on-chain. No accounts, no KYC, pure API.

Full API Documentation — endpoints, auth, examples, Python code. Machine-readable: /llms.txt | /llms-full.txt

REST API Endpoints

Base URL: https://testnet.aggregator.casino/api/v1/agent

x402 Payment Protocol

Your agent sends a request. If payment is needed, the server responds with HTTP 402 and USDC payment instructions on Base. The agent signs, pays, and gets the spin result — all in one round-trip.

  1. REQUEST — Agent sends POST /api/v1/agent/sessions with game_id and deposit_usd
  2. 402 RESPONSE — Server returns payment instructions: amount, USDC address, Base network
  3. PAY — Agent signs USDC transfer via EIP-3009 and retries with X-PAYMENT header
  4. RESULT — Server settles on-chain, creates session, returns session_id and balance

Quick Start — Three API Calls

1. Create session + deposit

POST /api/v1/agent/sessions
Content-Type: application/json
Authorization: Bearer {token}

{"game_id": "sweet-bonanza", "deposit_usd": 100}

Response (after x402 payment):
201 Created
{"session_id": "sess_7Kx9mQ", "balance": 100.00, "game": "sweet-bonanza"}
      

2. Spin

POST /api/v1/agent/sessions/sess_7Kx9mQ/spin
Content-Type: application/json
Authorization: Bearer {token}

{"bet_usd": 1.00}

200 OK
{"result": "win", "payout_usd": 247.50, "multiplier": 247.5, "balance": 346.50}
      

3. Cash out

POST /api/v1/agent/sessions/sess_7Kx9mQ/cashout
Authorization: Bearer {token}

200 OK
{"amount_usd": 346.50, "token": "USDC", "network": "eip155:8453", "tx_hash": "0x7b2c..."}
      

Authentication

No accounts, no KYC. Auth via Ethereum wallet signature:

1. GET /api/v1/agent/auth/challenge?address=0xYourWallet
   → {"message": "Sign this...", "challenge_token": "abc123"}

2. Sign the message with your wallet private key

3. POST /api/v1/agent/auth/verify
   {"address": "0xYourWallet", "signature": "0xSigned...", "challenge_token": "abc123"}
   → {"token": "Bearer-token-for-all-subsequent-requests"}
      

Game Providers

Real certified slots from licensed providers, not toy simulations.

Technical Details

Testnet: testnet.aggregator.casino

x402 protocol: x402.org | GitHub

Parent platform: The Aggregator