Your agent's
financial analyst.
One API call. Any Indian financial document in, structured JSON out. Bank statements, CAS, salary slips, ITR, CIBIL, GST — validated and agent-ready.
100 free extractions / month · No credit card · Setup in 30 seconds
| 1 | curl -X POST https://lekhadev.com/api/v1/extract \ |
| 2 | -H "x-api-key: lk_live_..." \ |
| 3 | -d '{ "document": "<base64>", "type": "auto" }' |
| 1 | { |
| 2 | "document_type": "bank_statement", |
| 3 | "institution": "HDFC Bank", |
| 4 | "confidence": 0.96, |
| 5 | "data": { |
| 6 | "account": { |
| 7 | "holder_name": "Rajesh Kumar", |
| 8 | "account_number": "XXXX1234", |
| 9 | "ifsc": "HDFC0001234" |
| 10 | }, |
| 11 | "summary": { |
| 12 | "opening_balance": 145000, |
| 13 | "closing_balance": 198500, |
| 14 | "total_credits": 320000 |
| 15 | }, |
| 16 | "transactions": [{ |
| 17 | "date": "2026-03-01", |
| 18 | "description": "NEFT CR ACME CORP", |
| 19 | "credit": 85000, |
| 20 | "balance": 230000, |
| 21 | "category": "salary" |
| 22 | }] |
| 23 | } |
| 24 | } |
Works with 28 Indian banks and financial institutions
How it works
Send Document
→Base64-encoded PDF, PNG, or JPEG. Any Indian bank format.
AI Extraction
→Vision AI classifies and extracts every field. 28 bank layouts handled.
Structured JSON
Typed data with account details, transactions, validation, confidence.
Built for Bharat.
For agent builders who ship.
Purpose-built to extract structured data from Indian financial documents — bank statements, ITR forms, CIBIL reports, and more. Every bank format, every edge case, every lakh and crore.
Every Indian financial document
Bank statements, CAS reports, salary slips, ITR forms, CIBIL reports, GST invoices. HDFC, SBI, ICICI, Axis, CAMS, KFintech — 28 banks and growing.
Validated, not just extracted
Balance reconciliation, sum checks, sequential consistency. Every response tells you exactly what's wrong.
Drop into any agent
Ships with tool definitions for Claude, OpenAI, LangChain, and Vercel AI SDK. One import and your agent reads financial documents.
Nothing stored. Ever.
Documents processed in memory and discarded. No storage. No logs. No retention. Your users' data never leaves the pipeline. DPDP Act compliant by design.
Trust signals on every field
Confidence scores let your agent decide — act on high-confidence data, flag low-confidence for human review.
Deploy on your infrastructure
Run Lekhā on-prem with Docker. Bring your own Anthropic key, PostgreSQL database, and full data sovereignty. One command to start.
Hindi document support
PSU bank statements in Devanagari? No problem. Auto-detects Hindi, translates banking terms, converts Hindi numerals — outputs clean English JSON.
Three lines to
structured data.
No SDK required — just HTTP. But the SDK gives you types, auto-retry, and one-line agent integration.
bun add @lekha-dev/sdk
Zero dependencies. Native fetch.
Auto document detection
Pass type: "auto" — we classify it for you.
Full TypeScript types
Every document format, every field, fully typed.
| 1 | import { Lekha } from "@lekha-dev/sdk"; |
| 2 | import fs from "fs"; |
| 3 | |
| 4 | const lekha = new Lekha("lk_live_..."); |
| 5 | |
| 6 | const result = await lekha.extract({ |
| 7 | document: fs.readFileSync("statement.pdf"), |
| 8 | type: "auto", |
| 9 | }); |
| 10 | |
| 11 | // result.data.transactions |
| 12 | // result.data.summary.closing_balance |
| 13 | // result.validation.balance_reconciled |
What agents build
with Lekhā.
From lending to tax filing — developers use Lekhā to give their AI agents the ability to read and reason over Indian financial documents.
Instant Loan Underwriting
Agent collects bank statement + salary slip + CIBIL report — checks income, credit score, DTI ratio — approves in 60 seconds.
Automated Tax Filing
Agent ingests Form 16 + Form 26AS + salary slips — reconciles TDS, calculates deductions, auto-fills ITR.
Wealth Advisory Agent
Agent reads CAS report + bank statements — analyzes portfolio, spending patterns, recommends rebalancing.
GST Compliance Agent
Agent processes GST invoices + GST returns — reconciles input tax credits, flags mismatches, prepares filing.
Tenant Screening Agent
Rental platforms verify tenants — bank statement + salary slip analysis for income verification, salary regularity, trust score.
SMB Cash Flow Agent
Agent ingests 12 months bank statements + balance sheet — builds cash flow model, identifies seasonal patterns, determines working capital.
See it in action
From document to structured JSON in seconds
Install the SDK
Typed, zero-dependency client for Node.js 20+. Works with any agent framework.
From the blog

