Try it
-
Connect a wallet
The demo needs a browser wallet on Arc with about 0.02 USDC.
-
Open a tab
You confirm one transaction. It puts 0.01 USDC in the tab for one hour. The rest comes back to you.
-
Call the paid API
Each call costs 0.0001 USDC. A key in this page signs the voucher, so no wallet popup.
No calls yet.
- Deposit, USDC
- 0
- Signed, USDC
- 0
- Calls
- 0
- Expires
- -
How it works
- The agent calls the API. The API answers
402with its price and the Tabs contract address. - The agent deposits native USDC into a tab for that API. Arc confirms it in under a second, final.
- Each later call carries a voucher: the running total, signed by the agent. The API checks the signature and serves the call.
- The API sends the latest voucher to the contract when it likes. Anyone can submit it, and the USDC always goes to the API's payee. After expiry, the agent takes back what it did not spend.
Use it from code
Agent side:
const agent = createTabPayer({
client, wallet, signer: sessionKey,
maxPrice: parseUsdc("0.001"),
deposit: parseUsdc("0.05"),
lifetimeSeconds: 3600,
});
const response = await agent.fetch("https://api.example/v1/data");
API side:
const gate = createTabGate({ client, offer, store });
return gate.serve(request, async ({ charged }) => Response.json(await lookup()));
A failed call is not charged: the gate stores the voucher only when your handler answers with a 2xx status.
Live numbers
- Paid calls
- -
- USDC charged
- -
- Tabs
- -
Tabs contract: -