{"openapi":"3.1.0","info":{"title":"csno","description":"A provably-fair pay-per-play arcade for AI agents, settled over x402. Buy chips once with USDC, then play coinflip, dice and European roulette for free at machine speed, verify every outcome yourself with commit-reveal, and cash out on-chain. No accounts, and the player never pays gas. USDC on Base. Full instructions: https://csno.cc/skill.md","version":"1.0.0","contact":{"url":"https://csno.cc/agents"},"x-guidance":"Buy chips once over x402, then play as many rounds as you like for free. Every round needs a commitment from POST /api/csno/commit and a signature proving you control the address. Verify each outcome against the commitment before trusting it."},"servers":[{"url":"https://csno.cc"}],"paths":{"/api/csno/chips":{"get":{"summary":"Buy chips (x402 payment required)","description":"Buy chips at the default tier.\n\nGET is accepted as well as POST on purpose: directory probers and much\nbuyer tooling reach for GET first, and a POST-only paywall answers them\nwith the site's catch-all instead of a 402 — so the endpoint reads as\nfree and can never be paid-verified.","operationId":"buy_chips_api_csno_chips_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"402":{"description":"Payment required. The x402 challenge is in the base64 `payment-required` header (x402 v2); sign an ERC-3009 authorization for the amount and retry with an `X-PAYMENT` header.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.10"},"protocols":[{"x402":{}}]},"parameters":[{"name":"X-PAYMENT","in":"header","required":false,"description":"Base64 x402 payment payload: an ERC-3009 authorization signed for the amount in the 402 challenge. Omit it on the first call — that is how you receive the challenge.","schema":{"type":"string"}}]},"post":{"summary":"Buy chips (x402 payment required)","description":"Buy chips at the default tier.\n\nGET is accepted as well as POST on purpose: directory probers and much\nbuyer tooling reach for GET first, and a POST-only paywall answers them\nwith the site's catch-all instead of a 402 — so the endpoint reads as\nfree and can never be paid-verified.","operationId":"buy_chips_api_csno_chips_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"402":{"description":"Payment required. The x402 challenge is in the base64 `payment-required` header (x402 v2); sign an ERC-3009 authorization for the amount and retry with an `X-PAYMENT` header.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[],"x-payment-info":{"price":{"mode":"fixed","currency":"USD","amount":"0.10"},"protocols":[{"x402":{}}]},"parameters":[{"name":"X-PAYMENT","in":"header","required":false,"description":"Base64 x402 payment payload: an ERC-3009 authorization signed for the amount in the 402 challenge. Omit it on the first call — that is how you receive the challenge.","schema":{"type":"string"}}],"requestBody":{"required":false,"description":"No fields. Chips are credited to the payment's signer.","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/csno/chips/{tier}":{"get":{"summary":"Buy chips at a named tier (x402 payment required)","description":"Buy chips at a named tier — see /games for the list.","operationId":"buy_chips_tier_api_csno_chips__tier__get","parameters":[{"name":"tier","in":"path","required":true,"schema":{"type":"string","title":"Tier"}},{"name":"X-PAYMENT","in":"header","required":false,"description":"Base64 x402 payment payload: an ERC-3009 authorization signed for the amount in the 402 challenge. Omit it on the first call — that is how you receive the challenge.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment required. The x402 challenge is in the base64 `payment-required` header (x402 v2); sign an ERC-3009 authorization for the amount and retry with an `X-PAYMENT` header.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.10","max":"1.00"},"protocols":[{"x402":{}}]}},"post":{"summary":"Buy chips at a named tier (x402 payment required)","description":"Buy chips at a named tier — see /games for the list.","operationId":"buy_chips_tier_api_csno_chips__tier__post","parameters":[{"name":"tier","in":"path","required":true,"schema":{"type":"string","title":"Tier"}},{"name":"X-PAYMENT","in":"header","required":false,"description":"Base64 x402 payment payload: an ERC-3009 authorization signed for the amount in the 402 challenge. Omit it on the first call — that is how you receive the challenge.","schema":{"type":"string"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}},"402":{"description":"Payment required. The x402 challenge is in the base64 `payment-required` header (x402 v2); sign an ERC-3009 authorization for the amount and retry with an `X-PAYMENT` header.","content":{"application/json":{"schema":{"type":"object"}}}}},"security":[],"x-payment-info":{"price":{"mode":"dynamic","currency":"USD","min":"0.10","max":"1.00"},"protocols":[{"x402":{}}]},"requestBody":{"required":false,"description":"No fields. Chips are credited to the payment's signer.","content":{"application/json":{"schema":{"type":"object","properties":{},"additionalProperties":false}}}}}},"/api/csno/balance/{address}":{"get":{"summary":"Chip balance for a wallet address","operationId":"balance_api_csno_balance__address__get","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/csno/auth-statement/{address}":{"get":{"summary":"The exact string to sign to prove address control","operationId":"auth_statement_api_csno_auth_statement__address__get","parameters":[{"name":"address","in":"path","required":true,"schema":{"type":"string","title":"Address"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/csno/commit":{"post":{"summary":"Open a round and receive the commitment","description":"Step 1: the house commits to a secret seed BEFORE seeing your seed.\n\nRequires a signature proving you control the address — otherwise a\nstranger could open rounds against your balance and gamble it away.","operationId":"commit_api_csno_commit_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CommitBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/csno/flip":{"post":{"summary":"Coinflip: call heads or tails","description":"Coinflip: call heads or tails.","operationId":"flip_api_csno_flip_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/FlipBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/csno/dice":{"post":{"summary":"Dice: call under or over a target","description":"Roll 0–100 and call whether it lands under or over your target.\n\nPayouts scale with the risk taken. The exact schedule is not published —\nit is derived from the probability of the call and returned with the\nresult, so a player learns it by playing.","operationId":"dice_api_csno_dice_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DiceBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/csno/roulette":{"post":{"summary":"Roulette: call a single spin of a European wheel","description":"Spin a European wheel: 37 pockets, 0–36.\n\n`bet` is the call you are making: straight, red, black, odd, even, low,\nhigh, dozen1–3, column1–3. A straight call also needs `number` (0–36).","operationId":"roulette_api_csno_roulette_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RouletteBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/csno/manifest":{"get":{"summary":"Live x402 manifest: paid resources, network and payTo","description":"Machine-readable description of csno's paid resources.\n\nThis is the source of truth for the static /.well-known/x402 file, which\nscripts/gen_manifest.py regenerates from here — so the published manifest\ncan never drift from the address the house is actually paid at.","operationId":"manifest_api_csno_manifest_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/api/csno/games":{"get":{"summary":"List the games and the current limits","description":"What's on the floor, and the exact odds of each.","operationId":"games_api_csno_games_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/api/csno/verify/{bet_id}":{"get":{"summary":"Re-derive a past round from its revealed seed","description":"Independently re-derive a past round from its revealed seed.","operationId":"verify_api_csno_verify__bet_id__get","parameters":[{"name":"bet_id","in":"path","required":true,"schema":{"type":"integer","title":"Bet Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/csno/cashout":{"post":{"summary":"Redeem chips for USDC, sent on-chain","description":"Convert chips back to real USDC.\n\nThis is the one place the house spends its own money, so it is the one\nplace that must not be sloppy:\n\n- chips are debited BEFORE the transfer and refunded if it fails, so a\n  crash mid-send can't mint free chips;\n- the row is written as 'pending' first, so a payout is never silently\n  lost if the process dies between send and confirm;\n- x402 can't help here — it only flows client→server — so the house signs\n  an ordinary ERC-20 transfer and pays the gas itself.","operationId":"cashout_api_csno_cashout_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CashoutBody"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/csno/recent":{"get":{"summary":"The last few settled rounds","description":"The last few settled rounds, for the live floor on the site.\n\nSafe to publish: these are all spent rounds, so their seeds are already\nrevealed to the player anyway. Addresses are truncated — they're public\non-chain, but there's no reason to make a leaderboard of them here.","operationId":"recent_api_csno_recent_get","parameters":[{"name":"limit","in":"query","required":false,"schema":{"type":"integer","default":8,"title":"Limit"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"security":[]}},"/api/csno/house":{"get":{"summary":"Floor statistics","description":"Floor statistics, split by who was playing.\n\nThe split is the honest part. csno's own wallets play continuously so the\nfloor is never empty, and lumping that in with real customers would make\nthe headline number a lie — an easy, popular lie: every competitor we have\nmeasured reports transaction counts that are mostly their own traffic.\nPublish both and the number that matters survives an audit.","operationId":"house_stats_api_csno_house_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/api/housebot/status":{"get":{"summary":"What csno's own house agent has been doing","description":"What csno's own agents are doing. Public on purpose.","operationId":"status_api_housebot_status_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}},"/api/mcp":{"get":{"summary":"Mcp Get","description":"Server→client SSE stream for an established session.","operationId":"mcp_get_api_mcp_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]},"post":{"summary":"Mcp Post","description":"JSON-RPC in, JSON or an SSE stream back.","operationId":"mcp_post_api_mcp_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]},"delete":{"summary":"Mcp Delete","description":"Session teardown.","operationId":"mcp_delete_api_mcp_delete","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}}},"security":[]}}},"components":{"schemas":{"AgentMessage":{"properties":{"from_id":{"type":"string","title":"From Id"},"from_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"From Name"},"message":{"type":"string","title":"Message"},"context":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context"},"use_tools":{"type":"boolean","title":"Use Tools","default":false}},"type":"object","required":["from_id","message"],"title":"AgentMessage","description":"Inbound trigger for THIS incubator's agent (proxied to the app)."},"CashoutBody":{"properties":{"address":{"type":"string","title":"Address"},"chips":{"type":"integer","title":"Chips"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"}},"type":"object","required":["address","chips"],"title":"CashoutBody"},"CommitBody":{"properties":{"address":{"type":"string","title":"Address"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"}},"type":"object","required":["address"],"title":"CommitBody"},"DiceBody":{"properties":{"round_id":{"type":"string","title":"Round Id"},"client_seed":{"type":"string","title":"Client Seed"},"wager":{"type":"integer","title":"Wager"},"target":{"type":"integer","title":"Target"},"direction":{"type":"string","title":"Direction","default":"under"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"}},"type":"object","required":["round_id","client_seed","wager","target"],"title":"DiceBody"},"FlipBody":{"properties":{"round_id":{"type":"string","title":"Round Id"},"client_seed":{"type":"string","title":"Client Seed"},"wager":{"type":"integer","title":"Wager"},"call":{"type":"string","title":"Call"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"}},"type":"object","required":["round_id","client_seed","wager","call"],"title":"FlipBody"},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"RouletteBody":{"properties":{"round_id":{"type":"string","title":"Round Id"},"client_seed":{"type":"string","title":"Client Seed"},"wager":{"type":"integer","title":"Wager"},"bet":{"type":"string","title":"Bet"},"number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Number"},"signature":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature"}},"type":"object","required":["round_id","client_seed","wager","bet"],"title":"RouletteBody"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"}}},"x-agentcash-provenance":{"ownershipProofs":["https://csno.cc/.well-known/x402-ownership.json"]},"x-discovery":{"ownershipProofs":["https://csno.cc/.well-known/x402-ownership.json"]},"x-agentcash-guidance":{"llmsTxtUrl":"https://csno.cc/llms.txt"}}