# Try it in 60 seconds

Last updated: 2026-10-18

Every route is a plain HTTPS `POST` with JSON (the samples are `GET`). You pay per call in USDC on Base over x402 v2, so there is no account and no API key. Each block below is one `curl` you can copy as it is, with example data. A paid route, run without a payment, stops at the `402` offer and costs nothing. Money only moves when you sign a payment, and the steps for that are in section 2.

## 1. Free first

These need no payment. Each runs its route on fixed demo input and shows the answer:

```sh
curl -s https://vehcdj664efetfrsolne5umanq.srv.us/v1/sample/quote
curl -s https://vehcdj664efetfrsolne5umanq.srv.us/v1/sample/citations
curl -s https://vehcdj664efetfrsolne5umanq.srv.us/v1/sample/packages
```

The full list is in [samples](/docs/samples).



**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.

## 2. The 402 flow, once

Every paid route follows the same four steps. Section 3 shows only the first one for each route.

1. **Send the request with no payment.** The body is checked first. A bad body gets `400` and is never charged. A valid body gets `402 Payment Required`, with the offer in the `PAYMENT-REQUIRED` response header.
2. **Read the offer.** The header value is base64-encoded JSON. Decode it and read `accepts[0]`: `network` is `eip155:8453` (Base), and `amount` is in USDC base units. USDC has 6 decimals, so `10000` is US$0.01 and `1000000` is US$1.00. Check that the amount is what you expect.
3. **Pay.** Sign the offer with an x402 v2 client, then send the same request again with the signed payment, base64-encoded, in the `PAYMENT-SIGNATURE` header.
4. **Read the answer.** A paid call returns `200` with the result and a signed receipt. The `PAYMENT-RESPONSE` header carries the transaction, the payer and the network.

To read a price without any input, send an empty body `{}`. You get the same `402` and no charge:

```sh
curl -s -o /dev/null -D - -X POST https://vehcdj664efetfrsolne5umanq.srv.us/v1/verify/quote \
  -H 'content-type: application/json' -d '{}' \
  | tr -d '\r' | grep -i '^payment-required:' | cut -d' ' -f2 | base64 -d | jq '.accepts[0]'
```

Step 3 needs a wallet, so that part is not a curl. The [plain-fetch example](/docs/examples/fetch-x402) does steps 2 to 4 in one script.

## 3. One route at a time

Each block below is the first call. It returns the `402` offer with the price. Add a signed `PAYMENT-SIGNATURE` header (section 2, step 3) to get the answer.

### Verify a quote

`POST /v1/verify/quote`: US$0.01 per call, amount `10000`. Checks that a quote appears on a page.

```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"}'
```

### Verify several quotes on one page

`POST /v1/verify/quotes`: US$0.02 per call, up to 20 quotes from one page.

```sh
curl -i -X POST https://vehcdj664efetfrsolne5umanq.srv.us/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"}'
```

### Verify citations

`POST /v1/verify/citations`: US$0.10 per call, up to 10 quote and URL pairs.

```sh
curl -i -X POST https://vehcdj664efetfrsolne5umanq.srv.us/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"}'
```

### Verify a quote against text you hold

`POST /v1/verify/text-quote`: US$0.005 per call. No fetch: the text is in the request.

```sh
curl -i -X POST https://vehcdj664efetfrsolne5umanq.srv.us/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}'
```

### Check a document

`POST /v1/verify/document/preview` is free. It lists the quote and link pairs in the document and the exact price, and it fetches nothing:

```sh
curl -s -X POST https://vehcdj664efetfrsolne5umanq.srv.us/v1/verify/document/preview -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"}'
```

`POST /v1/verify/document` checks one part of it, US$0.10 per part of up to 10 pairs:

```sh
curl -i -X POST https://vehcdj664efetfrsolne5umanq.srv.us/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}'
```

### Fetch a page as clean text

`POST /v1/fetch`: US$0.002 per URL. Returns the page as text, with its content kind and a receipt.

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

### Recheck a page

`POST /v1/recheck`: US$0.003 per call. Tells you whether a page you read earlier has changed. It needs a receipt from an earlier `fetch` (or `verify/quote`) call, so run the fetch above first and paste its `receipt` in place of the placeholder.

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

### Check links

`POST /v1/check/links`: US$0.005 per batch. Says whether each URL is live.

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

### Check packages

`POST /v1/check/packages`: US$0.005 per batch. Says whether each name exists on npm, PyPI or crates, and lists advisories.

```sh
curl -i -X POST https://vehcdj664efetfrsolne5umanq.srv.us/v1/check/packages -H 'content-type: application/json' \
  -d '{"packages":[{"ecosystem":"npm","name":"left-pad"},{"ecosystem":"pypi","name":"requests"},{"ecosystem":"npm","name":"no-such-package-for-try-it"}]}'
```

### Attest a hash

`POST /v1/attest`: US$0.002 per call. Gives a signed, timestamped receipt that a file existed unchanged. The hash below is the SHA-256 of the text `hello`.

```sh
curl -i -X POST https://vehcdj664efetfrsolne5umanq.srv.us/v1/attest -H 'content-type: application/json' \
  -d '{"sha256":"2cf24dba5fb0a30e26e83b2ac5b9e29e1b161e5c1fa7425e73043362938b9824","note":"try-it example","idempotency_key":"try-it-hello"}'
```

### Verify a receipt (free)

`POST /v1/receipt/verify` checks a receipt from any paid call against the service's published keys. It is free. Paste a receipt string in place of the placeholder:

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

## 4. Next

- [Quickstart](/docs/quickstart): the same steps with the discovery files first
- [Worked examples](/docs/worked-examples): one full paid call per route, with the answer
- [Payments](/docs/payments): when a call is charged
- [Errors](/docs/errors): every error code and whether it is charged
- [OpenAPI](/openapi.json): request and response schemas for every route
