Skip to main content
This example reads a receipt photo or scan and returns the merchant, the totals, the item count and how the purchase was paid. An enum field pins the payment method to a fixed set of names, and a boolean flags alcohol for expense policies.
The photo
What comes back
store_name97%
total_amount98%
payment_method95%
contains_alcohol92%
tax_amount
NodesParse → ExtractCredits60 per pageYou get

The workflow

Run it and read the result

Send the photo as the files field. JPG, PNG and PDF all work. Poll the run until its status is processed.

Response

The results envelope of a processed run, trimmed. Every value is a string on the wire, including booleans ("True" / "False") and numbers. A field the model could not find comes back with value: null and confidence: null, as tax_amount does on this receipt.
Response
Every field also carries verification_status and value_override. Runs and results has the full envelope, section by section.

When it goes wrong

The tax line comes back null. Faded thermal paper loses the tax line before it loses the total. A field the model cannot find returns value: null and confidence: null, which means “not on the receipt”, not zero. Treat it as missing, and do not default it to 0 before someone has looked. A boolean branch never fires. contains_alcohol arrives as the string "True" or "False", like every other value on the wire. if (row.contains_alcohol) is true for both. Compare against the string, or cast it, before you branch. The payment method comes back empty. An enum constrains the output to the option names you declared, so a receipt paid a way you did not list has nothing to match. That is what stops “Visa”, “credit card” and “CC” arriving as three different values. Add the missing option to enum_options, or use a string field when the set is open. A crumpled photo drags every field down. Extract reads the parse, so a shadowed or creased receipt costs you twice. Capture flat and lit, and prefer PNG over a heavily compressed JPG where you control the capture. For a batch that stays bad, move the Parse node to the agentic tier (100 credits per page), which is the tier for low-quality inputs. One threshold flags the wrong fields. This receipt returned total_amount at 98% and contains_alcohol at 92%, and the two do not deserve the same gate. Set the threshold per field: the amount is worth a human look, the flag usually is not.

Next steps

Runs and results

The results envelope and the run status model

Errors

Rate limits, idempotency and retries