1. Data source
  2. Decision schema
  3. Model inference
  4. Structured result
2 Decision schema 3 typed questions
  • payment_actionchoicepayverify_vendorhuman_reviewreject
  • fraud_riskscorelowmediumhigh
  • needs_humannoulprobability 0–1

3 Model inference typesafe/jev-1.13

Waiting for a run.

4 Structured result

Run the demo to see the JSON answers, the highlighted pick and the final action.

Call Jev yourselfSame data and schema, straight to Flatkey. Set FLATKEY_API_KEY and run.
curl -sS https://router.flatkey.ai/api/alpha/decisions \
  -H "Authorization: Bearer $FLATKEY_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "model": "typesafe/jev-1.13",
  "state": "Invoice INV-20931 from Northwind Supplies — $48,600.00, due in 3 days\nPO-7781 match: amount OK, qty OK, goods receipt posted\nDuplicate check: no exact match; INV-2093 for $48,600.00 paid 41 days ago\nVendor master: bank account changed 2 days ago via emailed request (new bank, new country)\nEmail note: \"Please pay to the new account urgently, our old bank is closing.\"\nPolicy: bank-detail change in last 30 days requires call-back verification; possible duplicates go to AP review.\nTask: typed payment decision — pay / verify_vendor / human_review / reject (+ fraud_risk, needs_human).",
  "questions": {
    "payment_action": {
      "type": "choice",
      "instructions": "Decide what accounts payable should do with this invoice before any payment is released. Use only the invoice, matching results, payment history and vendor master facts provided.",
      "criteria": {
        "pay": "Clean match to PO/receipt, no duplicate signal, vendor bank details unchanged; safe to include in the payment run",
        "verify_vendor": "Payment looks legitimate but vendor bank details or remit-to changed recently; confirm by call-back to a known contact before paying",
        "human_review": "Possible duplicate, PO/amount mismatch, or policy exception (no PO, over threshold); an AP analyst must review",
        "reject": "Clear duplicate of a paid invoice, unknown vendor, or strong fraud signals; do not pay"
      }
    },
    "fraud_risk": {
      "type": "score",
      "instructions": "How likely is this invoice or payment request to be fraudulent or a duplicate, based on bank-detail changes, duplicate signals, urgency pressure and matching gaps.",
      "criteria": [
        "low",
        "medium",
        "high"
      ]
    },
    "needs_human": {
      "type": "noul",
      "instructions": "A human in AP or finance must approve before this payment is released."
    }
  }
}'

No Flatkey key yet? Get one for Jev 1.13 →

Run with real Jev

Sign in and connect a key

  1. Sign in with Google.
  2. Connect your Flatkey or OpenRouter key on the next screen. Get a Flatkey key for Jev 1.13.
  3. Come straight back here and press Run again.

This site is for researching, sharing and cataloguing Jev use cases. Your key is only there to make trying Jev convenient: it is stored encrypted, used only for runs you trigger, never used for anything else, and you can delete it anytime.

About this use case

Use Jev for AP invoice fraud gates: incoming state, Jev decision, routed outcome

Who / when

Audience

  • finance and AP teams automating invoice approval without letting a chatbot move money
  • controllers and CFOs who want confidence thresholds that route uncertain payments to humans
  • builders wiring ERP, OCR or email intake into a payment run with a typed fraud gate

Triggers

  • an invoice looks like a duplicate of one already paid (same vendor, amount or number variant)
  • payment-to-invoice or PO matching is off on amount, quantity or terms
  • a vendor's bank details changed recently, especially via an email request
  • a policy exception (no PO, over threshold, new vendor) needs a typed route instead of prose

The workflow

  1. 01
    Invoice + contextPO, history, vendor masterInput
  2. 02
    Score fraud risklow / medium / highJev
  3. 03
    Payment decisionpay / verify / review / rejectJev
  4. 04
    AP gatePay, call back, hold, or rejectYour code

Question shape

