LeapOCRLeapOCR Docs

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

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 leapocr

Python

pip install leapocr
# or
uv add leapocr

Go

go get github.com/leapocr/leapocr-go

Common Concepts

All SDKs share these core concepts. See the Concepts section for details:

Next Steps

  1. Choose your SDK from the cards above
  2. Follow the SDK-specific installation guide
  3. Review the Getting Started guide
  4. Explore Common Use Cases

Open Source

All SDKs are open source and available on GitHub:

Contributions are welcome! See each repository's CONTRIBUTING.md for guidelines.