# Worked examples for every paid route

Last updated: 2026-10-17

AttestPage charges per call, in USDC on Base (`eip155:8453`), over x402 v2. Each section below shows one paid call from start to finish: the request, the `402` offer, the paid retry and a shortened result.

Every route takes the same payment steps:

1. Send the request with no payment. A valid request gets `402 Payment Required`, with the offer in the `PAYMENT-REQUIRED` header. Bad requests are refused with 400 before any payment, and are never charged.
2. Check the offer: the network is `eip155:8453`, and `amount` is in USDC base units (6 decimals: the offer for [verify/quote](#post-v1verifyquote) is `10000`, which is US$0.01).
3. Sign the offer and send the same request again with the `PAYMENT-SIGNATURE` header.
4. The `200` answer carries a `PAYMENT-RESPONSE` header with the transaction, the payer and the network.

A client library does steps 2 to 4 for you. The full plain-`fetch` version is in [the plain-fetch example](/docs/examples/fetch-x402).

Shown below: the `402` body, abbreviated. The offer's `accepts` entry for every route has the same shape:

```json
{ "scheme": "exact", "network": "eip155:8453", "amount": "10000", "asset": "USDC contract on Base", "payTo": "the service address in the offer", "maxTimeoutSeconds": 120 }
```

Contact and terms: see [terms](/terms.md). Prices are listed in [pricing.json](/pricing.json).

---

## POST /v1/verify/quote

Price: US$0.01 per call. Checks that a quote appears word for word on a web page, before an agent cites it.

Request:

```sh
curl -X POST https://<service>/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"
}'
```

402 response: status `402`, error code `payment_required`, message "This route costs US$0.01 via x402". The offer in `PAYMENT-REQUIRED` lists `amount` `10000`.

Paid retry: the same body with `PAYMENT-SIGNATURE`. Status `200`, `PAYMENT-RESPONSE` gives the transaction.

Paid-run example (shortened):

```json
{
  "result": { "match": "exact", "score": 1, "start": 171, "end": 234, "context": "...These domains may be used as illustrative examples in documents without prior coordination with us...", "occurrences": 1 },
  "page": { "http_status": 200, "content_kind": "real", "title": "Example Domains" },
  "advice": "The page loaded and looks like real content.",
  "receipt": "<signed receipt>", "tier": "paid", "rail": "x402", "network": "eip155:8453"
}
```

Use it before citing a page, so a misquote is caught before a user sees it. Check the `receipt` again for free with `POST /v1/receipt/verify`.

---

## POST /v1/verify/citations

Price: US$0.10 per call, up to 10 quote and URL pairs. Checks every citation in an answer in one call.

Request:

```sh
curl -X POST https://<service>/v1/verify/citations -H 'content-type: application/json' -d '{
  "citations": [
    { "url": "https://www.iana.org/help/example-domains", "quote": "These domains may be used as illustrative examples in documents" },
    { "url": "https://www.iana.org/domains/reserved", "quote": "IANA-managed Reserved Domains" }
  ],
  "match": "fuzzy"
}'
```

402 response: status `402`, `payment_required`, `amount` `100000` (US$0.10).

Paid retry: same body with `PAYMENT-SIGNATURE`. Status `200`.

Paid-run example (shortened):

```json
{
  "results": [
    { "url": "https://www.iana.org/help/example-domains", "page": 0, "http_status": 200, "content_kind": "real", "match": "exact", "score": 1, "start": 171, "end": 234 },
    { "url": "https://www.iana.org/domains/reserved", "page": 1, "http_status": 200, "content_kind": "real", "match": "exact", "score": 1 }
  ],
  "summary": { "exact": 2, "fuzzy": 0, "none": 0, "failed": 0 },
  "receipt": "<signed receipt>", "tier": "paid", "rail": "x402", "network": "eip155:8453"
}
```

Use it before giving an answer that cites web pages. Each `none` tells you which quote to fix.

---

## POST /v1/verify/quotes

Price: US$0.02 per call, one page and up to 20 quotes. Cheaper than [verify/quote](#post-v1verifyquote) for three or more quotes from the same page.

Request:

```sh
curl -X POST https://<service>/v1/verify/quotes -H 'content-type: application/json' -d '{
  "url": "https://www.iana.org/help/example-domains",
  "quotes": [
    "These domains may be used as illustrative examples in documents",
    "without prior coordination with us"
  ],
  "match": "fuzzy"
}'
```

402 response: status `402`, `payment_required`, `amount` `20000` (US$0.02).

Paid retry: same body with `PAYMENT-SIGNATURE`. Status `200`.

Paid-run example (shortened):

```json
{
  "results": [
    { "match": "exact", "score": 1, "start": 171, "end": 234, "occurrences": 1 },
    { "match": "exact", "score": 1 }
  ],
  "page": { "http_status": 200, "content_kind": "real", "title": "Example Domains" },
  "summary": { "exact": 2, "fuzzy": 0, "none": 0, "failed": 0 },
  "receipt": "<signed receipt>", "tier": "paid", "rail": "x402", "network": "eip155:8453"
}
```

Use it when one page is quoted several times in an answer.

---

## POST /v1/verify/document

Price: US$0.10 per call. Checks every quote in a finished document, with its link, against the live page.

Request:

```sh
curl -X POST https://<service>/v1/verify/document -H 'content-type: application/json' -d '{
  "document": "The IANA page says \"These domains may be used as illustrative examples in documents\" ([IANA](https://www.iana.org/help/example-domains)).",
  "format": "markdown",
  "match": "fuzzy",
  "part": 0
}'
```

402 response: status `402`, `payment_required`, `amount` `100000` (US$0.10).

Paid retry: same body with `PAYMENT-SIGNATURE`. Status `200`.

Paid-run example (shortened):

```json
{
  "document_sha256": "…",
  "extractor": "doc-v1",
  "part": 0, "parts": 1, "pairs_total": 1,
  "results": [
    { "pair": 0, "quote": "These domains may be used as illustrative examples in documents", "url": "https://www.iana.org/help/example-domains", "doc_start": 20, "doc_end": 83, "http_status": 200, "content_kind": "real", "match": "exact", "score": 1 }
  ],
  "summary": { "exact": 1, "fuzzy": 0, "none": 0, "failed": 0 },
  "receipt": "<signed receipt>", "tier": "paid", "rail": "x402", "network": "eip155:8453"
}
```

Use it before sending a finished report that quotes web pages. Long documents come in parts, set with `part`.

---

## POST /v1/verify/text-quote

Price: US$0.005 per call. Checks a quote against text the agent already holds, with no page fetch.

Request:

```sh
curl -X POST https://<service>/v1/verify/text-quote -H 'content-type: application/json' -d '{
  "text": "Refunds are paid within 14 days of purchase, to the card that was used.",
  "quote": "refunds are paid within 14 days",
  "match": "fuzzy",
  "case_sensitive": false
}'
```

402 response: status `402`, `payment_required`, `amount` `5000` (US$0.005).

Paid retry: same body with `PAYMENT-SIGNATURE`. Status `200`.

Paid-run example (shortened):

```json
{
  "result": { "match": "exact", "score": 1, "start": 0, "end": 31, "context": "Refunds are paid within 14 days of purchase, to the card that was used.", "occurrences": 1, "normalised_sha256": "945b89fa…" },
  "injection_flags": [],
  "advice": "The supplied text contains this quote. This says nothing about where the text came from.",
  "receipt": "<signed receipt>", "tier": "paid", "rail": "x402", "network": "eip155:8453"
}
```

Use it for text a file, tool or document gave you, when you have no URL to check.

---

## POST /v1/fetch

Price: US$0.002 per URL. Returns a page as clean text, with a verdict on what came back.

Request:

```sh
curl -X POST https://<service>/v1/fetch -H 'content-type: application/json' -d '{
  "url": "https://www.iana.org/help/example-domains",
  "return_text": true
}'
```

402 response: status `402`, `payment_required`, `amount` `2000` (US$0.002). A `urls` batch of up to 10 is priced per URL.

Paid retry: same body with `PAYMENT-SIGNATURE`. Status `200`.

Paid-run example (shortened):

```json
{
  "page": { "requested_url": "https://www.iana.org/help/example-domains", "final_url": "https://www.iana.org/help/example-domains", "http_status": 200, "content_type": "text/html", "content_kind": "real", "title": "Example Domains", "content_sha256": "…", "raw_sha256": "…", "retrieved_at": "2026-10-17T09:31:09.693Z" },
  "text": "Domains\n\nProtocols\n\nNumbers\n\nAbout\n\nInstructions and Guides\n\nExample Domains\n\nA number of domains such as …",
  "text_chars": 1277, "text_truncated": false,
  "injection_flags": [],
  "advice": "The page loaded and looks like real content.",
  "receipt": "<signed receipt>", "tier": "paid", "rail": "x402", "network": "eip155:8453"
}
```

Use it to read a page the agent needs as text, or to keep a notarised copy of it with `content_sha256`. Check `content_kind` before you trust the text: a bot wall or JavaScript shell is not the page.

---

## POST /v1/recheck

Price: US$0.003 per call. Checks whether a page an agent read earlier has changed, from an earlier receipt.

Request (`receipt` is the one from an earlier `fetch` of the same page):

```sh
curl -X POST https://<service>/v1/recheck -H 'content-type: application/json' -d '{
  "receipt": "<receipt from an earlier fetch>",
  "return_text": false
}'
```

402 response: status `402`, `payment_required`, `amount` `3000` (US$0.003).

Paid retry: same body with `PAYMENT-SIGNATURE`. Status `200`.

Paid-run example (shortened):

```json
{
  "change": "unchanged",
  "changed": false,
  "differences": [],
  "baseline": { "source": "receipt", "kind": "fetch", "receipt_sha256": "e931f5b9…" },
  "page": { "http_status": 200, "content_kind": "real", "content_sha256": "…" },
  "advice": "The page's text is the same as in the baseline (byte for byte on the clean text). Markup or other bytes may still have moved; see differences.",
  "receipt": "<signed receipt>", "tier": "paid", "rail": "x402", "network": "eip155:8453"
}
```

Use it before relying on a page again, to show that it still says what it said.

---

## POST /v1/check/links

Price: US$0.005 per call, up to 10 URLs. Gives a verdict for each link before an agent gives it to a user.

Request:

```sh
curl -X POST https://<service>/v1/check/links -H 'content-type: application/json' -d '{
  "urls": ["https://www.iana.org/help/example-domains", "https://www.iana.org/domains/reserved"]
}'
```

402 response: status `402`, `payment_required`, `amount` `5000` (US$0.005).

Paid retry: same body with `PAYMENT-SIGNATURE`. Status `200`.

Paid-run example (shortened):

```json
{
  "results": [
    { "url": "https://www.iana.org/help/example-domains", "final_url": "https://www.iana.org/help/example-domains", "http_status": 200, "redirects": [], "content_kind": "real", "title": "Example Domains", "verdict": "ok" },
    { "url": "https://www.iana.org/domains/reserved", "final_url": "https://www.iana.org/domains/reserved", "http_status": 200, "redirects": [], "content_kind": "real", "title": "IANA-managed Reserved Domains", "verdict": "ok" }
  ],
  "receipt": "<signed receipt>", "tier": "paid", "rail": "x402", "network": "eip155:8453"
}
```

Each link gets a `verdict`: `ok`, `broken`, `moved` or `unknown`. Use it before giving users links or citations.

---

## POST /v1/check/packages

Price: US$0.005 per call, up to 10 names. Checks that a package an LLM suggested really exists, on npm, PyPI or crates.io.

Request:

```sh
curl -X POST https://<service>/v1/check/packages -H 'content-type: application/json' -d '{
  "packages": [
    { "ecosystem": "npm", "name": "left-pad" },
    { "ecosystem": "pypi", "name": "requests" },
    { "ecosystem": "crates", "name": "serde" },
    { "ecosystem": "npm", "name": "lodash", "version": "4.17.20" }
  ]
}'
```

402 response: status `402`, `payment_required`, `amount` `5000` (US$0.005).

Paid retry: same body with `PAYMENT-SIGNATURE`. Status `200`.

Paid-run example (shortened):

```json
{
  "results": [
    { "ecosystem": "npm", "name": "left-pad", "exists": true, "status": "found", "registry_name": "left-pad", "latest_version": "1.3.0", "description": "String left pad", "license": "WTFPL" },
    { "ecosystem": "pypi", "name": "requests", "exists": true, "status": "found", "registry_name": "requests", "latest_version": "2.34.2", "description": "Python HTTP for Humans.", "license": "Apache-2.0" },
    { "ecosystem": "crates", "name": "serde", "exists": true, "status": "found", "registry_name": "serde", "latest_version": "1.0.229", "license": "MIT" },
    { "ecosystem": "npm", "name": "lodash", "exists": true, "status": "found", "registry_name": "lodash", "latest_version": "4.18.1", "license": "MIT" }
  ],
  "note": "exists means the registry listed this name when we looked. It is not a security verdict: the package may still be malicious, unmaintained or not the one you meant; description and licence are the publisher's.",
  "receipt": "<signed receipt>", "tier": "paid", "rail": "x402", "network": "eip155:8453"
}
```

Use it before installing or recommending a package. `exists: true` means the name is listed; it is not a review of the package code.

---

## POST /v1/attest

Price: US$0.002 per call. Timestamps a SHA-256 hash with a signed receipt, so you can show later that a file or answer existed unchanged at that time.

Request:

```sh
curl -X POST https://<service>/v1/attest -H 'content-type: application/json' -d '{
  "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
  "note": "delivery of report v3 to order 77",
  "idempotency_key": "order-77-delivery"
}'
```

402 response: status `402`, `payment_required`, `amount` `2000` (US$0.002). `idempotency_key` is for x402 payments only: a retry with the same key and hash gets the same receipt, paid once.

Paid retry: same body with `PAYMENT-SIGNATURE`. Status `200`.

Paid-run example (shortened):

```json
{
  "attestation": {
    "sha256": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855",
    "note_sha256": "270938cd…",
    "seq": 1,
    "issued_at": "2026-10-17T09:30:10.953Z",
    "idempotency_key": "order-77-delivery",
    "first_seen": true
  },
  "receipt": "<signed receipt>", "tier": "paid", "rail": "x402", "network": "eip155:8453"
}
```

Use it for a delivery, a report or any file that needs a timestamp. The receipt shows that this hash was sent by the stated time. It does not show who made the file.

---

## Next steps

- Check any receipt for free with `POST /v1/receipt/verify` and `{"receipt": "<receipt>"}`.
- Prices and request limits: [pricing.json](/pricing.json). Error codes: the `error.code` in each response.
- Contact and terms: see [terms](/terms.md).
