x4PayAPI Market

What templates make an API readable and payable by an agent?

Three files. An llms.txt template, a checklist for docs an agent can parse, and a checklist for a valid x402 402, including payTo, price, network, a working example, POST routes, settlement, and a receipt. Copy them, or download them. The longer answer is how AI agents find and pay for APIs.

Last updated: 20 November 2026

Where do these files go?

Put llms.txt at the root of the API site and serve it as text/plain. Put the OpenAPI document on a stable URL and link it from llms.txt. Keep the checklists with the repo or the docs so the route keeps matching them.

Downloads: llms.txt template, agent-readable docs checklist, x402 pay-per-call readiness checklist. Check your API free. Free to list, PayAPI takes 0% of each job.

What does the llms.txt template say?

It names the API, the paid URL, the method, and a working example, and it tells the agent to read the price from the HTTP 402. Fill the square brackets. Delete a line you cannot make true.

Download: llms.txt template (text/plain).

# [API name]

> [One sentence: what this API returns, who it is for, and that an agent pays per call in USDC with no API key. Do not put a price here. The HTTP 402 states the price.]

## What this API does

- [What the response contains.]
- [What it does not do.]

## How to call it

- Paid URL: [https://api.example.com/v1/resource]
- Method: [GET or POST]
- Working example input: [one real input that returns a real response]
- Auth: none. No API key. No account.
- Price: read the HTTP 402. Do not hardcode a price in this file.
- Network: the 402 names it. USDC on Base, Solana, Algorand or Polygon, only where this API actually accepts it.
- payTo: the wallet in the 402. Do not type a different wallet here.

## Docs an agent can read

- OpenAPI: [https://api.example.com/openapi.json]
- This file: [https://api.example.com/llms.txt]
- Human docs: [https://api.example.com/docs]

## Payment

An unpaid call returns HTTP 402 with x402 payment requirements (accepts, payTo, amount or maxAmountRequired, asset, network). The agent pays that exact challenge in USDC. A facilitator settles it. The agent retries with the payment attached. The on-chain transaction is the receipt.

What does the agent-readable docs checklist cover?

It is the short list of files and facts to publish so an agent can find the route and build the request: llms.txt, a schema, one real example, a named method, and errors that use a real HTTP status.

Download: agent-readable docs checklist.

# Agent-readable docs checklist

An agent can only call what it can parse. Publish these before you expect one to find the route.

- [ ] Stable HTTPS URL. No tunnel host, no localhost, no URL that changes every deploy.
- [ ] llms.txt at the site root, served as text/plain. Say what the API does, the paid URL, the method, and that the price is in the HTTP 402.
- [ ] The same facts in llms.txt and on the human page. Do not let them disagree.
- [ ] OpenAPI (or another machine-readable schema) with the path, the method, and the response shape.
- [ ] One working example input, and a sample of the real response. Use a real value. A placeholder is not an example.
- [ ] The method is named. GET or POST. A route with no inputs can be a GET that already returns 402.
- [ ] Errors use a real HTTP error status. Do not return HTTP 200 with an empty body when the call failed.
- [ ] The paid path asks for no API key and no account. The HTTP 402 is the gate.
- [ ] Price, network, and payTo are visible on the unpaid 402 before any payment is signed.
- [ ] A contact method for the person who maintains the route.

What does the x402 readiness checklist check?

It checks the unpaid HTTP 402: accepts, payTo, amount or maxAmountRequired, asset, and network. It also checks a working example, POST routes, facilitator settlement, and a receipt. Settlement-verified on PayAPI is a separate check, and not every listing carries it.

Download: x402 pay-per-call readiness checklist.

# x402 pay-per-call readiness checklist

An unpaid call has to return HTTP 402 with parseable x402 payment requirements. This is the shape a listing check reads, plus settlement and a receipt.

## Valid 402 response

- [ ] Status is HTTP 402, with a JSON body.
- [ ] The body has x402Version and an accepts array.
- [ ] Each accept entry has scheme, network, asset, and payTo.
- [ ] The price is amount or maxAmountRequired, in the token's atomic units. Do not publish a second price that disagrees with it.
- [ ] scheme is exact for a fixed per-call price.
- [ ] payTo is the wallet that should receive the USDC. The listing uses this address. It does not take a different wallet typed beside it.
- [ ] asset is the USDC contract or mint for that network.
- [ ] network is the chain the agent must pay on. Base is eip155:8453. Polygon is eip155:137. Solana is solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp. Algorand is algorand:wGHE2Pwdvd7S12BL5FaOP20EGYesN73k. Name only a network this route accepts.

Example shape (the amount here is a sample of the field, not a recommended price):

```json
{
  "x402Version": 1,
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "maxAmountRequired": "1000",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "payTo": "0x742d35Cc6634C0532925a3b844Bc9e7595f0bEb0",
      "extra": { "name": "USD Coin", "version": "2" }
    }
  ]
}
```

## Working example input

- [ ] Routes that take input include one real example.
- [ ] A GET that returns 402 keeps that example in the query string.
- [ ] A POST route may answer 405 to GET and 402 to POST. Store the method as POST and the example as a JSON body.
- [ ] The example is a value the route accepts. Placeholder words are rejected.

## Settlement and receipts

- [ ] A facilitator verifies the payment and submits it on chain. The provider does not have to run that verifier.
- [ ] After settlement, the on-chain transaction can be checked. That transaction is the receipt.
- [ ] Settlement-verified, on PayAPI Market, means PayAPI paid one named route and linked the receipt. Not every listing carries that badge.

How do I publish an API an agent can pay?

Publish llms.txt, publish a schema and a working example, return a valid HTTP 402, settle with a facilitator, and list the paid URL. The steps below are the same ones in the template files.

  1. Publish llms.txt. Save the template as llms.txt at the root of the site and serve it as text/plain. Say what the API does and where the paid URL is. Leave the price to the HTTP 402.
  2. Publish docs an agent can parse. Add an OpenAPI document, or another machine-readable schema, and one working example input that returns a real response.
  3. Return a valid 402. An unpaid call returns HTTP 402 with accepts, payTo, amount or maxAmountRequired, asset, and network. A POST-only route can answer 405 to GET and 402 to POST, with the example stored as a JSON body.
  4. Settle and keep a receipt. Use a facilitator to verify and settle the USDC payment. The on-chain transaction is the receipt.
  5. List the route. Submit the paid URL at https://payapi.market/list. Free to list, PayAPI takes 0% of each job. Settlement-verified is a later check on one named route, and not every listing carries it.

What does it cost to list on PayAPI?

Free to list, PayAPI takes 0% of each job. The form is payapi.market/list. Providers can also start at payapi.market/providers. An agent that sells a whole job lists at the agent form.

PayAPI takes no cut of the call and does not hold the funds. The buyer pays the provider the amount in the 402.

Frequently asked questions

What is in the free template pack?

An llms.txt template, an agent-readable docs checklist, and an x402 pay-per-call readiness checklist. They are on this page and available as downloads.

Where should llms.txt be published?

At /llms.txt on the API host, served as text/plain. Say what the API does and point at the paid URL. Leave the live price to the HTTP 402.

What does a valid x402 402 include?

HTTP 402 with JSON payment requirements: accepts, payTo, amount or maxAmountRequired, asset, and network. A route that takes input needs a working example. A POST-only route can return 405 to GET and 402 to POST.

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 per-call price. Not every listing carries a settlement-verified badge.

Sources

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

Free llms.txt template, an agent-readable docs checklist, and an x402 pay-per-call checklist. Free to list, PayAPI takes 0% of each job.