x402 · DeSci · On-Chain

Structured
mineral intelligence

USGS commodity benchmarks, empirical field studies, AI-powered assay extraction, and company supply-chain enrichment — sourced, sanitized, and delivered via API. $0.05–$0.50 per call, every response backed by on-chain provenance.

34
API Routes
$0.05
from per call
Base
Mainnet settlement
EAS
On-chain attestations
IPFS
Content-addressed data
AI
Assay extraction

Multiple data streams. One verified API.

AssayChain structures data from government sources, empirical field studies, and mineral processing research — sanitized against locked schemas, attested on-chain, and served through a single pay-per-call API.

USGS Commodity Benchmarks

Official U.S. Geological Survey annual mineral commodity summaries for 20 critical minerals — gold, silver, copper, lithium, cobalt, nickel, manganese, graphite, antimony, gallium, germanium, platinum-group elements, rare earths, and more. Mine production, reserve estimates, price data, and global supply context — machine-readable and x402-gated.

Field Study Run Logs

Empirical data from structured field studies on gravity separation and mineral processing. Feed type, recovery rate, equipment parameters — each run timestamped, schema-validated, and attested on-chain. More studies added as they complete.

On-Chain Provenance

Every data response includes an EAS attestation UID and IPFS CID. Verify the source data independently on base.easscan.org — no trust required.

x402 Native Payments

No API keys, no subscriptions, no accounts. AI agents and developers pay $0.10 USDC per call on Base mainnet via the HTTP 402 protocol. Works with Claude Desktop, Cursor, and any x402 client.

Assay Extract API Beta

Upload any public PDF, image, CSV, or text assay report. AI-powered extraction reads your document and returns every sample row as structured JSON, with an A–D quality grade. $0.10–$5.00 per job, dynamically priced by page count. Proven on real USGS fire-assay data — 57 samples extracted, grade B, San Juan Mountains CO.

Critical Minerals Enrichment

Send a company name and get back a structured per-commodity exposure profile across all 20 USGS critical minerals — China concentration, top producers, US self-sufficiency, resilience rating, and evidence citations. Each commodity entry links to its EAS attestation UID on Base. $0.50/call. Built for ESG analysts, underwriting agents, and supply-chain compliance pipelines.

x402 in four steps

01 — Request

Call any endpoint

Your agent or app sends a standard HTTP GET — no auth header needed.

02 — Gate

Receive 402

The server returns 402 Payment Required with a machine-readable USDC offer on Base.

03 — Pay

Sign & send

Your x402 client signs the EIP-3009 authorization and sends $0.10 USDC on Base.

04 — Data

Receive response

The server verifies via CDP facilitator, settles USDC, and returns the full payload with EAS UID and IPFS CID.

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.

What data does AssayChain deliver?

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.

What does "on-chain provenance" mean?

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.

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 →

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. The output schema (assay-extract-v0.1) matches the same field vocabulary as the benchmark endpoints so your AI agent can consume both with no remapping.

Supported in v0.1: 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.