SDK Overview
Choose the right SDK for your application
SDK Overview
LeapOCR provides official SDKs for popular programming languages, each designed to provide idiomatic APIs and excellent developer experience.
Choose Your SDK
JavaScript/TypeScript
Full type safety for Node.js and browsers
Python
Async-first client with complete type hints
Go
Type-safe client with idiomatic Go API
REST API
Direct HTTP API access for any language
Quick Start Comparison
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/doc.pdf");
const result = await client.ocr.waitUntilDone(job.jobId);Python
import asyncio
from leapocr import LeapOCR, ProcessOptions, Format
async def main():
async with LeapOCR(os.getenv("LEAPOCR_API_KEY")) as client:
result = await client.ocr.process_and_wait(
"https://example.com/doc.pdf"
)
asyncio.run(main())Go
import "github.com/leapocr/leapocr-go"
client, _ := ocr.New(os.Getenv("LEAPOCR_API_KEY"))
job, _ := client.ProcessURL(ctx, "https://example.com/doc.pdf")
result, _ := client.WaitUntilDone(ctx, job.ID)REST API
curl -X POST https://api.leapocr.com/ocr/uploads/url \
-H "X-API-Key: your-api-key" \
-H "Content-Type: application/json" \
-d '{"url": "https://example.com/doc.pdf"}'Installation
JavaScript/TypeScript
npm install leapocr
# or
yarn add leapocr
# or
pnpm add leapocrPython
pip install leapocr
# or
uv add leapocrGo
go get github.com/leapocr/leapocr-goCommon Concepts
All SDKs share these core concepts. See the Concepts section for details:
- Processing Models: Choose from standard-v1, english-pro-v1, or pro-v1
- Output Formats: Structured, markdown, or per-page structured
- Custom Schemas: Define extraction requirements
Next Steps
- Choose your SDK from the cards above
- Follow the SDK-specific installation guide
- Review the Getting Started guide
- Explore Common Use Cases
Open Source
All SDKs are open source and available on GitHub:
- leapocr-js - JavaScript/TypeScript SDK
- leapocr-python - Python SDK
- leapocr-go - Go SDK
Contributions are welcome! See each repository's CONTRIBUTING.md for guidelines.