Skip to main content

Receipt OCR

Snap a crumpled receipt — get merchant, items, totals, and tax as clean data for your books. See real use cases →

25 sats· per pageNo account · no cardAgents: MCP · L402
25 Sats/page

Receipt & invoice OCR that returns structured JSON

Snap a crumpled receipt or drop in a supplier invoice, and get clean, structured data back — merchant, line items, tax, and total — ready for your books, a spreadsheet, or the next step in an AI pipeline. No retyping, no manual entry.

A dual-model pipeline (Mistral OCR reads the document, an AI model structures it) turns messy paper into typed JSON. Pay 25 sats per page in Bitcoin Lightning — no account, no credit card, no API key, and nothing stored after your session.

From receipt to JSON in one call

This is the exact shape you get back — every field typed and ready to parse.

A typical receipt
BLUE BOTTLE COFFEE
66 Mint St, San Francisco
1× Cappuccino5.25
2× Almond croissant8.00
Subtotal13.25
Tax (8.5%)1.18
Tip2.50
Total16.93
Visa ****4242 · 2026-07-18 08:42
receipt.json
{
  "merchant": {
    "name": "Blue Bottle Coffee",
    "address": "66 Mint St, San Francisco, CA 94103",
    "phone": "+1 415-555-0134"
  },
  "date": "2026-07-18",
  "time": "08:42",
  "items": [
    { "description": "Cappuccino",       "quantity": 1, "unitPrice": 5.25, "total": 5.25 },
    { "description": "Almond croissant", "quantity": 2, "unitPrice": 4.00, "total": 8.00 }
  ],
  "subtotal": 13.25,
  "tax": 1.18,
  "taxRate": "8.5%",
  "tip": 2.50,
  "total": 16.93,
  "currency": "USD",
  "paymentMethod": "Visa ****4242",
  "invoiceNumber": null,
  "category": "meals"
}

What gets extracted

Merchant
Name, address, phone, website
Line items
Description, quantity, unit price, line total
Totals
Subtotal, tax + rate, tip, grand total
Metadata
Date, time, invoice number, payment method, currency, expense category
29+ languages PDF, JPEG, PNG, WebP, TIFF, BMP Nothing stored after your session

For developers & AI agents

Extract structured data from invoices straight from your code — no API key, no dashboard. Pay per request over L402, or wire it into an agent over MCP.

L402 request
# 1. Request without payment — get a Lightning invoice back (HTTP 402)
curl -X POST https://sats4ai.com/api/l402/extract-receipt \
  -H "Content-Type: application/json" \
  -d '{"document":"<base64 image or PDF>"}'

# 2. Pay the invoice, then retry with the L402 token:
#    Authorization: L402 <macaroon>:<preimage>
# -> returns the structured JSON above. No API key, no account.

Frequently asked questions

How do I extract structured data from a receipt or invoice?

Upload a photo, scan, or PDF of the receipt or invoice and pay 25 sats per page in Bitcoin Lightning. You get back clean JSON — merchant, date, line items, tax, total, currency, and expense category — ready to drop into your books, a spreadsheet, or another AI.

Can I get the receipt data as JSON?

Yes. The output is structured JSON with typed fields: merchant (name, address, phone), date and time, an items array (description, quantity, unit price, total), subtotal, tax and tax rate, tip, total, currency, payment method, invoice number, and expense category. Copy it from the page or call the API to receive it directly.

Does it work on invoices, not just receipts?

Yes. It handles supplier invoices, itemised bills, and store receipts — printed, scanned, or crumpled and faded. Multi-page PDF invoices are processed page by page.

Can I process many receipts at once?

Yes. Upload up to 10 receipts or invoices in one batch, pay once, and download every result together — as a CSV (one row per receipt, ready for a spreadsheet or your accounting software) or a single JSON array. If a document cannot be read, only that one is refunded; you keep the rest.

What file formats and languages are supported?

PDF (multi-page), JPEG, PNG, WebP, TIFF, BMP, and GIF, up to 50MB. Powered by Mistral OCR, it reads 29+ languages including Latin, Cyrillic, and CJK scripts.

Do I need an account or API key?

No. There is no signup, no account, and no API key. You pay per page in Bitcoin Lightning — over the web with any wallet, or programmatically over L402 where the invoice is attached to the request itself.

What if the document is not actually a receipt?

The extractor will still try. Fed a non-receipt, it returns best-guess fields rather than an error, so confirm the input really is a receipt or invoice before trusting the values.

Can an AI agent call it automatically?

Yes. It is available over L402 (HTTP with a Lightning-authenticated 402 challenge, no API key) and as the extract-receipt tool on the Sats4AI MCP server, so agents like Claude and Cursor can extract receipt data without human steps.

Receipt & Invoice Data Extraction (OCR to JSON) | Sats4AI