Try it
-
Get demo dollars
dUSD is a test token that works like Circle USDC: 6 decimals and signed transfers (EIP-3009).
-
Open a tab
You sign a transfer of 0.05 dUSD into a tab for one hour. The API sends it on-chain and pays the gas.
-
Call the paid API
Each call costs 0.001 dUSD. Your wallet signs a voucher for the new total, off-chain.
No calls yet.
- Deposit, dUSD
- 0
- Signed, dUSD
- 0
- Calls
- 0
- Expires
- -
How it works
- The agent calls the API. The API answers
402with its price, token and Tabs contract. - The agent signs a USDC transfer authorization (EIP-3009) to the Tabs contract. The signed nonce fixes the payee, the voucher key and the expiry, so the API can open only that exact tab.
- The API submits it with
openWithAuthorizationand pays the gas. The agent needs no AVAX. - Each call carries a voucher: the running total, signed by the agent. The API checks it and serves the call. A failed call is not charged.
-
The API settles the latest voucher with one
chargetransaction for any number of calls. After expiry, anyone can send the rest back to the agent.
Use it from code
Agent side:
const agent = createTabPayer({
client, wallet, signer: sessionKey,
fundWith: "authorization",
maxPrice: parseUsdc("0.01"),
deposit: parseUsdc("0.05"),
lifetimeSeconds: 3600,
});
const response = await agent.fetch("https://api.example/v1/data");
API side:
const gate = createTabGate({ client, offer, store });
const sponsor = createTabSponsor({ client, wallet, offer, minDeposit });
if (url.pathname === "/v1/tabs") return sponsor.serve(request);
return gate.serve(request, async () => Response.json(await lookup()));
Live numbers
- Paid calls
- -
- dUSD charged
- -
- Tabs
- -
Tabs contract: -
dUSD token: -