API · x402

Invoice or receipt PDF OCR to structured JSON for $0.01 USDC on Base, Arbitrum, or Polygon

Invoice or receipt PDF OCR to structured JSON for $0.01 USDC on Base, Arbitrum, or Polygon. Extract header fields and up to ten line items from public HTTPS PDF URLs or unencrypted Base64 PDFs up to two pages and 2 MiB. URL redirects and size are bounded; pri…

by Agent Evidence Utility · verified provider · updated 2026-11-15

What it does

Invoice or receipt PDF OCR to structured JSON for $0.01 USDC on Base, Arbitrum, or Polygon. Extract header fields and up to ten line items from public HTTPS PDF URLs or unencrypted Base64 PDFs up to two pages and 2 MiB. URL redirects and size are bounded; private/local hosts are rejected. Two gpt-6-luna medium-effort calls; quotes are checked against generated OCR text, not PDF bytes. Review against the original PDF.

Tags: invoice · receipt · invoice-pdf · receipt-pdf · invoice-json · receipt-json · OCR · PDF-OCR · accounts-payable · line-items · structured-data · evidence

Use with an agent

  1. Discover. Agents find this listing with GET https://bazaar.saylorinnovations.com/discovery/search?query=…, the MCP tool search_resources, or /discovery/resources.
  2. Inspect. Fetch /resources/79694.json for the price and payment options.
  3. Pay. Call GET https://agent-evidence-extractor.defcronyke.workers.dev/v1/invoice-pdf-parse. The provider answers 402 with its payment requirements. An x402 client signs one of the options below and retries with PAYMENT-SIGNATURE.
  4. Execute. The provider returns 200 with the data. Agent Bazaar is not in the request path and never sees your payment.

For humans

You don't need an account or an API key; you need a wallet holding a small amount of USDC on Base, Arbitrum One, Polygon, and an x402-capable client (see the examples below). Call the endpoint unpaid first to see exactly what it asks for.

Pricing & payment

Price
$0.01 / request
Protocol
x402 v2
Auth
No account or API key. Pay per request.
Networks
Base, Arbitrum One, Polygon

x402 payment requirements

SchemeNetworkAssetAmountPay toTimeout
exactBase
eip155:8453
USDC$0.010xc4e484e62133dadac5be498ae3f311f5b8428cce300s
exactArbitrum One
eip155:42161
USDC$0.010xc4e484e62133dadac5be498ae3f311f5b8428cce300s
exactPolygon
eip155:137
USDC$0.010xc4e484e62133dadac5be498ae3f311f5b8428cce300s
accepts[] (raw JSON)
[
  {
    "scheme": "exact",
    "network": "eip155:8453",
    "payTo": "0xc4e484e62133dadac5be498ae3f311f5b8428cce",
    "asset": "0x833589fCD6eDb6E08f4c7C32D4f71b54bdA02913",
    "amount": "10000",
    "amountUsd": 0.01,
    "maxTimeoutSeconds": 300
  },
  {
    "scheme": "exact",
    "network": "eip155:42161",
    "payTo": "0xc4e484e62133dadac5be498ae3f311f5b8428cce",
    "asset": "0xaf88d065e77c8cC2239327C5EDb3A432268e5831",
    "amount": "10000",
    "amountUsd": 0.01,
    "maxTimeoutSeconds": 300
  },
  {
    "scheme": "exact",
    "network": "eip155:137",
    "payTo": "0xc4e484e62133dadac5be498ae3f311f5b8428cce",
    "asset": "0x3c499c542cEF5E3811e1192ce70d8cC03d5c3359",
    "amount": "10000",
    "amountUsd": 0.01,
    "maxTimeoutSeconds": 300
  }
]

Schemas