Building a Lending Agent with India's Account Aggregator Network
Build an AI lending agent that combines Account Aggregator real-time bank data with salary slip extraction to assess loan eligibility in seconds. Full TypeScript code with Claude tool_use.

How to Give Your AI Agent the Ability to Read Indian Financial Documents
Step-by-step tutorial: add financial document extraction to your AI agent using Claude tool_use, OpenAI function calling, LangChain, and Vercel AI SDK. Full TypeScript code examples included.

Why Vision AI Beats Traditional OCR for Indian Financial Documents
Traditional OCR fails on Indian bank statements — mixed Hindi-English scripts, watermarks, 28+ formats. Vision AI achieves 95%+ accuracy where Tesseract drops to 76%. Here's the technical breakdown.
Simple, transparent pricing
Start free. Scale when you ship.
100/mo credits
For testing and prototyping
- All 10 document types
- All bank formats
- Community support
- 100 credits/month
No credit card required
1,500/mo credits
For shipping to production
- All 10 document types
- All bank formats
- Email support
- 1,500 credits/month
- Webhooks
- Higher rate limits
Paid plans launching soon
8,000/mo credits
For high-volume pipelines
- All 10 document types
- All bank formats
- Priority support
- 8,000 credits/month
- Webhooks
- Custom rate limits
- Custom prompts
- SLA
Paid plans launching soon
Unlimited credits
For regulated industries
- Unlimited credits
- Dedicated support
- Custom SLA
- On-premise deployment
- SSO & audit logs
- Custom integrations
Frequently Asked Questions
Common questions from developers building with Lekhā.
ChatGPT and Claude return prose — Lekhā returns structured JSON with a deterministic schema. We use 28 bank-specific extraction prompts tuned for Indian document formats, achieving 96.8% field-level accuracy (vs ~80% with generic prompts). Every response includes cross-field validation (balance reconciliation, anomaly detection) and confidence scores. Plus, we ship agent-native tool definitions for LangChain, Vercel AI SDK, CrewAI, and OpenAI — one import and your agent reads financial documents.
No. Documents are processed entirely in memory and discarded immediately after extraction. No storage, no logs, no retention — zero data persistence. Unlike ChatGPT and Claude which store conversations and may use them for training, Lekhā never sees your documents again after the API response is sent. DPDP Act compliant by design.
10 document types: bank statements, CAS (Consolidated Account Statements), salary slips, ITR forms, CIBIL credit reports, GST invoices, Form 16, Form 26AS, GST returns, and balance sheets. 28 Indian banks with bank-specific extraction prompts — including HDFC, SBI, ICICI, Axis, Kotak, PNB, BOB, Yes Bank, IndusInd, and more. A generic fallback handles unsupported bank formats.
96.8% field-level accuracy across 500 manually-verified ground truth documents spanning all 10 document types and 28 banks. Every extracted field includes a confidence score so your agent can decide whether to act on it or flag it for human review. Cross-field validation catches balance mismatches, sequential inconsistencies, and anomalies automatically. See /benchmarks for the detailed breakdown.
Yes. Lekhā aligns with the Digital Personal Data Protection Act 2023 through zero data retention. We don't store personal data, so there are no data fiduciary obligations, no consent management requirements, and no cross-border data transfer concerns. Right to erasure is automatic — there's nothing to erase. See /security for full compliance details.
Yes. Deploy on-prem with Docker using `docker compose up`. Bring your own Anthropic API key and PostgreSQL database. Your documents never leave your network — full data sovereignty. Ideal for regulated industries like banking and insurance.