LeapOCRLeapOCR Docs

LeapOCR Documentation

Transform documents into structured data using AI-powered OCR. Complete API reference, SDK guides, and examples for JavaScript, Python, and Go.

LeapOCR provides enterprise-grade document processing with AI-powered data extraction. Transform PDFs and images into structured data, markdown, or custom formats using our powerful API and SDKs.

Get Started in 5 Minutes

Key Features

  • AI-Powered Extraction - Advanced OCR with multiple model options
  • Multiple Output Formats - Structured JSON, markdown, or per-page processing
  • Custom Schemas - Define your own extraction schemas with JSON Schema
  • Enterprise Ready - Built-in retry logic, error handling, and monitoring
  • Multi-Language - Support for documents in various languages
  • Type-Safe SDKs - Full TypeScript, Python type hints, and Go types

Quick Start

Choose your language to get started:

JavaScript/TypeScript

import { LeapOCR } from "leapocr";

const client = new LeapOCR({ apiKey: process.env.LEAPOCR_API_KEY });

const job = await client.ocr.processURL("https://example.com/invoice.pdf", {
  format: "structured",
  instructions: "Extract invoice number, date, and total",
});

const result = await client.ocr.waitUntilDone(job.jobId);

View full JavaScript guide →

Python

from leapocr import LeapOCR, ProcessOptions, Format

async with LeapOCR(os.getenv("LEAPOCR_API_KEY")) as client:
    result = await client.ocr.process_and_wait(
        "https://example.com/invoice.pdf",
        options=ProcessOptions(
            format=Format.STRUCTURED,
            instructions="Extract invoice number, date, and total"
        )
    )

View full Python guide →

Go

client, _ := ocr.New(os.Getenv("LEAPOCR_API_KEY"))

job, _ := client.ProcessURL(ctx, "https://example.com/invoice.pdf",
    ocr.WithFormat(ocr.FormatStructured),
    ocr.WithInstructions("Extract invoice number, date, and total"),
)

result, _ := client.WaitUntilDone(ctx, job.ID)

View full Go guide →

Processing Models

LeapOCR provides three AI models for document processing:

ModelDisplay NameDescriptionCredits/Page
standard-v1Standard v1Baseline model, handles all cases1
english-pro-v1English Pro v1Premium quality, English documents only2
pro-v1Pro v1Highest quality, handles all cases3

Learn more about Processing Models →

Core Concepts

Understand the fundamentals:

Common Use Cases

  • Invoice Processing - Extract accounting data from invoices
  • Medical Records - Process clinical documents securely
  • Receipt Scanning - Capture expense data from receipts
  • Contract Analysis - Extract key terms from legal contracts

View all use cases →