Output schema (JSON Schema)
{
  "type": "object",
  "properties": {
    "data": {
      "type": "object",
      "properties": {
        "supplier_name": {
          "type": [
            "string",
            "null"
          ],
          "description": "Supplier or vendor name exactly as printed."
        },
        "invoice_number": {
          "type": [
            "string",
            "null"
          ],
          "description": "Invoice identifier; preserve formatting."
        },
        "invoice_date": {
          "type": [
            "string",
            "null"
          ],
          "description": "Printed issue date; preserve its original format."
        },
        "due_date": {
          "type": [
            "string",
            "null"
          ],
          "description": "Printed payment due date; preserve its original format."
        },
        "currency": {
          "type": [
            "string",
            "null"
          ],
          "description": "Currency explicitly shown; null if not explicit."
        },
        "subtotal": {
          "type": [
            "string",
            "null"
          ],
          "description": "Printed subtotal, preserving currency and formatting."
        },
        "tax_amount": {
          "type": [
            "string",
            "null"
          ],
          "description": "Printed tax amount, preserving currency and formatting."
        },
        "total_amount": {
          "type": [
            "string",
            "null"
          ],
          "description": "Printed final amount due, preserving formatting."
        },
        "purchase_order_number": {
          "type": [
            "string",
            "null"
          ],
          "description": "Printed purchase-order reference."
        },
        "payment_terms": {
          "type": [
            "string",
            "null"
          ],
          "description": "Printed payment terms; do not infer."
        },
        "line_items": {
          "type": [
            "array",
            "null"
          ],
          "maxItems": 10,
          "items": {
            "type": "object",
            "properties": {
              "description": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Printed product or service description."
              },
              "sku": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Printed item, product, or SKU code."
              },
              "quantity": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Printed quantity, preserving formatting and units."
              },
              "unit_price": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Printed per-unit price, preserving currency and formatting."
              },
              "amount": {
                "type": [
                  "string",
                  "null"
                ],
                "description": "Printed line amount, preserving currency and formatting."
              }
            },
            "required": [
              "description",
              "sku",
              "quantity",
              "unit_price",
              "amount"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "supplier_name",
        "invoice_number",
        "invoice_date",
        "due_date",
        "currency",
        "subtotal",
        "tax_amount",
        "total_amount",
        "purchase_order_number",
        "payment_terms",
        "line_items"
      ],
      "additionalProperties": false
    },
    "evidence": {
      "type": "object",
      "properties": {
        "supplier_name": {
          "type": [
            "string",
            "null"
          ]
        },
        "invoice_number": {
          "type": [
            "string",
            "null"
          ]
        },
        "invoice_date": {
          "type": [
            "string",
            "null"
          ]
        },
        "due_date": {
          "type": [
            "string",
            "null"
          ]
        },
        "currency": {
          "type": [
            "string",
            "null"
          ]
        },
        "subtotal": {
          "type": [
            "string",
            "null"
          ]
        },
        "tax_amount": {
          "type": [
            "string",
            "null"
          ]
        },
        "total_amount": {
          "type": [
            "string",
            "null"
          ]
        },
        "purchase_order_number": {
          "type": [
            "string",
            "null"
          ]
        },
        "payment_terms": {
          "type": [
            "string",
            "null"
          ]
        },
        "line_items": {
          "type": [
            "array",
            "null"
          ],
          "maxItems": 10,
          "items": {
            "type": "object",
            "properties": {
              "description": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "sku": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "quantity": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "unit_price": {
                "type": [
                  "string",
                  "null"
                ]
              },
              "amount": {
                "type": [
                  "string",
                  "null"
                ]
              }
            },
            "required": [
              "description",
              "sku",
              "quantity",
              "unit_price",
              "amount"
            ],
            "additionalProperties": false
          }
        }
      },
      "required": [
        "supplier_name",
        "invoice_number",
        "invoice_date",
        "due_date",
        "currency",
        "subtotal",
        "tax_amount",
        "total_amount",
        "purchase_order_number",
        "payment_terms",
        "line_items"
      ],
      "additionalProperties": false
    },
    "model": {
      "type": "string",
      "const": "gpt-6-luna"
    },
    "reasoning_effort": {
      "type": "string",
      "const": "medium"
    },
    "note": {
      "type": "string",
      "description": "Model output may be wrong; verify before consequential use."
    },
    "verification_passes": {
      "type": "integer",
      "const": 2
    },
    "source_pdf_pages": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2
    }
  },
  "required": [
    "data",
    "evidence",
    "model",
    "reasoning_effort",
    "verification_passes",
    "source_pdf_pages",
    "note"
  ],
  "additionalProperties": false
}
Example shape — generated from the schema, not a captured live response
{
  "data": {
    "supplier_name": "string",
    "invoice_number": "string",
    "invoice_date": "string",
    "due_date": "string",
    "currency": "string",
    "subtotal": "string",
    "tax_amount": "string",
    "total_amount": "string",
    "purchase_order_number": "string",
    "payment_terms": "string",
    "line_items": [
      {
        "description": "string",
        "sku": "string",
        "quantity": "string",
        "unit_price": "string",
        "amount": "string"
      }
    ]
  },
  "evidence": {
    "supplier_name": "string",
    "invoice_number": "string",
    "invoice_date": "string",
    "due_date": "string",
    "currency": "string",
    "subtotal": "string",
    "tax_amount": "string",
    "total_amount": "string",
    "purchase_order_number": "string",
    "payment_terms": "string",
    "line_items": [
      {
        "description": "string",
        "sku": "string",
        "quantity": "string",
        "unit_price": "string",
        "amount": "string"
      }
    ]
  },
  "model": "string",
  "reasoning_effort": "string",
  "note": "string",
  "verification_passes": 0,
  "source_pdf_pages": 0
}

Examples

curl
curl "https://agent-evidence-extractor.defcronyke.workers.dev/v1/invoice-pdf-parse"
# -> 402 Payment Required, accepts[] lists how to pay
# retry with a PAYMENT-SIGNATURE (or PAYMENT header) once paid
JavaScript
const res = await fetch("https://agent-evidence-extractor.defcronyke.workers.dev/v1/invoice-pdf-parse");
if (res.status === 402) {
  const { accepts } = await res.json();
  // pay one of accepts[] via an x402 client, then retry with the payment header
}
Python
import httpx
res = httpx.get("https://agent-evidence-extractor.defcronyke.workers.dev/v1/invoice-pdf-parse")
if res.status_code == 402:
    accepts = res.json()["accepts"]
    # pay one of accepts[] via an x402 client, then retry with the payment header

Details

Provider
Agent Evidence Utility
Endpoint
https://agent-evidence-extractor.defcronyke.workers.dev/v1/invoice-pdf-parse
Machine-readable
/resources/79694.json