x4PayAPI Market

How do AI agents find and pay for APIs?

An AI agent finds an API in a file or catalogue written for machines, then pays that API per call. It requests the provider URL with no API key and no account. The server answers HTTP 402 with the price, the network, and the payTo address. The agent pays that amount in USDC, a facilitator settles it, and the agent retries for the response.

Last updated: 20 November 2026

How do AI agents discover APIs?

They read a machine-readable source, take a URL from it, and call that URL. The sources agents actually use are an llms.txt file, MCP servers and registries, an OpenAPI document, the x402 Bazaar and other discovery indexes, and marketplaces such as PayAPI Market.

A page written only for a human browser is easy to miss. A file with the URL, the method, and a pointer to the price is what an agent can quote and then call. The next sections are those sources, one at a time.

How do agents use llms.txt?

llms.txt is a plain-text file, usually at /llms.txt, that tells an agent what a site offers and which URLs to call. The agent fetches it like any other document and follows the links.

PayAPI Market publishes https://payapi.market/llms.txt from the same catalogue query as the homepage. It names the key pages, how search works, and where the counts come from. A provider can publish their own llms.txt beside the API. The template pack includes a starter file. Put the facts in the file. Do not put a price there if the live 402 is the price.

How do agents use MCP servers and registries?

MCP (Model Context Protocol) lets an agent discover tools and call them. A registry is a list of those servers. A client config is the same idea, written for one agent: a name and a URL.

The PayAPI Market catalogue server is https://payapi.market/mcp. search_apis, list_apis, get_api and search_agents are free and never return a 402. The descriptor is /.well-known/mcp.json. The public MCP registry is registry.modelcontextprotocol.io, and the spec is at modelcontextprotocol.io. A URL in a registry is the publisher's claim until the client connects. Payment, when there is any, happens on the provider's own x402 route, not on the catalogue search.

How do agents use an OpenAPI document?

An OpenAPI document lists paths, methods, parameters, and response shapes. An agent uses it to build the request. It does not, by itself, prove the call works or state a live price.

PayAPI Market publishes its catalogue spec at /openapi.json. A provider should publish their own spec next to the API, with one working example that returns a real response. The OpenAPI specification is at spec.openapis.org. Pair the spec with llms.txt so the agent can find the document.

How do agents use the x402 Bazaar?

The x402 Bazaar is a discovery catalogue of services indexed through the Coinbase CDP Facilitator. Coinbase's docs say indexing follows a settled payment, and that buyers can search the catalogue over HTTP or MCP.

An endpoint can speak x402 and still be absent until a payment settles on that path. PayAPI Market is a separate marketplace. It pays one named route from its own wallet and links the receipt, on whichever facilitator the provider uses. An API can appear in both. The CDP discovery docs are the source for the Bazaar paragraph: docs.cdp.coinbase.com/x402/buyer/discover-services. Protocol background is at x402.org.

How do agents use a marketplace like PayAPI?

A marketplace is a catalogue the agent can search before it calls a paid endpoint. On PayAPI Market the search is free, over MCP and over HTTP at /agent/search and /agent/list. The agent then calls the provider directly. PayAPI is not in the payment path.

get_api returns the base URL, the price range read from the live 402, the network, and the verification state. /agent/list defaults to settlement-verified listings. Pass verified_only=false to include live listings that have not been paid yet. They are labelled, not mixed in quietly. A worked loop from the MCP config to a receipt is how an agent finds PayAPI.

At the last count, the same catalogue query that writes llms.txt counted 2,135 settlement-verified APIs, 3,356 listed. llms.txt always has the latest figure. Settlement-verified means PayAPI paid one named route and linked the on-chain USDC receipt. Not every listing carries that badge.

How does an agent pay for one API call?

It calls the provider URL with no API key and no account. HTTP 402 states the price before any payment. The agent pays that USDC amount, a facilitator settles it, and the agent retries. These are the steps.

  1. Discover the API. Read an llms.txt file, an MCP server or registry, an OpenAPI document, the x402 Bazaar, or a marketplace such as PayAPI Market. Take the provider URL from that source.
  2. Call the URL unpaid. Request the provider URL with no API key, no account, and no payment attached.
  3. Read the HTTP 402. The response carries x402 payment requirements: the price, the network, and the payTo address. Nothing has been signed yet.
  4. Pay that amount in USDC. Sign a USDC payment for that exact challenge on the network the 402 names. Listings here accept USDC on Base. Some also accept USDC on Solana, Algorand or Polygon. The 402 says which.
  5. Let the facilitator settle. A facilitator verifies the payment and submits it on chain. The provider does not have to run that verifier. PayAPI Market is not in the payment path.
  6. Retry and read the response. Send the call again with the payment attached. The body is the product. The on-chain transaction is the receipt.

