{
  "x402Version": 2,
  "id": 8242,
  "slug": "8242",
  "resource": "https://doc-extract-api.thestarboy9696-4ef.workers.dev/extract/invoice",
  "description": "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.",
  "type": "http",
  "accepts": [
    {
      "scheme": "exact",
      "network": "eip155:8453",
      "payTo": "0x65c767C483dd862d08Bc3d6500Cd4CD770Ae28ED",
      "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
      "amount": "20000",
      "maxTimeoutSeconds": 300
    }
  ],
  "outputSchema": {
    "bazaar": {
      "info": {
        "input": {
          "body": {
            "file": "<binary: PDF, PNG, or JPEG of an invoice, max 15MB>"
          },
          "bodyType": "form-data",
          "method": "POST",
          "type": "http"
        },
        "output": {
          "example": {
            "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": []
          },
          "type": "json"
        }
      },
      "schema": {
        "$schema": "https://json-schema.org/draft/2020-12/schema",
        "properties": {
          "input": {
            "additionalProperties": false,
            "properties": {
              "body": {
                "properties": {}
              },
              "bodyType": {
                "enum": [
                  "json",
                  "form-data",
                  "text"
                ],
                "type": "string"
              },
              "method": {
                "enum": [
                  "POST"
                ],
                "type": "string"
              },
              "type": {
                "const": "http",
                "type": "string"
              }
            },
            "required": [
              "type",
              "method",
              "bodyType",
              "body"
            ],
            "type": "object"
          },
          "output": {
            "properties": {
              "example": {
                "type": "object"
              },
              "type": {
                "type": "string"
              }
            },
            "required": [
              "type"
            ],
            "type": "object"
          }
        },
        "required": [
          "input"
        ],
        "type": "object"
      }
    }
  },
  "tags": [
    "bazaar"
  ],
  "sourceHost": "doc-extract-api.thestarboy9696-4ef.workers.dev",
  "lastUpdated": "2026-09-08T19:24:45.166Z",
  "quality": {
    "calls30d": 4,
    "uniquePayers30d": 2,
    "lastCalledAt": "2026-09-08T19:24:42.573Z"
  },
  "liveness": {},
  "verified": false,
  "featured": false,
  "provider": {
    "host": "doc-extract-api.thestarboy9696-4ef.workers.dev",
    "manifest_name": "doc-extract-api.thestarboy9696-4ef.workers.dev",
    "source": "cdp-mirror",
    "source_manifest_url": "https://api.cdp.coinbase.com/platform/v2/x402/discovery/resources",
    "submitted_at": "2026-09-18T22:00:31.484Z"
  }
}