Skip to main content

Installation

  • parsefy: Parsefy SDK for document extraction
  • zod: TypeScript-first schema validation library

Quick example

Try this simple example with a receipt. Download the sample receipt
To get your API key, join the waitlist.

Setup

Set your API key as an environment variable:

Extract your first document

Required vs Optional Fields

All fields are required by default. Required fields that return null or fall below confidenceThreshold trigger the expensive fallback model (Tier 2).
Rule of thumb: Mark fields as .optional() if they might be missing in >20% of your documents.

Confidence Threshold

Control when the fallback model is triggered:

Next steps

Next.js

Build with Next.js App Router

Express

Create REST APIs with Express

Fastify

High-performance APIs

Hono

Edge-ready applications