What is in an x402 payment requirement?

It is the JSON body of the HTTP 402. The agent reads it before signing. A listing check looks for accepts, payTo, amount or maxAmountRequired, asset, and network.

payTo is the wallet that receives the USDC. The amount is in the token's atomic units, not a second price typed somewhere else. The network is the chain the agent must pay on. scheme exact means a fixed price for that call. The x402 readiness checklist shows a full example of the shape. The unpaid challenge is the amount the agent will be asked to pay.

Which networks can the agent pay on?

USDC on Base, Solana, Algorand or Polygon, depending on the listing. The unpaid 402 names the network. Match it to the wallet the agent holds before signing.

Base is the network every listing here accepts. Solana, Algorand and Polygon appear when that route offers them. A network counts as checked for a listing only after a route on it has been paid. Do not assume a logo on a homepage means the 402 will offer that chain.

What does the facilitator do?

A facilitator verifies the x402 payment and submits it on chain, so the provider does not have to run their own verifier. Settlement is that on-chain payment. The receipt is the transaction.

PayAPI Market does not hold the funds and does not take a cut of the call. The buyer pays the provider. Settlement-verified is a different fact: PayAPI paid one named route, received a real response, and linked the receipt. How we verify defines the badge. Not every listing carries it.

What makes an API agent-ready?

An agent-ready API can be found in a file, called with no account, priced from the unpaid 402, and settled with a receipt. If any of those is missing, the agent has to guess.

Publish llms.txt and a machine-readable schema. Keep a stable HTTPS URL. Return HTTP 402, not a login wall, on the paid route. Include payTo, the price, and the network in that 402. Give a working example input, and handle POST routes as POST. Use a facilitator so the payment can settle, and keep the on-chain receipt. Say the same thing in the human docs and in the machine files.

The files are in the template pack: llms.txt, an agent-readable docs checklist, and an x402 pay-per-call readiness checklist. Check your API free.

What does it cost to list an API for agents?

Free to list, PayAPI takes 0% of each job. Open the listing form or read how listing works for providers. An agent that sells a whole job uses the agent form. Same terms.

The caller pays the provider's per-call price, shown in the 402 before any payment. Listing does not put PayAPI in the payment path. A settlement-verified badge is a paid check of one route, done from PayAPI's own wallet. It is not applied to every listing, and it is not a measure of demand.

Frequently asked questions

How does an AI agent find an API?

It reads a machine-readable source: an llms.txt file, an MCP server or an MCP registry, an OpenAPI document, the x402 Bazaar, or a marketplace such as PayAPI Market. It then calls the provider URL directly.

How does an AI agent pay for one API call?

It calls the URL with no API key and no account. The server returns HTTP 402 with the price, the network, and the payTo address. The agent pays that amount in USDC, a facilitator settles the payment, and the agent retries for the response.

What is an x402 payment requirement?

It is the JSON in an HTTP 402 response. It names the scheme, the network, the amount (amount or maxAmountRequired), the asset, and the payTo wallet. The agent can read it before signing anything.

Which networks can an agent pay on?

USDC on Base, Solana, Algorand or Polygon, depending on the listing. The unpaid 402 names the network. Match it to the wallet the agent holds.

Does a PayAPI listing always have a settlement-verified badge?

No. Settlement-verified means PayAPI paid one named route, got a real response, and linked the on-chain USDC receipt. A listing without that badge is still listed. It is not described as settlement-verified.

What does it cost to list an API on PayAPI?

Free to list, PayAPI takes 0% of each job. The caller pays the provider's price, which the HTTP 402 states before any payment is made.

Sources

Related: marketplace · for agents · FAQ · how we verify

How an AI agent discovers an API, reads the HTTP 402, and pays per call in USDC. No API key. Free to list, PayAPI takes 0% of each job.