{
  "payment_action": {
    "type": "choice",
    "instructions": "Decide what accounts payable should do with this invoice before any payment is released. Use only the invoice, matching results, payment history and vendor master facts provided.",
    "criteria": {
      "pay": "Clean match to PO/receipt, no duplicate signal, vendor bank details unchanged; safe to include in the payment run",
      "verify_vendor": "Payment looks legitimate but vendor bank details or remit-to changed recently; confirm by call-back to a known contact before paying",
      "human_review": "Possible duplicate, PO/amount mismatch, or policy exception (no PO, over threshold); an AP analyst must review",
      "reject": "Clear duplicate of a paid invoice, unknown vendor, or strong fraud signals; do not pay"
    }
  },
  "fraud_risk": {
    "type": "score",
    "instructions": "How likely is this invoice or payment request to be fraudulent or a duplicate, based on bank-detail changes, duplicate signals, urgency pressure and matching gaps.",
    "criteria": [
      "low",
      "medium",
      "high"
    ]
  },
  "needs_human": {
    "type": "noul",
    "instructions": "A human in AP or finance must approve before this payment is released."
  }
}

Gate policy

≥ 0.90

Auto-pay only when payment_action is pay, fraud_risk is low and needs_human is false. Auto-reject a high-confidence duplicate and log it.

0.65–0.90

Hold the payment: verify_vendor triggers a call-back to a known contact; anything else goes to the AP review queue. No auto-pay.

< 0.65

Block release and escalate to a finance approver, especially when fraud_risk is high or bank details changed.

Failure modes

Pre-launch checks before you trust auto-routing:

  • Asking a chatbot "should we pay this?" and parsing a paragraph inside the payment run;
  • Auto-paying because the PO match is clean while the vendor bank account changed by email two days ago;
  • Missing near-duplicates (INV-2093 vs INV-20931) because only exact invoice numbers are compared;
  • Letting urgency language ("pay today", "old bank is closing") lower the bar instead of raising risk;
  • Using one global threshold instead of holding mid-confidence payments for review;
Keep exact work in code: three-way match arithmetic, exact duplicate keys, approval limits, the 30-day bank-change rule and who can release funds stay deterministic. Use Jev for the judgment calls—near-duplicates, suspicious change requests, policy exceptions—and let the gate bands decide what auto-pays.

FAQ

Why use a typed decision model for AP instead of an LLM chat?

Payments are high-stakes actions. A typed Choice (pay / verify_vendor / human_review / reject) with calibrated probabilities lets your AP code auto-pay only clean invoices and route everything uncertain to a person, instead of trusting free-form prose that can sound confident while being wrong.

How should the confidence bands map to AP actions?

Auto-pay only on high-confidence pay with low fraud_risk and needs_human false. Mid confidence holds the payment: call back the vendor on a known number for bank changes, otherwise queue for AP review. Low confidence or high fraud_risk blocks release and escalates to a finance approver.

Does Jev replace three-way matching or duplicate checks?

No. Keep exact PO / receipt / invoice matching and exact duplicate keys in code or your ERP. Jev adds judgment on the fuzzy cases those rules miss: near-duplicate invoice numbers, suspicious bank-detail change requests, urgency pressure and policy exceptions.

Can I bring my own API key?

Yes. Try the free demo above without signing in. To run it live on your own text, sign in with Google and connect a Flatkey or OpenRouter key (a quick test call runs when you save it). Manage or delete it anytime under Dashboard → BYOK. Keys are stored encrypted on the server, used only for runs you trigger, and never sent back to the browser. Need a Flatkey key? Get one for Jev 1.13 on Flatkey.

Is this the official TypeSafe Jev product page?

No. jev-llm.com is an independent research and practice site. Verify pricing, models and terms at the original TypeSafe sources.

Sources

Seen on X
Independent-site note: jev-llm.com is an independent research and practice site. It is not the TypeSafe AI official site. Verify models, pricing and terms at the original source.