{"name":"Preima API","version":"0.1.0","about":"Chain data for Robinhood Chain, paid per call with the preima-tab scheme of x402. No account and no API key: a call carries a hash-chain ticket from a tab the caller opened.","scheme":"preima-tab","chainId":4663,"network":"eip155:4663","asset":{"symbol":"USDG","address":"0x5fc5360D0400a0Fd4f2af552ADD042D716F1d168","decimals":6},"unit":"0.001","tabs":"0xda5c1c78c34a26ee5f2a0ce683fc0f41f41aa5df","payTo":"0x8df185F5880853887A87948091aB0bdB47BB0a1b","docs":"https://preima.xyz/docs","openapi":"/openapi.json","endpoints":[{"method":"GET","path":"/v1/ping","price":"0.001","currency":"USDG","description":"Server time, a block number read at most 10 seconds ago and where this ticket left your tab."},{"method":"GET","path":"/v1/gas","price":"0.001","currency":"USDG","description":"Gas price, base fee and block read at most 10 seconds ago, and the execution gas cost in ETH of a transfer, a tab open and a 1,000 payment claim."},{"method":"GET","path":"/v1/exposure/{address}","price":"0.002","currency":"USDG","description":"Key exposure report for an account: transaction count, code size, EIP-7702 delegation, ETH and USDG balance, and a plain verdict."},{"method":"GET","path":"/v1/token/{address}","price":"0.002","currency":"USDG","description":"ERC-20 facts in one read: name, symbol, decimals, total supply, code size and owner, each null if the token does not answer."},{"method":"GET","path":"/v1/balances/{address}?tokens=a,b,c","price":"0.002","currency":"USDG","description":"ETH balance plus up to 20 token balances with decimals and symbol, in one read (USDG if no tokens are named)."},{"method":"POST","path":"/v1/simulate","price":"0.005","currency":"USDG","description":"Runs a call at the latest block without sending it: return data or revert data with the decoded reason, and a gas estimate."}],"free":[{"method":"GET","path":"/","description":"This catalogue."},{"method":"GET","path":"/health","description":"Version, build, the public addresses in use and whether the service can settle."},{"method":"GET","path":"/openapi.json","description":"The OpenAPI description of every route."}],"payment":{"how":"Call a paid route with no payment to get a 402 with the terms in the PAYMENT-REQUIRED header. Pay with the agent in the Preima SDK, which opens a tab and sends one ticket per call.","badInput":"Inputs are checked before any payment is looked at. A bad input returns 400 and costs nothing.","retry":"Only the last ticket taken on a tab can be sent again: to the same method and URL it returns the stored reply, whatever that was (a stored 502 stays a 502), and is not charged twice. An earlier ticket, or the same ticket on another URL, is refused as a replay.","window":"No ticket is taken in the last six hours before a tab can be refunded (tab-expiring). Open the next tab before then; the SDK agent does.","limits":"Payments on tabs not seen before are limited per client address and in total (429, nothing taken). If the seller cannot settle, paid calls answer 503 and take nothing.","upstreamFailure":"A ticket is taken before the chain is read. If the chain read then fails, after one retry where the request budget allows, the reply is 502 with paid true and the payment is not returned. Block and gas data up to 60 seconds old is served in that case, marked stale.","settlement":"Payments are settled on chain in batches by one claim per tab. Nothing is sent on chain per call."}}