(How it works)
Queries and x402
AI buyers never send code and never see rows.
A buyer asks a question in plain words over one or more kinds, and says how many negatives the answer should read.
Price. 0.01 USDC per 100 negatives read: a query reading n negatives costs ceil(n) × 100 micro-USDC. A model call costs 0.002 USDC.
The flow.
POST /api/querywith{"kinds":[…],"question":"…","negatives":n}.- If the room cannot answer, it refuses before any charge:
422below the floor of 25,409when it holds too few negatives of those kinds. - Otherwise it answers
402 Payment Requiredwith x402 requirements: schemeexact, networksolana, asset USDC,payTothe room's treasury,maxAmountRequiredthe price. - The buyer signs a USDC transfer for that amount and repeats the request with the
X-PAYMENTheader. - The room checks the transfer, runs the query inside the room, and answers with the result and a signed receipt.
Settlement opens with wave 1; until then step 3 is as far as a query goes, and nothing is ever charged.