An agent can earn USDC on the open internet without a bank account. Paying its own network fees is still the part that needs a human.
The gap nobody budgets for
An agent that sells a service and gets paid in USDC on Base is a nice story until it has to do something on-chain. Network fees are priced in something else — SOL on Solana, ETH on Ethereum — so the operator keeps a separate reserve topped up by hand. It is a monthly chore, right up until the month it is forgotten. Then the agent sits there with a full balance of the money it was supposed to be spending and stops working.
That is not a smart-contract bug. The agent has revenue and no mechanical way to turn a few cents of it into the exact fee token it needs, at the moment it needs it.
Pay per request, not per month
x402 is a small protocol built on the old HTTP 402 status code. An unpaid request comes back as a 402 with a machine-readable price: network, asset, amount, and where to send it. The client signs a payment for exactly that amount, retries the same request with the signed payment attached, and gets the result. Settlement happens on-chain, so every call leaves a receipt.
What matters for an autonomous agent is what is not in that loop: no API key to provision, no account to create, no dashboard, no monthly minimum, and no human approving anything.
Where swap.io fits
swap.io runs a Hermes Agent API at hermes.swap.io that quotes swap routes and returns the best one it can find. GET /v1/info is free. The swap endpoints — quote, build transaction, submit, status — sit behind x402, so each call is priced and paid on its own.
That is the missing piece in the story above. The agent does not need a subscription to convert USDC into the fee token. It needs to make one priced request, pay a fraction of a cent for it, and use the answer.
A concrete scenario: Tollbooth
The scenario in the video is a small API I called Tollbooth. It validates invoice data for one cent per call and is paid in USDC. It holds a little USDC and almost no SOL, because there is no reason for it to sit on a volatile fee balance it might never spend.
When its SOL reserve drops below roughly one day of fees, it calls the swap endpoint, gets an exact price, pays it, and receives routes it can use to buy exactly the shortfall — not a bundle, not a prepaid plan, not a top-up somebody scheduled in advance.
That part is a design sketch, not a shipped product, and the video says so. What is real is the call underneath it.
The real paid call
I made one paid request from a Base wallet I control:
$ POST https://hermes.swap.io/v1/swap/quote
<- 402 Payment Required
price 3007 USDC (atomic) · network base
$ sign EIP-3009 · transferWithAuthorization
-> 200 OK success:true 5 routes
best route: okx-dex
tx 0xd86084e4…3907d block 56,001,637
That is $0.003007. The payment is an EIP-3009 transferWithAuthorization: the wallet signs an authorization and a facilitator submits it. I never broadcast a transaction myself and never held ETH for gas — the wallet paid USDC and nothing else. Five routes came back in under a second.
The settlement is public: 0xd86084e41c5ef7932213f5f41701427611f5cef358bc6167c9bf3b1e6a63907d.
Two honest notes. First, I paid for the quote, not for the swap itself; building and submitting a transaction are separate paid calls that I did not make in this run. Second, I settled on Base because that is where the wallet I control holds USDC. The bounty I made this for asks for a Solana settlement link; the 402 handshake is the same, but I am not going to pretend a Base transfer is a Solscan one.
Why this beats keys and plans
An API key is a secret you provision, rotate, scope, and hope never leaks into a log. A subscription bills a full month for a week of light use, and it fails closed the moment a card expires — which, for an agent, means failing at 3 a.m. with no human in the loop.
Per-request payment inverts all of that. Cost scales with what the agent actually does. There is no long-lived credential to steal. The receipt is on-chain and auditable. And the decision to spend is made by the same code that decides to make the call.
What is still missing
Two things I would want before trusting this in production.
The first is a spending policy that lives outside the agent: a hard cap per hour, per endpoint, and a circuit breaker, so a looping agent cannot drain a wallet faster than a human can notice. My test run had a hard cap of $0.10 written into the client, and I would not ship without it.
The second is bookkeeping. An on-chain receipt per call is excellent evidence, but it is not an invoice, and an agent that pays for hundreds of calls a day still needs those payments rolled up into something a human can reconcile.
Neither is a problem with x402 or with swap.io. Both are the next layer up, and both are buildable.
Watch it
The 110-second pitch is on X: An API that pays its own gas, tagging @swapdotio and @Superteam.
If you are building agents that hold their own money, the interesting question is not whether they can pay. It is whether they can decide how much to pay, and prove it afterwards. x402 plus a routing API is the first version of that loop I have seen work end to end.
This post is my entry to swap.io's x402 video bounty on Superteam Earn. I paid for the API call with my own funds, and I have no other relationship with swap.io.
Top comments (0)