Data Refinery · Structured · Attested · Agent-Payable
Structure Unstructured Mineral Data.
Get graded JSON back.
Upload a fire-assay PDF, lab certificate, or drill log. The AssayChain data refinery turns raw assay certificates, drill logs, and geology PDFs into structured, quality-graded JSON (A–D, with 80% refund on Grade D) — EAS-attested on Base so every response is on-chain verifiable. All 20 USGS critical minerals are also queryable as a clean REST + MCP API with daily price context. Pay per file or per page — credit card for humans, x402 for AI agents. No subscription.
What we provide
Structure it. Query it. Pay per file.
AssayChain's core product: turn unstructured assay reports into structured, graded JSON, and query 20 USGS critical minerals through a clean REST + MCP API. Credit card for humans, x402 for AI agents. Additional intelligence endpoints (risk scores, compliance checklists) are offered as experimental tools — helpful for research, never a substitute for professional review.
Assay Extract API
Upload any public PDF, image, CSV, or text assay report. AI-powered extraction returns every sample row as structured JSON with an A–D quality grade. 80% refund on Grade D. $0.10–$5.00 per job. Proven on USGS fire-assay data — 57 samples, grade A.
NI 43-101 → CSV converter tool ↗ — free utility that formats your assay tables for downstream use.
USGS Commodity Benchmarks
Official USGS mineral commodity summaries for 20 critical minerals — production, reserves, top producers, China share. Each response on-chain attested with IPFS-pinned source data. $0.10/call.
Critical Minerals Enrichment Experimental
Send a company name and get a structured per-commodity exposure profile across the 20 USGS critical minerals. Research context for ESG/analyst work — not an investment or compliance determination. $0.50/call.
Supply Chain Risk Scores Experimental
Per-commodity risk scores with China dependency and allied supply ratios. Heuristic research context — not a procurement decision tool. Methodology published. $0.50/call.
Compliance Check — NI 43-101 / JORC Assistive
AI-generated assistive screening checklists only. NOT a substitute for Qualified Person review or regulatory filing. Useful as a starting checklist. $0.50/call.
Geological Intelligence Experimental
Ore potential and deposit-model screening for research triage — requires follow-up lab work and geologist interpretation. $0.50/call.
Knowledge Graph, Procurement & Districts Experimental
Mineral relationship data, supplier ranking, and 182+ historical district reports across US/MX. Research context — procurement rankings are heuristic. $0.10–$0.50/call.
How payment works
x402 in four steps
Call any endpoint
Your agent or app sends a standard HTTP GET — no auth header needed.
Receive 402
The server returns 402 Payment Required with a machine-readable USDC offer on Base.
Sign & send
Your x402 client signs the EIP-3009 authorization and sends $0.10 USDC on Base.
Receive response
The server verifies via CDP facilitator, settles USDC, and returns the full payload with EAS UID and IPFS CID.
Why not use USGS directly?
USGS PDFs vs. AssayChain API
The USGS Mineral Commodity Summaries are the industry standard. But they're published as PDFs — not an API. Here's what AssayChain adds.
| USGS PDFs | AssayChain | |
|---|---|---|
| Format | PDFs you must download, parse, and extract manually | Structured JSON via REST — HTTP GET, returns ready-to-use data |
| Update cadence | Annual reports (MCS released each January) | Same USGS data + daily price snapshots for 8 commodities (FRED/LME) |
| Data enrichment | Raw numbers only | AI-enriched: grade benchmarks, typical ranges, processing notes, deposit types |
| Supply-chain risk | Not available — raw production tables only | Risk scores (0–100), China dependency, allied supply ratio, resilience scenario tests, ESG profiles |
| Compliance | Not available | NI 43-101 checklists, JORC Table 1 reports, DFARS/IRA/EU Battery crosschecks |
| Payment model | Free (but time cost to extract) | $0.10–$5.00 extraction · $0.05–$0.50 data · via x402 (USDC) or credit card. No monthly commitment. |
| Provenance | None — you trust the PDF | Every response includes EAS attestation UID + IPFS CID — verify on-chain |
| AI agent ready | No — PDFs require OCR and custom parsing | Yes — MCP endpoint, x402 auto-payment, structured JSON schemas |
| Coverage | USGS — US-focused | Multi-jurisdiction: US DoD, EU, IEA, Japan METI criticality lists. Trade controls for China export restrictions. |
Why it matters
Mineral data is scattered and hard to use
USGS mineral commodity data is technically public, but it’s locked in PDFs and annual reports that require manual extraction. No structured API. No machine-readable format. No provenance chain from source document to delivered response.
Field study data — recovery rates, processing parameters, equipment geometry — is almost never published in a usable form. Studies accumulate in notebooks and internal reports. The next operator starts from scratch.
AssayChain structures all of it: source data is sanitized against locked schemas, pinned to IPFS, attested on-chain via EAS, and served through a single x402-gated API. AI agents and developers get clean, verifiable mineral intelligence — without accounts, subscriptions, or trust assumptions.
Six product surfaces: (1) USGS Mineral Commodity Summaries for 20 critical minerals, (2) empirical gravity separation run logs from an active field study, (3) curated historical US/MX mining district reports, (4) daily mineral market context bundles (spot price, BDI, WTI, FX, LME stock), (5) AI-powered structured assay extraction from PDFs/images/CSVs, and (6) company critical-minerals exposure profiles assembled by a 3-agent swarm over the USGS corpus. All data schema-locked, IPFS-pinned, and EAS-attested on Base.
Each field run is saved on IPFS — a distributed network where a file's address is derived from its content (so any tampering changes the address). A permanent pointer to that file is then written to Base blockchain via EAS. Anyone can follow that pointer and verify the original data, without trusting AssayChain.
Quick start
Test the API in 30 seconds
No wallet or account required to test. The health check and extract estimate are always free.
1. Free health check
curl https://assaychain.com/api/health
2. Trigger the x402 gate (no payment taken)
curl -i https://assaychain.com/api/benchmark/copper
HTTP 402 Payment Required is the correct response — it means the gate is working. Use an x402 client (Claude Desktop, Cursor, or x402 SDK) to pay and receive data.
3. Free extraction estimate (no payment)
curl -X POST https://assaychain.com/api/extract/estimate \
-H "content-type: application/json" \
-d '{"source_url":"https://pubs.usgs.gov/circ/1968/0592/report.pdf"}'
Returns an estimate_id, page count, quality floor grade, and USDC price quote. Use the estimate_id with POST /extract/run to pay and extract. Full API docs →
FAQ
Common questions
What is x402 and how do I pay?
x402 is an open HTTP payment protocol. When you call a paid endpoint without a payment header, the server returns HTTP 402 Payment Required with a machine-readable offer: the USDC amount, the Base network, and the recipient address. An x402-aware client reads that offer, signs an EIP-3009 USDC authorization with your wallet, retries the request with the X-PAYMENT header, and receives data in return.
You do not need to manually construct the payment header. Use Claude Desktop, Cursor, or the x402 TypeScript/Python SDK.
What wallet and tokens do I need?
You need a wallet with USDC on Base mainnet. USDC on Base is the native USDC contract at 0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913. You also need a tiny amount of ETH on Base for gas (~$0.001 per call).
To get Base USDC: bridge from Ethereum mainnet via bridge.base.org, or buy directly on Base via Coinbase.
What AI clients work with this API?
MCP clients (add POST /mcp URL in settings): Claude Desktop, VS Code / GitHub Copilot, Cursor, Windsurf, and any tool built on the MCP SDK. Each client has a config JSON with a "url" key pointing at https://assaychain.com/api/mcp. See the API docs for client-specific config snippets.
OpenAI Agents SDK (Python): use MCPServerStreamableHTTP pointing at the same URL.
ChatGPT Custom GPTs (Actions): requires an OpenAPI spec — contact us via the Contact page.
Custom agents / scripts: use x402-fetch (NPM) or the x402 Python package to call any gated endpoint directly with automatic payment.
What does the Extract API do and what document types does it support?
The Extract API reads assay reports — fire assay PDFs, lab certificate images, CSV data tables, or plain text — and returns every sample row as structured JSON with element, value, and unit, plus structured provenance (site, county, state, assayer, sample dates). The output schema (assay-extract-v0.2) matches the same field vocabulary as the benchmark endpoints so your AI agent can consume both with no remapping.
Supported in v0.2: PDF (digital and scanned), image (PNG/JPG/WEBP), CSV, TXT. XLSX and DOCX return a 415 error with a reason — no charge is taken for unsupported types.
See the API docs for the full step-by-step extraction workflow.
What does the extraction grade (A–D) mean?
Each extraction is scored on four signals: structural validity (did the model produce valid sample rows?), coverage (did it find at least 70% of the expected rows?), self-consistency (does a second independent extraction pass return the same numbers?), and cross-check (are the element symbols and units recognized, and within physical bounds?). Grade A = all four pass. Grade B = three of four. Grade C = two. Grade D = one or fewer.
Grade D triggers an 80% manual refund. Grade C is delivered with a warning to review manually.
How is sensitive location data protected?
Site coordinates in extraction results and field run logs are rounded to ±0.1° before storage and delivery — enough precision for regional analysis but not enough to expose a specific claim. Email addresses and phone numbers in document text are stripped and replaced with [REDACTED] tokens before any data reaches the API response.
How do I verify the provenance of a response?
Benchmark and field run responses include an attestation_uid and ipfs_cid. Paste the UID into base.easscan.org to inspect the full on-chain record. Fetch the IPFS CID via any public gateway to retrieve the original source data. No trust in AssayChain required. See the Provenance page for step-by-step instructions.