# AttestPage quickstart: from discovery to your first paid call

Last updated: 2026-10-17

This takes about a minute. Every route is a plain HTTPS `POST` with JSON. You pay per call in USDC over x402 v2, so there is no account and no API key.

## 1. Discover

Read the catalogue, then pick a route:

```sh
curl -s https://vehcdj664efetfrsolne5umanq.srv.us/llms.txt
curl -s https://vehcdj664efetfrsolne5umanq.srv.us/.well-known/ai-catalog.json
curl -s https://vehcdj664efetfrsolne5umanq.srv.us/openapi.json
curl -s https://vehcdj664efetfrsolne5umanq.srv.us/.well-known/x402
```

- `/llms.txt`: every route, its price and when to use it.
- `/.well-known/ai-catalog.json`: the AI catalogue.
- `/openapi.json`: request and response schemas for every route.
- `/.well-known/x402`: the x402 discovery list, with the price and network of each route.

Prices per call in US$:

| Route | Price | Use it when |
|---|---|---|
| `POST /v1/verify/quote` | US$0.01 | you are about to quote a web page as the source of a claim |
| `POST /v1/verify/quotes` | US$0.02 | you hold several quotes from one page |
| `POST /v1/verify/citations` | US$0.10 | you are about to answer with up to 10 cited pages |
| `POST /v1/verify/text-quote` | US$0.005 | you already hold the text and need it matched |
| `POST /v1/verify/document` | US$0.10 | you need a document checked against its source |
| `POST /v1/fetch` | US$0.002 per URL | you need a web page as clean text |
| `POST /v1/recheck` | US$0.003 | you need to know if a page you read earlier has changed |
| `POST /v1/check/links` | US$0.005 | you are about to give a user links |
| `POST /v1/check/packages` | US$0.005 | you are about to recommend or install a package |
| `POST /v1/attest` | US$0.002 | you need a signed, timestamped receipt that a file or answer existed unchanged |

Source: [pricing.json](/pricing.json). The route prices in this table are the same as the 402 offer.

## 2. Try it free (optional)

Send the header `Quoteproof-Trial: 1` with no payment. Each IP gets 10 trial calls a day, and a trial call takes batches of up to 5 items. Callers that reach the service through the srv.us address without a payer id (no payment header) each get 10 trial calls a day, told apart by their user-agent; a call with none of those headers shares one pool of 10 trial calls a day instead.

```sh
curl -s -X POST https://vehcdj664efetfrsolne5umanq.srv.us/v1/verify/quote \
  -H 'content-type: application/json' \
  -H 'Quoteproof-Trial: 1' \
  -d '{"url":"https://www.iana.org/help/example-domains","quote":"These domains may be used as illustrative examples in documents","match":"fuzzy"}'
```

A batch larger than the trial limit gets the normal 402 offer, as in step 3.

## 3. Receive the 402

Send the same request with no trial header and no payment:

```sh
curl -i -X POST https://vehcdj664efetfrsolne5umanq.srv.us/v1/verify/quote \
  -H 'content-type: application/json' \
  -d '{"url":"https://www.iana.org/help/example-domains","quote":"These domains may be used as illustrative examples in documents","match":"fuzzy"}'
```

The answer is `402 Payment Required`, with error code `payment_required`, and the offer in the `PAYMENT-REQUIRED` header. Decode it to read the `accepts` entry. For `verify/quote` it lists `amount` `10000`, which is US$0.01 (USDC has 6 decimals). A request with an empty body gets the same 402, so you can read a price before you have real input.

A request that fails validation gets `400` before any payment is asked for, and it is never charged.

## 4. Pay

Use an x402 v2 client. The plain-`fetch` script in [the plain-fetch example](/docs/examples/fetch-x402) does the offer check, the signature and the retry in one script. Install its packages first, then run it against the service:

```sh
ATTESTPAGE_URL=https://vehcdj664efetfrsolne5umanq.srv.us \
ATTESTPAGE_X402_KEY=0x... \
node fetch-x402.mjs https://www.iana.org/help/example-domains "These domains may be used as illustrative examples in documents"
```

- `ATTESTPAGE_X402_KEY` is the private key of the wallet that pays, and it stays in your process.
- Leave `ATTESTPAGE_NETWORK` unset and the script pays on Base mainnet, in real USDC. Check the amount before you run it.

Raw steps, if you are not using the script:

1. Check that the offer's `network` is `eip155:8453` and that `amount` is what you expect.
2. Sign the offer with your wallet.
3. Send the same request again with the signed payment in the `PAYMENT-SIGNATURE` header.


**Test first:** the same API runs on Base Sepolia at https://s2h6qt73jtzlgbgnnfacln2poq.srv.us, and payments there use free test USDC from a faucet. Set `ATTESTPAGE_NETWORK=eip155:84532` in the scripts in [examples](/docs/examples) to pay there.

## 5. Retry and read the result

The paid retry returns `200`. The `PAYMENT-RESPONSE` header carries the transaction, the payer and the network. The body carries the result and a signed receipt, shortened here:

```json
{
  "result": { "match": "exact", "score": 1, "start": 171, "end": 234, "occurrences": 1 },
  "page": { "http_status": 200, "content_kind": "real", "title": "Example Domains" },
  "advice": "The page loaded and looks like real content.",
  "receipt": "<signed receipt>", "receipt_id": "9fcda5ac…", "tier": "paid", "rail": "x402", "network": "eip155:8453"
}
```

Check the receipt again at no charge:

```sh
curl -s -X POST https://vehcdj664efetfrsolne5umanq.srv.us/v1/receipt/verify \
  -H 'content-type: application/json' \
  -d '{"receipt":"<signed receipt>"}'
```

## Next steps

- Worked examples for every route, with request, 402 and result: [Worked examples](/docs/worked-examples).
- Error codes: the `error.code` in each response.
- Limits per route: [Limits](/docs/limits).
- Terms: [Terms](/terms.md).
