Get up and running in under 5 minutes using our official TypeScript SDK. You'll authenticate, process a local image, and receive a perfectly parsed JSON array.
We distribute typed bindings that work natively with modern JavaScript Runtimes (Node, Deno, Bun) out of the box.
npm install @solveocr/clientObtain your API keys from the Dashboard and initialize a new Client instance.
import { SolveOCR } from '@solveocr/client';
const client = new SolveOCR({
apiKey: process.env.SOLVEOCR_API_KEY,
});Call the extract() method, optionally specifying hints like expected language or table extraction modes.
const response = await client.extract('./receipt.jpg', {
mode: 'invoice',
languages: ['en', 'fr']
});
console.log('Total Due:', response.structuredData.total);'invoice' mode automatically hunts for Totals, Line Items, and Tax IDs without manual regex!