$0.02
per call · USD Coin on Base
SchemaLock — extract structured JSON data from any PDF/image or raw text/HTML, converting it into a JSON Schema you supply, not limited to invoice/receipt/contract/resume. Unlike the fixed invoice/receipt/contract/resume endpoints, this accepts any JSON Schema — you define the fields. Takes a PDF/image file OR raw text/HTML you already have (e.g. a scraped page). Schema-conformance, not fact-checking. A rejected schema is a 400 and costs nothing.
Endpoint
POST https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/custom3
Calls / 30d
1
Unique payers / 30d
Sep 8
Last called
exact
Payment scheme
Call this service
import { wrapFetchWithPayment } from "@x402/fetch";
import { privateKeyToAccount } from "viem/accounts";
const account = privateKeyToAccount(process.env.PRIVATE_KEY);
const fetchWithPay = wrapFetchWithPayment(fetch, account);
const res = await fetchWithPay("https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/custom", {
method: "POST",
headers: { "Content-Type": "application/json" },
body: JSON.stringify({
"content": "<string: raw text or HTML, e.g. an already-scraped web page, max 100000 chars — send this OR 'file', not both>",
"file": "<binary: PDF, PNG, or JPEG/WEBP, max 15MB — send this OR 'content', not both>",
"instructions": "<optional string: extra guidance for the model, max 1000 chars>",
"schema": "<string: JSON Schema, type \"object\", e.g. {\"type\":\"object\",\"properties\":{\"order_id\":{\"type\":\"string\"},\"ship_date\":{\"type\":\"string\"},\"total_weight_kg\":{\"type\":\"number\"}}}>"
}),
});
const data = await res.json();curl -X POST \
"https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/custom" \
-H "Content-Type: application/json" \
-d '{"content":"<string: raw text or HTML, e.g. an already-scraped web page, max 100000 chars — send this OR 'file', not both>","file":"<binary: PDF, PNG, or JPEG/WEBP, max 15MB — send this OR 'content', not both>","instructions":"<optional string: extra guidance for the model, max 1000 chars>","schema":"<string: JSON Schema, type \"object\", e.g. {\"type\":\"object\",\"properties\":{\"order_id\":{\"type\":\"string\"},\"ship_date\":{\"type\":\"string\"},\"total_weight_kg\":{\"type\":\"number\"}}}>"}' \
-H "X-PAYMENT: <signed x402 payment>"Example response
{
"data": {
"order_id": "PO-88213",
"ship_date": "2026-07-14",
"total_weight_kg": 42.5
},
"retried": false,
"validation_warnings": []
}Payment details
0x65c767c483dd862d08bc3d6500cd4cd770ae28edUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913Is this your API?
Pin it to the top of Media & Generation and the homepage with a featured placement.
More from SchemaLock & similar services
SchemaLock · Extract Contract
doc-extract-api.thestarboy9696-4ef.workers.dev
SchemaLock — parse a contract for its key terms as structured JSON data from a PDF or image (parties, dates, term, payment terms, termination clause, governing law, obligations, signatures). Unlike generic OCR or text-only extraction APIs, this takes the raw file directly and validates date logic (expiration after effective date), one automatic retry. Still fails after that, you aren't charged. Per-field confidence included.
SchemaLock · Extract Invoice
doc-extract-api.thestarboy9696-4ef.workers.dev
SchemaLock — extract structured JSON data from an invoice PDF or image (vendor, line items, subtotal, tax, total, dates, payment terms). Unlike generic OCR (raw text) or text-only extraction APIs, this takes the raw file directly and validates against source math: line items checked against subtotal/tax/total, dates and currency checked, one automatic retry. If it still fails after that, you aren't charged — settlement is skipped, not just flagged.
SchemaLock · Extract Resume
doc-extract-api.thestarboy9696-4ef.workers.dev
SchemaLock — extract structured JSON data from a resume PDF or image (contact info, work experience, education, skills). Unlike generic OCR or text-only extraction APIs, this takes the raw file directly and validates email format and work-history date order, one automatic retry. Still fails after that, you aren't charged. No content stored after the response returns.