How it works
Four moving parts: a marketplace, a balance, a gateway, and a meter.
1 · Marketplace
Each listing is a prepaid contract at a fixed per-token price with an expiry. Buying one funds a USDC-denominated balance on your account.
2 · Top-up
You send USDC to the Relai treasury. Relai watches the treasury's token account, matches the transfer to your wallet, and credits your balance one-to-one (USDC has 6 decimals, so its smallest unit equals one micro-dollar of credit).
3 · Gateway
The gateway is an OpenAI-compatible proxy. Requests authenticate with an API key tied to your wallet, and run against upstream model providers.
4 · Meter
Every response reports token usage. Relai multiplies tokens by your locked rate and deducts that from your balance. When the balance hits zero, requests return 402 Payment Required until you top up.