Use cases· Last updated

Invoice input contracts with Jev

Pixels never go to System One. An OCR or vendor extractor turns the PDF into strings; Jev then asks whether that text packet looks like a duplicate, a PO mismatch, or a complete AP file. Code posts to the ERP. Jev does not key invoices.

This unofficial page is the input contracts slice of the invoice AP decisions pack. Intent: apply the Jev (TypeSafe System One) decision model to invoice AP decisions input contracts. Primary search language: Invoice Jev input contracts. Confirm patterns on docs.typesafe.ai. This site does not sell, issue, or proxy TypeSafe keys. Use a credential you already have from the console or a documented gateway.

Independent angle (cover ≠ clone): OCR extracts; Jev judges already-extracted text (duplicate/vendor/PO language). Amounts and dates stay in code — not a clone of invoice-OCR IA or a rival AP-recipe page.

Invoice use-case context

An input contract is the allow-list of fields you will ever POST for invoice AP decisions. It is a decision contract for the extracted invoice packet + PO text: if a field is not named in instructions, it should not be in state. That is how you beat noisy “dump the object” integrations — the rival-intent failure mode — without cloning anyone’s IA.

Hub: Use cases. Compare, when the other tool is the real job: invoice OCR.

Input Contracts inputs

Documented System One inputs: state (string, object, or array of text) and a questions map. English is the primary training language. Images, audio, and video are not accepted.

Allow for invoice AP decisions:

{
  "invoice": { "id": "INV-1044", "vendor_name": "Northwind Paper LLC", "memo": "Q3 copier paper — matches PO 88." },
  "po": { "id": "PO-88", "vendor_name": "Northwind Paper" },
  "extract": { "amount_cents": 128500, "invoice_date": "2026-03-12" },
  "policy": { "duplicate": "Same vendor + same amount_cents within 14 days is a duplicate suspect." }
}

Bind paths: invoice.memo, invoice.vendor_name, po.vendor_name, policy.duplicate.

Refuse at the wrapper (do not send):

TypeSafe’s published list price for jev-1.13 is $0.042 per million input tokens (vendor claim — confirm on the models page); output tokens are free on that same page. Unused distractors still bill as input.

Decision signals and actions

The contract exists so each primitive stays atomic:

Id Type Job
same_vendor Noul Do invoice.vendor_name and po.vendor_name look like the same entity?
packet_complete Score How complete is the AP narrative vs policy (missing PO / missing memo)?
disposition Choice route_match / hold_mismatch / duplicate_suspect / other

If a new CRM field appears, either add a question that names it or drop it. Do not “just include it.” Do not treat a Noul of 0.5 as a “medium” invoice AP decisions score — it means yes and no are equally likely. Conjunctions stay in your code.

Guardrails and escalation

Contracts are a guardrail: missing required text → do not call Jev (or ask a Noul “is enough information present?”). That is cheaper than a confident wrong same_vendor. TypeSafe’s confidence-gated examples use a lower bar for recoverable reads than for irreversible actions. Those numbers are illustrations. For invoice AP decisions, treat post_to_erp as the high bar (posting an invoice to the ERP). Tune on labels — see offline evaluation.

Evaluation and rollout notes

Version the contract (field list + criteria git SHA) next to the pinned model. Replay route_match / hold / duplicate gold from AP clerks, plus same-vendor gold when either changes. Pin jev-1.13.0 (the versioned id) after you fit thresholds. jev-latest and the marketing line jev-1.13 can move. Log the response model. TypeSafe’s published list price for jev-1.13 is $0.042 per million input tokens (vendor claim — confirm on the models page); output tokens are free on that same page. Unused distractors still bill as input.

Official Python and JavaScript SDKs read TYPESAFE_API_KEY and retry documented 429/529. This site does not sell, issue, or proxy TypeSafe keys. Use a credential you already have from the console or a documented gateway.

Pack map

Slice Page
Graph and primitives decision workflow
What may enter state you are here
What to gather first evidence collection
Atomic rules policy checks
Act / review / abstain confidence thresholds
Reviewer payload human handoff
What to persist audit trail
How it breaks failure modes
Labeled replay evaluation
Shadow → canary production rollout

FAQ

What happens if I send the whole warehouse row? jev-1.13 loses accuracy as distractors grow (official jaggedness note). Drop the PDF / TIFF bytes (not accepted). TypeSafe’s published list price for jev-1.13 is $0.042 per million input tokens (vendor claim — confirm on the models page); output tokens are free on that same page. Unused distractors still bill as input.

Can I send images of the artifact? No. State is text (string, object, or array of text). Transcribe first.

Where is the rest of the Invoice pack? Start with Invoice decision workflow and Invoice evidence collection. Cluster hub: Use cases.

Can we skip OCR and send the PDF? No. Official models page: no image input. Extract first. See Jev vs invoice OCR.

Should Jev decide if $1,285.00 matches the PO? No. Compare cents in code. Jev judges leftover language (vendor strings, memos).

What this page does not claim

Disclaimer

This is an independent unofficial site and is not affiliated with TypeSafe AI; official documentation is available at https://docs.typesafe.ai.

Primary documentation: https://docs.typesafe.ai. Hub: Use cases.

Sources

Public TypeSafe or adjacent documentation only. No private claims.