Receipt Categorisation

Read a receipt and file it: supplier, date, amount, tax, currency, expense category and line items, ready for an expense report.

Pay by wallet (x402) AI-generated receipt-categorize

Example

Example answer
{
  "date": null,
  "category": "groceries",
  "currency": "USD",
  "subtotal": 6.48,
  "line_items": [
    {
      "amount": 2.99,
      "quantity": null,
      "unit_price": null,
      "description": "Milk"
    },
    {
      "amount": 3.49,
      "quantity": null,
      "unit_price": null,
      "description": "Bread"
    }
  ],
  "tax_amount": null,
  "tip_amount": null,
  "vendor_name": "Grocery store",
  "total_amount": 6.48,
  "card_last_four": null,
  "payment_method": null,
  "expense_report_fields": {
    "date": null,
    "amount": 6.48,
    "vendor": "Grocery store",
    "category": "groceries",
    "currency": "USD",
    "description": "Grocery store - Milk, Bread"
  }
}

Inputs

FieldTypeRequiredWhat it is
textstringNo—
base64stringNo—
image_urlstringNo—

Output fields

How reliably each field appears in a successful answer.

FieldTypeAppears
categorystringAlways (present in every successful answer)
currencystringAlways (present in every successful answer)
line_itemsarrayAlways (present in every successful answer)
vendor_namestringAlways (present in every successful answer)
total_amountnumberAlways (present in every successful answer)

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": "receipt-categorize",
    "inputs": {
      "text": "Starbucks Coffee\nDate: 2024-01-15\nCaffe Latte x1 $5.50\nTotal: $5.50\nVisa ending 4242"
    },
    "max_price_cents": 5
  }'

Limitations

  • Unusual or mixed purchases can be miscategorised

    AI categorisation based on merchant name and amount — unusual merchants or multi-category purchases may be miscategorised

    What to do instead: Provide your chart of accounts or category taxonomy in the input for more accurate categorisation

  • Input images are limited to 4 MiB decoded

    Images supplied by URL or base64 are refused above 4 MiB of decoded data, with a caller_input error naming the input field and no charge. Resize or compress the image before submitting.

Related tools