x402 tools for AI agents, paid per call
x402 tools for AI agents, five of them, live on Base: an agent calls the endpoint, gets an HTTP 402 with the price, pays in USDC from its own wallet and gets the result. There is no account, no API key and no monthly plan. Prices start at $0.005 a call, and a call that fails is not charged.
| Tool | What it does | Price |
|---|---|---|
| fetch | Turns a URL, PDF, Word or Excel file into clean Markdown or JSON. Renders JavaScript pages when needed. | $0.005 |
| inbox | A public webhook URL that keeps the latest 1,000 requests (up to 256 KB each) for 7 days. Reading it is free. | $0.01 |
| memory | Key-value storage opened by a token, with no account. Reads, lists and deletes are free. | $0.005 a write |
| wake | POSTs a JSON body to a URL at a set time, 10 seconds to 30 days ahead, with retries. | $0.005 |
| attest | Signs a statement (Ed25519) that a SHA-256 hash existed at this moment. | $0.005 |
What one paid call looks like
An agent calls a tool the same way it calls any HTTP API. The first answer is 402 Payment Required, and its PAYMENT-REQUIRED header holds a base64-encoded JSON offer. This is the offer our fetch endpoint returned to an unpaid request on 3 December 2026, decoded and shortened:
{"x402Version": 2,
"error": "Payment required",
"resource": {"url": "https://agentic402.dev/v1/fetch",
"description": "Fetch a URL as clean Markdown or JSON. ..."},
"accepts": [{"scheme": "exact",
"network": "eip155:8453",
"amount": "5000",
"asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
"payTo": "0xAF3E683729c949538412e3C0709E952A24d1f2C9",
"maxTimeoutSeconds": 300,
"extra": {"name": "USD Coin", "version": "2"}}]}
Read it from the top. The protocol is x402 version 2. The agent may pay with the exact scheme on network eip155:8453, which is Base mainnet. The amount is in the token's smallest unit: USDC has 6 decimals, so 5000 means $0.005. The asset is the USDC contract on Base and payTo is the wallet that receives the money. Once the agent starts paying, it has up to 300 seconds to complete the payment.
The agent's x402 client signs a USDC transfer authorization for exactly that amount and sends the same request again with the signature in a PAYMENT-SIGNATURE header. We check the signature with a facilitator, run the tool, settle the payment and return the result with a PAYMENT-RESPONSE receipt. In code, that whole exchange is one wrapped fetch call; the x402 quickstart shows it end to end, and what x402 is and how the 402 handshake works explains each header.
You pay only when the call works
Payment is verified before a tool runs and settled after it succeeds. If the tool returns an error, the payment is never settled and no USDC moves. That covers a robots.txt refusal or a timeout in fetch, a full memory space, and any other response with a status of 400 or above. Bad input, such as a malformed URL or a hash of the wrong length, is rejected before the 402 is even sent.
Successful calls are final. There are no refunds, because there is nothing to dispute: you paid for a result and received it. How agentic402 verifies and settles payments goes through each step and the edge cases, such as what happens if settlement itself fails.
Some calls are free by design. Reading an inbox, reading and listing memory, checking or cancelling a wake job, and verifying an attest statement cost nothing. Only the step that creates something or does real work is paid. The price list has every endpoint, paid and free.
Five jobs an agent can't do well on its own
Each tool exists because agents hit the same walls. They are good at reasoning over text and calling APIs, and bad at anything that needs an address, a clock, a disk that outlives the run, or a reputation.
Reading the web cheaply. An agent that downloads a page gets raw HTML, most of which is scripts and markup it pays to read. On 12 real pages we measured, the median shrank by 96% once converted to Markdown, from about 141,000 estimated tokens to about 4,700. fetch does that conversion for $0.005. The HTML vs Markdown token study has the method and every number. Measurements like it go on the blog.
Receiving a callback. Payment providers, CI systems and slow APIs answer by webhook, and an agent has no public URL for them to call. An inbox gives it one for a week, and stores whatever arrives until the agent comes back.
Remembering between runs. Scratch files vanish with the container. memory keeps notes, progress and fetched pages under keys the agent chooses, for 30 days after the last write, with a token instead of an account.
Coming back later. Waiting costs a running agent money. wake lets it stop and be called at a set time, either at the endpoint that restarts it or as a note in its inbox.
Being believed. An agent can't vouch for its own timestamps. attest returns a signature from a third party that anyone can check offline, and only the hash leaves the agent.
The tools are built to chain
Each tool's output fits into the next one, so most real tasks use two or three. These are the chains we've written up, with every call and its cost:
- Wait for a webhook callback without staying awake: inbox, then wake, then a free read. From $0.015.
- Read a page once and keep it for later runs: fetch, then memory. $0.01 per page, and later reads are free.
- Prove what a web page said at a given time: fetch, attest, memory. $0.015 per page.
The tokens and IDs that one tool returns are plain strings, so an agent can store an inbox's read token in memory, schedule a wake job that delivers into that inbox, or stamp a fetched page and file the statement next to it. All recipes are collected on one page.
HTTP or MCP, same tools and prices
Every tool is an ordinary HTTP endpoint under https://agentic402.dev/v1/, described in our OpenAPI file. The same tools are also served over the Model Context Protocol at https://agentic402.dev/mcp, for agents that work through MCP clients such as Claude Code or Cursor. Paid MCP tools cost the same and are paid the same way, through an x402-aware MCP client; free tools stay free.
The MCP server is stateless, so there is no session to keep open: each tool call stands alone. Setting up the x402 MCP server covers the client side, including how payment prompts work, and the rest of the docs cover errors, limits and payments for every tool.
Three agents, start to finish
A research agent comparing six pricing pages. It calls fetch six times with format: "json", checks each page's word_count, and reads the Markdown. Six calls cost $0.03. In our measurements those six pages, Stripe, Vercel, GitHub, Notion, Slack and Linear, came to about 1.27 million estimated tokens as raw HTML and about 40,000 as Markdown. It stores each page in memory under a hashed key, $0.005 per page, so a follow-up question next week doesn't fetch anything again.
A release agent waiting on CI. It creates an inbox ($0.01) and registers the inbox_url as the CI system's webhook. It books a wake job ($0.005) for 20 minutes later, pointed at the endpoint that starts it, and exits. When it's woken it reads the inbox for free. If the build result is there, it carries on; if not, it books another wake for ten minutes and stops again. The agent runs for a few seconds at each check instead of twenty minutes straight.
A procurement agent collecting supplier quotes. Each quote page is fetched, its Markdown hashed and the hash stamped with attest, then the text and the signed statement go into memory under quotes/. When someone asks later what a supplier's page said on the day the order was placed, the agent can hand over the text, the statement and our public key, and the answer checks out without anyone trusting the agent.
None of the three needed a signup, a key or a human with a credit card. Each one paid only for the calls that worked.
Where x402 comes from
x402 is an open payment protocol built on HTTP's long-unused 402 Payment Required status code. Ledger's explainer describes it as "an open payment standard developed by Coinbase and launched in May 2025." Version 2 renamed the headers to PAYMENT-REQUIRED, PAYMENT-SIGNATURE and PAYMENT-RESPONSE, which are the ones agentic402 uses. Any x402 client can pay any x402 server; nothing about agentic402 is specific to one client library.
What an agent needs before the first call
Two things. A wallet on Base holding some USDC, and an x402 client that can sign payments with it. For a JavaScript agent the client is the @x402/fetch package, which wraps the standard fetch function; other languages have their own x402 libraries. A few dollars of USDC covers hundreds of calls.
Give the agent a wallet of its own with a small balance, not a wallet you use for anything else. The balance is then a hard ceiling on what it can spend, which is simpler than any per-key quota. How AI agents pay for APIs compares this with API keys, prepaid credits and capped tokens, and API keys vs x402 goes through what each model risks if a credential leaks.
How agents find these tools
An agent that lands on agentic402.dev can learn everything it needs without reading this page. /llms.txt lists every tool, price and limit in plain text, and every page has a Markdown copy at the page's address with index.md added. /openapi.json describes each endpoint with its price in an x-payment-info field, and /.well-known/x402 lists the paid resources.
The 402 responses themselves carry discovery metadata (a service name, tags, an input schema and an example output) that x402 catalogs read when a payment passes through. An unpaid request with an empty body always gets the 402, so a catalog can read the price list without paying. Our guide to llms.txt explains which of these files AI tools actually use and which are bets. It's one of several guides to building and paying for agents.
What agentic402 doesn't do
Payments are USDC on Base only. There is no card payment, no invoice and no dashboard. The wallet's transaction history is the statement. Nothing is held on account either: there is no balance to top up and no credit to expire, because each payment moves from the agent's wallet to ours at the moment a call succeeds. fetch reads one URL per call and doesn't crawl sites, search the web or log in, so if your agent needs those, a crawling service fits better, and our comparisons with Firecrawl and Jina Reader say where each one wins. All our comparisons are dated and quote their sources.
The service makes no uptime promises. It runs on Cloudflare Workers, and the limits that keep it fair are published: 60 API requests a minute per IP address, 30 uncached fetches a minute per destination site, and per-tool caps on sizes and retention, all on the limits page. About agentic402 covers how the service is run, how payments are received, and how site owners can have cached pages removed.
Questions about x402 tools
- Do I need an account or API key to use these tools?
- No. Payment authorizes each call. The agent's wallet address is its only identity, and tools that need ongoing access, such as an inbox or a memory space, return a random token when they are created.
- Which networks and currencies are accepted?
- USDC on Base mainnet (eip155:8453), with the x402
exactscheme. Other chains and tokens are not accepted. - What happens if a tool fails after I pay?
- The payment is not settled, so nothing is taken from the wallet. Any response with a status of 400 or above leaves the payment unsettled.
- Can a person use the tools, or only an agent?
- Anyone with an x402 client can call them: a script, a backend service or a developer testing from a terminal. "Agent" here just means software that pays from its own wallet without a human approving each call.
- Is fetched content safe to give to a model?
- Treat it as untrusted. Web pages and webhook bodies are written by strangers and can contain prompt injection. Responses are marked with
X-Content-Untrusted: trueso your agent can keep that text out of its instructions.