ledgerlens
v0.1.0
Published
LedgerLens SDK - Document Intelligence API with math verification
Maintainers
Readme
LedgerLens SDK
The official TypeScript/JavaScript SDK for LedgerLens - Document Intelligence API with math verification.
Installation
npm install ledgerlensQuick Start
import { LedgerLens } from "ledgerlens";
const client = new LedgerLens({
apiKey: "ll_sk_...",
});
// Extract data from an invoice
const result = await client.extract.extract({
file: fs.createReadStream("invoice.pdf"),
documentType: "invoice",
});
console.log(result.data);
// {
// vendor: "Acme Corp",
// total: 1234.56,
// line_items: [...],
// math_verified: true
// }Features
- Multi-document support: invoices, receipts, purchase orders, bills of lading, bank statements
- Custom schemas: Extract any fields you define
- Math verification: Reflexion loop ensures calculations are correct
- TypeScript-first: Full type definitions included
Documentation
See the full documentation at ledgerlens.docs.buildwithfern.com
License
MIT
