LedgerLens SDK - Document Intelligence API with math verification
npm install ledgerlensThe official TypeScript/JavaScript SDK for LedgerLens - Document Intelligence API with math verification.
``bash`
npm install ledgerlens
`typescript
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
// }
``
- 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
See the full documentation at ledgerlens.docs.buildwithfern.com
MIT