Invoice and Receipt Extraction

Read an invoice or receipt from an image or PDF. Returns line items, totals, dates, supplier details and VAT amounts.

Pay by wallet (x402) AI-generated invoice-extract

Example

Example answer
{
  "iban": null,
  "currency": null,
  "due_date": null,
  "subtotal": null,
  "vat_rate": null,
  "buyer_vat": null,
  "buyer_name": null,
  "confidence": {
    "line_items": "low",
    "vat_amount": "low",
    "vendor_name": "low",
    "total_amount": "low"
  },
  "line_items": [],
  "vat_amount": null,
  "vendor_vat": null,
  "vendor_name": null,
  "invoice_date": null,
  "total_amount": null,
  "invoice_number": null,
  "payment_reference": null
}

Inputs

FieldTypeRequiredWhat it is
urlstringNoURL to invoice image or PDF
base64stringNoBase64-encoded invoice file

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
ibanstringUsually (present for most inputs)
currencystringUsually (present for most inputs)
due_datestringUsually (present for most inputs)
subtotalnumberUsually (present for most inputs)
vat_ratenumberUsually (present for most inputs)
buyer_vatstringUsually (present for most inputs)
buyer_namestringUsually (present for most inputs)
confidenceobjectSometimes (present only for some inputs)
line_itemsarraySometimes (present only for some inputs)
vat_amountnumberUsually (present for most inputs)
vendor_vatstringUsually (present for most inputs)
vendor_namestringUsually (present for most inputs)
invoice_datestringUsually (present for most inputs)
total_amountnumberUsually (present for most inputs)
invoice_numberstringUsually (present for most inputs)
payment_referencestringUsually (present for most inputs)

How to call it

The same tool through each route. MCP clients reach it through Strale’s server at https://api.strale.io/mcp; the call below is what the agent sends.

# Needs an API key. max_price_cents caps what this call may cost.
curl -X POST https://api.strale.io/v1/do \
  -H "Authorization: Bearer $STRALE_API_KEY" \
  -H 'Content-Type: application/json' \
  -d '{
    "capability_slug": "invoice-extract",
    "inputs": {
      "url": "https://httpbin.org/image/jpeg"
    },
    "max_price_cents": 50
  }'

Limitations

  • Handwritten or unusual layouts reduce accuracy

    Best results with standard invoice layouts — handwritten invoices or heavily stylised designs may have lower accuracy

    What to do instead: For non-standard formats, use pdf-extract for raw text and apply custom parsing rules

  • Extracted totals and tax figures need checking

    AI extraction from invoice documents — line item totals and tax calculations should be verified against source

    What to do instead: Validate that extracted line items sum to the total amount and cross-check VAT calculations before booking

  • Input documents are limited to 8 MiB decoded

    Documents supplied by URL or base64 are refused above 8 MiB of decoded data, with a caller_input error naming the input field and no charge. Reduce the document size or split it before submitting.

Bundled checks that include it