Extract invoice data to JSON with an LLM, with zero data retention
An agent turns invoice text into structured JSON and checks that the totals add up. The run keeps nothing afterwards.
- Files
- Zero data retention
- Budget cap
Watch a real run
A real run on Oct 7, 2026, replayed. Model: openai/gpt-6-luna.
- Queuedbudget $0.03 reserved
- MicroVMmicroVM ready
- MicroVMworker started · shell off · web off
- File
read invoice.txt - MicroVMmicroVM destroyed
- Succeeded2 model calls, 2,304 tokensRecorded output (English)
{ "vendor": "Fjord Supplies AS", "invoice_number": "FS-2026-0417", "invoice_date": "2026-09-30", "due_date": "2026-10-30", "currency": "EUR", "line_items": [ { "description": "Organic flour 25 kg", "quantity": 8, "unit_price": 31.5, "amount": 252 }, { "description": "Sunflower oil 10 l", "quantity": 5, "unit_price": 24, "amount": 120 }, { "description": "Delivery (pallet)", "quantity": 1, "unit_price": 45, "amount": 45 } ], "subtotal": 417, "tax": 104.25, "total": 531.25, "checks": { "line_items_sum_matches_subtotal": true, "subtotal_plus_tax_matches_total": false, "notes": "Subtotal plus VAT is 521.25, which is 10.00 less than the printed total of 531.25." } } - Worker destroyed$0.003496 charged, $0.026504 released
Zero data retention was on for this run.
Run it yourself
Open the sample in the playground with the whole request filled in. It runs on your own account, within the budget shown, against the same read-only sample systems.
Budget for this sample: $0.03
How it works
Invoices carry names, addresses and bank details, so this run uses zero data retention. The agent returns vendor, number, dates, line items and totals as JSON, and flags the invoice when the arithmetic does not match. For scanned documents, run OCR first and pass the text.
What the agent can and cannot do
The permissions are part of the request. Anything not listed here is not available to the run.
| Setting | Allowed |
|---|---|
| Connections | None |
| Web | Off |
| Shell | Off |
| Files | invoice.txt (read-only) |
| Zero data retention | On: no trace is recorded and the output is returned once |
| Budget | $0.03, a hard cap |
| Timeout | 60 seconds |
Credentials never enter the machine: a broker adds them to each call and enforces the methods above.
The code
This is the exact request the sample sends. Set EPHEMERAL_API_KEY to a member key of your organization.
curl -X POST $EPHEMERAL_URL/v1/runs \
-H "Authorization: Bearer $EPHEMERAL_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: $(uuidgen)" \
-d @request.jsonFiles in the request
Passed inline, so nothing is uploaded first. The agent sees each one as a read-only file.
invoice.txt
INVOICE
Fjord Supplies AS
Storgata 12, 0155 Oslo, Norway
VAT no: NO 123 456 789 MVA
Invoice number: FS-2026-0417
Invoice date: 2026-09-30
Due date: 2026-10-30
Bill to: Example Bakery Ltd, 5 High Street, London
Description Qty Unit price (EUR) Amount (EUR)
Organic flour 25 kg 8 31.50 252.00
Sunflower oil 10 l 5 24.00 120.00
Delivery (pallet) 1 45.00 45.00
Subtotal 417.00
VAT 25% 104.25
Total due 531.25
Payment: bank transfer, IBAN NO93 8601 1117 947, reference FS-2026-0417
Full request body request.json
The same body, with the files inline.
{
"prompt": "Extract the invoice in invoice.txt. Reply with one JSON object and nothing else: {\"vendor\": string, \"invoice_number\": string, \"invoice_date\": \"YYYY-MM-DD\", \"due_date\": \"YYYY-MM-DD\", \"currency\": string, \"line_items\": [{\"description\": string, \"quantity\": number, \"unit_price\": number, \"amount\": number}], \"subtotal\": number, \"tax\": number, \"total\": number, \"checks\": {\"line_items_sum_matches_subtotal\": boolean, \"subtotal_plus_tax_matches_total\": boolean, \"notes\": string}}. Copy numbers exactly as printed, then do the arithmetic for the checks. Use null for any field the document does not show.",
"files": [
{
"path": "invoice.txt",
"content": "INVOICE\n\nFjord Supplies AS\nStorgata 12, 0155 Oslo, Norway\nVAT no: NO 123 456 789 MVA\n\nInvoice number: FS-2026-0417\nInvoice date: 2026-09-30\nDue date: 2026-10-30\nBill to: Example Bakery Ltd, 5 High Street, London\n\nDescription Qty Unit price (EUR) Amount (EUR)\nOrganic flour 25 kg 8 31.50 252.00\nSunflower oil 10 l 5 24.00 120.00\nDelivery (pallet) 1 45.00 45.00\n\nSubtotal 417.00\nVAT 25% 104.25\nTotal due 531.25\n\nPayment: bank transfer, IBAN NO93 8601 1117 947, reference FS-2026-0417\n"
}
],
"shell": false,
"timeout_seconds": 60,
"max_cost_micros": 30000,
"zero_data_retention": true
}