Skip to content
Jev | typesafeAPI & Playground
…

Use Cases / document-classification

Document page classification

Tax packets, invoices, and statements arrive as pages. A generative model can name a form, but the label is prose, and a wrong file still costs a person later.

Try a related template free on this host — 5 anonymous real-API runs with no signup — then ship the same schema with a prepaid jv_live_ key. See is Jev free? and playground.

Why Jev

One decide call returns a document type from a list you own, plus a score you can threshold. A public tax-page project reported about $0.001 per page against a much larger LLM classifier. That figure is theirs, not a measurement from this host. Prepaid packs on this site meter the same decide call.

How to define the decision

Put the extracted page text in state and the allowed types in Choice criteria, including an other bucket. Ask a separate Noul for whether a person should review the page. Act only when the Choice confidence clears your gate.

When to use Jev

  • Routing a page into a known catalog of form types
  • Sending low-confidence pages to a person before filing
  • Replacing a prompt that asks a chat model to print a label

When not to use Jev

  • Reading amounts, dates, or line items out of the page
  • Filing a return or deciding tax treatment
  • Inventing a type that is not in your criteria list

Failure modes and human fallback

  • Upstream or network errors: retry with backoff; do not invent a decision.
  • Low confidence: route to a human queue or safer default — never auto-act on money/destructive tools.
  • Schema drift: keep a golden fixture set in CI so label changes fail the build before production.
  • This page does not claim the published tax-corpus accuracy. Read the upstream project for its own eval.
  • OCR and field extraction stay in your pipeline.
  • A typed label is not a tax, legal, or compliance determination.

API example

Same prepaid jv_live_ balance as tools. Output tokens are free on this host's metering model.

curl
curl https://jevtypesafe.org/api/v1/decide \
  -H "Authorization: Bearer jv_live_YOUR_KEY_HERE" \
  -H "Content-Type: application/json" \
  -d '{"state":"Page text: Form W-2 Wage and Tax Statement. Employer ACME Payroll. Wages, tips, other compensation. Federal income tax withheld.","questions":{"doc_type":{"type":"choice","instructions":"Which document type matches this page? Use other if none fit.","criteria":{"w2":"US Form W-2 wage and tax statement","1099-nec":"US Form 1099-NEC","invoice":"commercial invoice","other":"none of the types above"}},"needs_review":{"type":"noul","instructions":"Should a person review this page before it is filed?"}}}'

FAQ

Does this host classify IRS forms for me?
No. You send page text and your own type list to POST /api/v1/decide. Buy a prepaid pack, then call it with a jv_live_ key.
Where does the $0.001 per page number come from?
A public tax-document classifier README. This host has not re-run that corpus. Your cost is the prepaid input-token rate on /pricing/.

Related use cases

Ready to build?

Free anonymous tool runs, then prepaid packs and a jv_live_ key — independent host, not affiliated with TypeSafe AI.

Document Classification API with Jev | Page Type and Review Gate