x402 APIs for AI agents, priced by the call.
Your agent hands grist.tools a web page, a PDF, an image or a domain and gets clean, structured data back. Each call costs a fraction of a cent in USDC on Base. A call that fails costs nothing.
- No account
- No API key
- Nothing settled when a call fails
This page has a version for agents.
- token
- USD Coin
- network
- Base
- pay to
- 0x2C5d…F81C
- deadline
- 111s
Read from the 402 the gate sends.
See what comes back
Five calls from the catalogue, each with its published example. Pick one to see what your agent sends and the JSON it gets back.
POST /v1/url-to-markdown{
"url": "https://kitchen-ledger.blog/posts/weekday-starter",
"max_chars": 2000
}{
"title": "Feeding a Sourdough Starter on a Weekday Schedule",
"byline": "Marta Rinaldi",
"excerpt": "A feeding routine that keeps a rye starter active on a nine-to-five schedule, with ratios and timings.",
"site_name": "Kitchen Ledger",
"lang": "en",
"markdown": "By [Marta Rinaldi](https://kitchen-ledger.blog/authors/marta-rinaldi/)\n\nMost starter guides assume you are home all day, ready to feed every twelve hours on the dot. A starter kept on a weekday routine can stay just as lively, provided the flour, the ratio and the temperature do the work that a flexible timetable cannot.\n\n## The ratio that buys you time\n\nA stiffer, less frequently fed starter ferments more slowly. Feeding one part starter to five parts flour and five parts water stretches the peak from four hours to roughly ten at a kitchen temperature of twenty-two degrees, which is long enough to cover a working day.\n\n- Morning, before work: discard all but 10 g and feed 50 g flour and 50 g water.\n- Evening: use the starter at its peak, or refrigerate it overnight.\n- Weekend: return to two feeds a day at one to one to one if you plan to bake.\n\n## Choosing the flour\n\nWhole rye ferments faster and more predictably than white wheat, so a small share of it keeps a slow schedule from stalling. The [guide to flour protein](https://kitchen-ledger.blog/guides/flour-protein/) explains why, and the [baker's percentage tables](https://www.bakerspercentage.net/tables) help when you scale a recipe up.\n\nIf the starter smells sharply of acetone by evening, it is hungry: shorten the interval or lower the temperature rather than adding more flour at once.",
"length": 1368,
"truncated": false,
"readability_applied": true,
"url_final": "https://kitchen-ledger.blog/posts/weekday-starter",
"fetched_at": "2026-09-26T09:30:00.000Z"
}POST /v1/pdf-to-markdown{
"url": "https://grist.tools/samples/documents/markdown-guide.pdf",
"max_pages": 100
}{
"source_url": "https://grist.tools/samples/documents/markdown-guide.pdf",
"total_pages": 1,
"extracted_pages": 1,
"truncated": false,
"chars": 249,
"markdown": "# Field Notes\n\n## A short guide in three parts\n\nThis sample shows how headings are inferred.\n\nLarger text becomes a heading, body text stays plain.\n\n### Second section\n\nEach line of the page becomes its own block.\n\nThe document ends after this line."
}POST /v1/ocr-image-to-text{
"url": "https://grist.tools/samples/images/ocr-scan.png",
"lang": "eng"
}{
"source_url": "https://grist.tools/samples/images/ocr-scan.png",
"lang": "eng",
"image_format": "png",
"text": "SAMPLE SCAN FOR OCR\nSECOND LINE 2026\n",
"confidence": 86
}POST /v1/ssl-cert-info{
"domain": "example.com"
}{
"host": "example.com",
"port": 443,
"issuer": "CN=R3, O=Let's Encrypt, C=US",
"subject": "CN=example.com, O=Example Inc, C=US",
"san": [
"example.com",
"www.example.com"
],
"valid_from": "2026-08-01T00:00:00.000Z",
"valid_to": "2026-10-30T23:59:59.000Z",
"days_to_expiry": 65,
"self_signed": false,
"chain": [
{
"issuer": "CN=R3, O=Let's Encrypt, C=US",
"subject": "CN=example.com, O=Example Inc, C=US",
"valid_from": "2026-08-01T00:00:00.000Z",
"valid_to": "2026-10-30T23:59:59.000Z"
},
{
"issuer": "CN=ISRG Root X1, O=Internet Security Research Group, C=US",
"subject": "CN=R3, O=Let's Encrypt, C=US",
"valid_from": "2020-09-04T00:00:00.000Z",
"valid_to": "2025-09-15T16:00:00.000Z"
}
],
"queried_at": "2026-08-26T18:00:00.000Z"
}POST /v1/dns-lookup{
"domain": "example.com",
"types": [
"a",
"mx"
]
}{
"domain": "example.com",
"types_requested": [
"a",
"mx"
],
"records": [
{
"type": "a",
"values": [
{
"address": "93.184.215.14",
"ttl": 3600
}
],
"truncated": false,
"resolution_error": null
},
{
"type": "mx",
"values": [
{
"exchange": "mail.example.com",
"priority": 10
}
],
"truncated": false,
"resolution_error": null
}
],
"queried_at": "2026-08-26T18:00:00.000Z"
}How a call gets paid
grist.tools uses x402, an open standard that puts the payment inside the HTTP request. There is nothing to sign up for: your agent needs a wallet holding USDC on Base.
Ask
The agent calls a tool with a JSON body, like any other API.
POST /v1/archive-extract-file
{
"url": "https://grist.tools/samples/archives/bundle.zip",
"entry": "data/squares.csv"
}Get a quote
The answer is a 402 with the price, the network, who to pay and a deadline.
payment-required: <this, base64>
- price
- $0.003 USD Coin
- network
- Base
- deadline
- 111s
Sign and repeat
The agent signs a transfer authorization and sends the same call again.
POST /v1/archive-extract-file payment-signature: <signature>
The v1 header x-payment is still accepted.
Settle
The tool runs. Money moves only once it has answered successfully.
200 OK payment-response: <settlement receipt>
Payment is verified before the work starts and settled after a 200. A rejected, failed or timed-out call costs nothing.
What would your agent spend?
Pick a tool and a daily volume. Only successful calls are settled, so this is the most it could cost.
Failed calls are never settled.
The price list
All 50 tools in 7 families, with what each family takes and returns. Every price is per successful call. Each name opens its page; the search and the conversions are on the APIs page.
Fetch & extract
- Takes
- Any public URL
- Returns
- Markdown, clean text, links, metadata, structured data
- html-clean-text$0.002
- http-headers$0.002
- link-extract$0.002
- page-metadata$0.002
- structured-data-extract$0.002
- url-to-markdown$0.002
- url-unshorten$0.002
Feeds & site structure
- Takes
- A site, a sitemap or a feed URL
- Returns
- Feed items, sitemap URLs, robots rules, security.txt
- feed-discover$0.002
- robots-check$0.002
- rss-parse$0.002
- sitemap-parse$0.002
- wellknown-fetch$0.002
Domain, DNS & network
- Takes
- A domain, an IP or an email address
- Returns
- DNS records, whois, TLS certificates, network owner
- dns-lookupfree
- email-validate$0.002
- ip-info$0.002
- ssl-cert-info$0.002
- whois$0.002
Documents
- Takes
- PDF, DOCX, EPUB, PPTX, XLSX, CSV, JSON, HTML, Markdown, scans
- Returns
- Markdown, text, JSON, CSV, PDF
- csv-to-json$0.005
- docx-to-markdown$0.005
- epub-to-text$0.005
- html-to-pdf$0.005
- json-to-csv$0.005
- markdown-to-pdf$0.005
- ocr-image-to-text$0.005
- pdf-merge$0.005
- pdf-metadata$0.005
- pdf-split$0.005
- pdf-to-markdown$0.005
- pdf-to-text$0.005
- pptx-to-text$0.005
- xlsx-to-json$0.005
Images
- Takes
- PNG, JPEG, WebP, AVIF, GIF, TIFF, SVG
- Returns
- Resized or converted images, metadata, palettes, favicons
- color-palette-extract$0.003
- favicon-extract$0.003
- image-compress$0.003
- image-convert$0.003
- image-metadata$0.003
- image-probe$0.003
- image-resize$0.003
- svg-to-png$0.003
Audio & video
- Takes
- Audio and video files, subtitles
- Returns
- Audio tracks, frames, subtitles, waveforms, media facts
- audio-convert$0.003
- audio-extract$0.003
- media-probe$0.003
- subtitle-convert$0.003
- subtitle-extract$0.003
- video-thumbnail$0.003
- waveform-data$0.003
Archives & binary
- Takes
- ZIP, TAR, TAR.GZ or any file URL
- Returns
- File lists, single files, true file types, digests
- archive-extract-file$0.003
- archive-inspect$0.003
- file-type-detect$0.003
- remote-file-hash$0.003
Reading an input schema at GET /v1/<name>/schema is always free.
Three ways to start
All three reach the same tools at the same prices. Start with the free dns-lookup call to see a response first.
From Claude, Cursor or any MCP app
Add the grist.tools MCP server. By default it holds no wallet: your agent signs each payment with its own.
{
"mcpServers": {
"grist-tools": {
"command": "npx",
"args": [
"-y",
"grist-tools-mcp"
]
}
}
}Straight over HTTP
No SDK needed. This call is free, so it needs no payment.
curl -X POST 'https://grist.tools/v1/dns-lookup' -H 'content-type: application/json' -d '{"domain":"example.com","types":["a","mx"]}'From a spec
Point your framework or x402 client at a generated file.
Questions about paying
When is a call charged?
The signed payment is checked first and settlement waits for the endpoint to return 200. If the input is refused, the handler errors or the deadline passes, nothing is settled.
Which calls are free?
Free to call, with no payment header: dns-lookup. Every other endpoint is paid per call, at the price in the list above.
What is the payment made in?
USDC on Base. The caller signs a transfer authorization and nothing moves until settlement; the 402 envelope names the network id and the token contract.
What does the deadline in the 402 cover?
The whole call: payment verification, the endpoint's own run and the settlement after it. It is max_timeout_seconds in the envelope, so size the validity of the signed authorization from it.
Can the work succeed and the payment still fail?
Yes, at settlement. If the facilitator refuses the transfer, the answer is a new 402 and the output is held back; a retry with a valid payment runs the call again. If settlement ends with no clear answer, the response is 500 internal and the transfer may still land: check the authorization nonce on chain before signing a new one.
What if the service is restarting?
A call that finishes too close to a redeploy is not settled. It gets 503 upstream_unavailable with retry-after 5, and the retry can spend the same authorization.
Do I need an account or an API key?
No. There is no sign-up and no key to manage. Each request carries its own x402 payment, signed by the caller.
How does my agent find the tools?
It reads /llms.txt, /openapi.json or /.well-known/x402, all generated from the same registry as this page. The Agent switch at the top shows the text it reads.
Can I read an input schema before paying?
Yes. GET /v1/<name>/schema returns the JSON schema of an endpoint's input at no cost, and every API page prints it too.