Protocol
Top-ups
Fund your balance with USDC, settled on Solana.
The flow
- You create an order — model and token amount. Relai computes the USDC owed (
tokens × locked rate) and returns the treasury address and a Solana Pay link. - You send USDC from your connected wallet to the treasury.
- Relai scans the treasury's USDC account, matches the transfer to your wallet, validates the amount, and credits your balance. Each transaction credits exactly once.
# 1. create an order POST /api/v1/topup/intent { "model_id": "deepseek/deepseek-chat", "tokens_m": 5 } # → { intent_id, treasury, usdc_amount, solana_pay_url } # 2. after paying, confirm POST /api/v1/topup/verify { "intent_id": "..." } # → { status: "paid", credited_micros, balance_micros }
One-to-one: USDC has 6 decimals, so 1 USDC base unit = 1 micro-dollar of credit. Send $0.70, get $0.70 of balance.