AttestPage · Docs · Pricing · OpenAPI · llms.txt

AttestPage recipes

Last updated: 2026-10-17

Short, runnable recipes for calling AttestPage from an agent. In each one, the agent checks a source before it cites it. Copy one, run it, then change the tools to fit your agent.

RecipeRunnable fileFrameworkLanguageHow it calls AttestPagePays with x402
langchain.mdlangchain.mjsLangChain (create_agent, createAgent)Python and JavaScriptPython: a small client using only the standard library. JavaScript: the client from the OpenAI Agents SDK recipePython: no payment; returns the price. JavaScript: yes, when a key is set
openai-agents-sdk.mdopenai-agents-sdk.mjsOpenAI Agents SDKJavaScriptA small client over fetchYes, with @x402/fetch when a key is set
openai-agents.mdCode on the pageOpenAI Agents SDKJavaScriptThe quoteproof-mcp server over stdio, or a verify_quotes call over HTTPYes, with @x402/fetch (HTTP) or QUOTEPROOF_X402_KEY (MCP) when a key is set
llamaindex.mdllamaindex.mjsLlamaIndex.TS (agent, tool)JavaScriptThe client from the OpenAI Agents SDK recipeYes, when a key is set
vercel-ai-sdk.mdvercel-ai-sdk.mjsVercel AI SDK (generateText, tools)JavaScriptThe client from the OpenAI Agents SDK recipeYes, when a key is set
claude-agent-sdk.mdclaude-agent-sdk.mjsClaude Agent SDKJavaScriptThe quoteproof-mcp MCP server (stdio)Yes, when QUOTEPROOF_X402_KEY is set
fetch-x402.mdfetch-x402.mjsNoneJavaScriptPlain fetch, one x402 payment step by stepYes
python-x402.mdpython-x402.pyNonePythonhttpx and the x402 package: one unpaid call, then one x402 payment step by stepYes, when a key is set
crewai.mdCode on the pageCrewAI (Agent, Task, Crew)PythonA verify_quotes tool that calls the route with the x402 packageYes, with the x402 package when a key is set
pydantic-ai.mdCode on the pagePydantic AI (Agent, tool_plain)PythonA verify_quotes tool that calls the route with the x402 packageYes, with the x402 package when a key is set
mastra.mdCode on the pageMastra (Agent, createTool)JavaScriptA verify_quotes tool that calls the route with @x402/fetchYes, when a key is set
curl.mdCode on the pageNoneShellcurl: the 402 price, then one x402 paymentYes, when a key is set
mcp.mdCode on the pageMCP clientsAnyThe quoteproof-mcp server (stdio), no install stepYes, with QUOTEPROOF_X402_KEY when it is set

Run a recipe

Each page shows its code in full, with what to install and the command that runs it. The LangChain (JavaScript), LlamaIndex.TS, Vercel AI SDK and OpenAI Agents SDK recipes share one client, [attestpage.mjs](/docs/examples/attestpage.mjs), shown on the OpenAI Agents SDK page.

Service address

https://s2h6qt73jtzlgbgnnfacln2poq.srv.us

Every recipe uses this address by default. To call another address, set ATTESTPAGE_URL (the MCP server reads QUOTEPROOF_URL).

Routes and prices

Prices are per call in USDC. The full list is at [/pricing.json](https://s2h6qt73jtzlgbgnnfacln2poq.srv.us/pricing.json) and in the OpenAPI document.

RouteWhat it answersPrice
POST /v1/verify/quoteIs this quote on the page at this URL: exact, fuzzy or none, with offsets and page hashesUS$0.01
POST /v1/verify/citationsThe same for up to 10 quote and URL pairsUS$0.10 per batch
POST /v1/verify/quotesThe same for up to 20 quotes on one page, fetched onceUS$0.02 per batch
POST /v1/verify/text-quoteThe same check against text you already hold, nothing fetchedUS$0.005
POST /v1/verify/documentEvery quote with its link in a finished document, checked on the live pageUS$0.10 per part of up to 10 pairs
POST /v1/verify/document/previewThe pairs a document check would make, and its pricefree
POST /v1/fetchA page as clean text, with a verdict on what came back (real, bot_wall, js_shell, paywall, http_error and others)US$0.002
POST /v1/recheckFetches a page again and compares it with an earlier receipt: unchanged, changed, gone or unreadable, with a receipt naming both hashesUS$0.003
POST /v1/check/linksStatus, redirects, final URL and verdict for up to 10 URLsUS$0.005 per batch
POST /v1/check/packagesWhether up to 10 npm, PyPI or crates.io names exist, with latest versionUS$0.005 per batch
POST /v1/attestA signed, timestamped receipt over a SHA-256 you sendUS$0.002
POST /v1/receipt/verifyChecks a receipt's signature against the published keysfree

Every answer from a paid route carries a receipt: an Ed25519-signed JWS of what the fetcher saw and when. A receipt records what was on the page at that time, not whether a statement on it is correct.

How a call is paid

  1. Payment. A paid route without payment answers 402 with the price. See Limits.
  2. 402 Payment Required. A valid request gets 402 when it has no payment. The offer is in the PAYMENT-REQUIRED header: base64 JSON with the amount (USDC, 6 decimals), network and pay-to address.
  3. x402. Sign the offer and send the same request again with the PAYMENT-SIGNATURE header. Payment settles only when the route answers with a status below 400; the answer then carries a PAYMENT-RESPONSE header.

Payments run on Base (eip155:8453). USDC on Base is real money: each paid call is charged. Use a wallet holding only the USDC you can spare.

A bad request gets 400 before any offer and is never charged. Error codes are listed at [/docs/errors](https://s2h6qt73jtzlgbgnnfacln2poq.srv.us/docs/errors).

Try it without code

# Free: what a verify/quote answer looks like
curl -s https://s2h6qt73jtzlgbgnnfacln2poq.srv.us/v1/sample/quote

# The 402 offer for verify/quote, decoded
curl -s -o /dev/null -D - -X POST https://s2h6qt73jtzlgbgnnfacln2poq.srv.us/v1/verify/quote \
  -H 'content-type: application/json' -d '{}' \
  | grep -i '^payment-required:' | cut -d' ' -f2 | tr -d '\r' | base64 -d

More