Receipt Categorisation
Read a receipt and file it: supplier, date, amount, tax, currency, expense category and line items, ready for an expense report.
receipt-categorize Example
{
"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
| Field | Type | Required | What it is |
|---|---|---|---|
text | string | No | — |
base64 | string | No | — |
image_url | string | No | — |
Output fields
How reliably each field appears in a successful answer.
| Field | Type | Appears |
|---|---|---|
category | string | Always (present in every successful answer) |
currency | string | Always (present in every successful answer) |
line_items | array | Always (present in every successful answer) |
vendor_name | string | Always (present in every successful answer) |
total_amount | number | Always (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
}' {
"tool": "strale_execute",
"arguments": {
"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
}
} import { Strale } from "straleio";
const strale = new Strale({ apiKey: process.env.STRALE_API_KEY! });
const result = await strale.do({
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,
}); import os
from straleio import Strale, DoRequest
strale = Strale(api_key=os.environ["STRALE_API_KEY"])
result = strale.do(DoRequest(
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,
)) # No account. The first request answers 402 with the price in USDC;
# an x402 client pays it from your wallet and repeats the request.
curl -i 'https://api.strale.io/x402/v2/receipt-categorize?text=Starbucks+Coffee%0ADate%3A+2024-01-15%0ACaffe+Latte+x1+%245.50%0ATotal%3A+%245.50%0AVisa+ending+4242' 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
- Contract Extraction €0.50
- CV Parser €0.30
- Meeting Notes Extraction €0.20