S

SchemaLock · Extract Invoice

by SchemaLock

POSTBase

$0.02

per call · USD Coin on Base

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.

Endpoint

POST https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/invoice

4

Calls / 30d

2

Unique payers / 30d

Sep 8

Last called

exact

Payment scheme

Call this service

TypeScript · @x402/fetch
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/invoice", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({
    "file": "<binary: PDF, PNG, or JPEG of an invoice, max 15MB>"
  }),
});
const data = await res.json();
cURL
curl -X POST \
  "https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/invoice" \
  -H "Content-Type: application/json" \
  -d '{"file":"<binary: PDF, PNG, or JPEG of an invoice, max 15MB>"}' \
  -H "X-PAYMENT: <signed x402 payment>"

Example response

{
  "data": {
    "bill_to": {
      "address": "55 Market St, Austin, TX 78701",
      "name": "Brandon Strouse"
    },
    "confidence": {
      "fields": {
        "total": 0.99,
        "vendor": 0.99
      },
      "overall": 0.97
    },
    "currency": "USD",
    "due_date": "2026-08-31",
    "invoice_date": "2026-08-01",
    "invoice_number": "INV-20268",
    "line_items": [
      {
        "amount": 45,
        "description": "Widget A (steel)",
        "quantity": 10,
        "unit_price": 4.5
      },
      {
        "amount": 30,
        "description": "Widget B (plastic)",
        "quantity": 25,
        "unit_price": 1.2
      },
      {
        "amount": 18,
        "description": "Shipping crate",
        "quantity": 1,
        "unit_price": 18
      }
    ],
    "payment_terms": "Net 30",
    "subtotal": 93,
    "tax": 7.44,
    "total": 100.44,
    "vendor": {
      "address": "123 Industrial Ave, Springfield, IL 62701",
      "name": "Acme Supply Co.",
      "tax_id": "12-3456789"
    }
  },
  "retried": false,
  "validation_warnings": []
}

Payment details

Pay to0x65c767c483dd862d08bc3d6500cd4cd770ae28ed
AssetUSD Coin · 0x833589fcd6edb6e08f4c7c32d4f71b54bda02913
NetworksBase
Schemesexact

Is this your API?

Pin it to the top of Media & Generation and the homepage with a featured placement.

Get featured →

More from SchemaLock & similar services

S

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.

POSTBaseMedia & Generation
$0.03 / call4 calls / 30d
S

SchemaLock · Extract Custom

doc-extract-api.thestarboy9696-4ef.workers.dev

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.

POSTBaseMedia & Generation
$0.02 / call3 calls / 30d
S

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.

POSTBaseMedia & Generation
$0.02 / call3 calls / 30d