GuidesProcess invoices at scale

Process invoices at scale

⚠️
Preview — this feature is being built; the design below is the spec.

Turn a month of supplier invoices (PDFs and scans) into validated rows for your accounting system, overnight and at the batch price.

Architecture

  1. Upload each invoice with the Files API.
  2. Build a batch with one request per invoice: the file as a file part plus a strict JSON schema for the fields you need.
  3. When batch.completed arrives, stream the results and validate each row in code.
  4. Send rows that pass to your ledger; queue rows that fail validation for a person.

The schema

Ask only for what is printed: supplier, invoice number, dates, currency, line items, tax and total as decimal strings, and null where something is absent. Do not ask the model to compute totals.

Validation in code

CheckAction on failure
Line items sum to the net total (±0.01)Review
Net + tax = grossReview
Supplier matches a known vendorReview; may be a new supplier
Invoice number already bookedReject as duplicate
Currency matches the vendor’s usual currencyReview

Arithmetic and lookups belong in code, where they are exact and free.

Model choice

Start with Amara Quick. Run 100 invoices you already booked through both Amara Quick and Amara S1.2 as an evaluation with a json_schema grader plus field-level exact-match graders, and move up only if Quick’s field accuracy is not good enough.

Cost control

Batch pricing halves token cost. Scanned pages cost more than born-digital text; for digital PDFs, extract text yourself and send text. Delete result files once rows are stored.

Was this page helpful?