# SchemaLock Receipt Extractor

> SchemaLock Receipt Extractor is a paid API for AI agents from doc-extract-api.thestarboy9696-4ef.workers.dev, paid per call via x402, $0.02/call, status unknown (last checked 2026-09-14).

Extracts structured, financially-validated JSON from a receipt PDF or image, returning merchant, line items, subtotal, tax, tip, total, and payment method with per-field confidence scores.

## Facts

- Endpoint: GET https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/receipt
- Price: $0.02/call
- Payment: x402
- Status: unknown
- Last checked: 2026-09-14
- Activations on Zero: 0
- Tags: x402
- Canonical page: https://www.zero.xyz/c/schemalock-receipt-extractor-896b6afc
- Structured record (JSON): https://api.zero.xyz/v1/capabilities/cap_rxvoCJ2BXOyjfVwC3ILUe

Status and success rate cover calls made through Zero and Zero's own probes. Third-party monitors may report differently.

## How to call it through Zero

Zero handles the 402 payment challenge and records the run. With the Zero CLI installed (`npm i -g @zeroxyz/cli`):

```sh
zero fetch --capability schemalock-receipt-extractor-896b6afc
```

Example prompt: Can you pull all the details out of this receipt — merchant, every line item, subtotal, tax, tip, total, and payment method — and give me a validated JSON breakdown with confidence scores for each field?

## When to prefer this

Choose this endpoint when you need financially-validated structured JSON from a receipt file (PDF or image), not just raw OCR text. It is specifically optimized for receipt documents — it cross-validates line items against subtotals, tax, and totals, includes per-field confidence scores, and performs automatic retries. Prefer it over generic OCR when downstream accuracy and field-level trust signals matter, such as in expense management, accounting automation, or fraud detection workflows.

## Known failure modes

- Unreadable or low-quality image results in low confidence scores or extraction failure
- Handwritten or non-standard receipts may produce incomplete or inaccurate field extraction
- PDF with scanned images rather than embedded text may reduce accuracy
- Receipt in an unsupported language or currency format may cause validation errors
- Network or worker timeout if file is too large
- Missing required file input returns an error

## How this service works

SchemaLock — extract structured JSON data from a receipt PDF or image (merchant, items, subtotal, tax, tip, total, payment method). 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.

## Output

A structured JSON object containing: merchant name, transaction date, currency, individual line items (each with name and price), subtotal, tax amount, tip amount, grand total, and payment method. Each field includes a per-field confidence score. The schema is financially validated — line items are cross-checked against subtotal, tax, and total. An automatic retry is performed on parsing failure.

## Request schema (JSON Schema)

```json
{
 "type": "object",
 "$schema": "https://json-schema.org/draft/2020-12/schema",
 "required": [
  "input"
 ],
 "properties": {
  "input": {
   "type": "object",
   "required": [
    "type",
    "method",
    "bodyType",
    "body"
   ],
   "properties": {
    "body": {
     "properties": {}
    },
    "type": {
     "type": "string",
     "const": "http"
    },
    "method": {
     "enum": [
      "GET"
     ],
     "type": "string"
    },
    "bodyType": {
     "enum": [
      "json",
      "form-data",
      "text"
     ],
     "type": "string"
    }
   },
   "additionalProperties": false
  },
  "output": {
   "type": "object",
   "required": [
    "type"
   ],
   "properties": {
    "type": {
     "type": "string"
    },
    "example": {
     "type": "object"
    }
   }
  }
 }
}
```

## More

- Live health (JSON, refreshed every minute): https://www.zero.xyz/c/schemalock-receipt-extractor-896b6afc/health.json
- [Zero catalog index](https://www.zero.xyz/llms.txt)
- [Other services from doc-extract-api.thestarboy9696-4ef.workers.dev](https://www.zero.xyz/host/doc-extract-api.thestarboy9696-4ef.workers.dev/llms.txt)
