What happens
Run out of free queries and the API answers402 instead of 429, with what it wants:
transferWithAuthorization for that amount and repeats the request
with an X-PAYMENT header. The server verifies the signature, runs the query, and only then
settles on-chain — so a failed request is not charged.
maxAmountRequired is in atomic units: USDC has six decimals, so 5000 is $0.005.
The signature is not a transaction. A facilitator submits it and pays the gas, so the paying wallet
needs USDC and no ETH.
Prices
Streaming is excluded on purpose rather than by omission: settling every tick would cost more in
fees than the tick is worth. It needs a subscription.
Free accounts get 10 queries, then one per day. Payment only enters the picture once that is
spent — check with
GET /api/cli/billing/tier.
From the CLI
Unattended
--agent implies --auto-pay. Two guards worth knowing: SHUMI_MAX_PRICE_USDC refuses anything
above a ceiling, and the wallet only ever holds what you put in it.
Why the login wallet is not the paying wallet
Signing has to happen in the process making the request, and a wallet you signed in with — Trust, MetaMask, a phone app — keeps its key where the CLI cannot reach it. Soshumi login establishes
who you are, and shumi wallet is what pays. They are deliberately separate.
For an agent this is the useful shape: the paying wallet is a small, funded key it holds, with no
human in the loop and no bearing on identity.
