+0
Daily
-3
Weekly
+0
Monthly
12,250
stars
840
forks
60
watchers
100
prs
107
issues
9
releases
README
!Hero Image
Zerox OCR
A dead simple way of OCR-ing a document for AI ingestion. Documents are meant to be a visual representation after all. With weird layouts, tables, charts, etc. The vision models just make sense!
The general logic:
- Pass in a file (PDF, DOCX, image, etc.)
- Convert that file into a series of images
- Pass each image to GPT and ask nicely for Markdown
- Aggregate the responses and return Markdown
Try out the hosted version here:
Or visit our full documentation at:
Getting Started
Zerox is available as both a Node and Python package.
- Node README - npm package
- Python README - pip package
| Feature | Node.js | Python |
| ------------------------- | ---------------------------- | -------------------------- |
| PDF Processing | ✓ (requires graphicsmagick) | ✓ (requires poppler) |
| Image Processing | ✓ | ✓ |
| OpenAI Support | ✓ | ✓ |
| Azure OpenAI Support | ✓ | ✓ |
| AWS Bedrock Support | ✓ | ✓ |
| Google Gemini Support | ✓ | ✓ |
| Vertex AI Support | ✗ | ✓ |
| Data Extraction | ✓ (schema) | ✗ |
| Per-page Extraction | ✓ (extractPerPage) | ✗ |
| Custom System Prompts | ✗ | ✓ (custom_system_prompt) |
| Maintain Format Option | ✓ (maintainFormat) | ✓ (maintain_format) |
| Async API | ✓ | ✓ |
| Error Handling Modes | ✓ (errorMode) | ✗ |
| Concurrent Processing | ✓ (concurrency) | ✓ (concurrency) |
| Temp Directory Management | ✓ (tempDir) | ✓ (temp_dir) |
| Page Selection | ✓ (pagesToConvertAsImages) | ✓ (select_pages) |
| Orientation Correction | ✓ (correctOrientation) | ✗ |
| Edge Trimming | ✓ (trimEdges) | ✗ |
Node Zerox
(Node.js SDK - supports vision models from different providers like OpenAI, Azure OpenAI, Anthropic, AWS Bedrock, Google Gemini, etc.)
Installation
sh
npm install zerox
Zerox uses graphicsmagick and ghostscript for the PDF = image processing step. These should be pulled automatically, but you may need to manually install.
On linux use:
sudo apt-get update
sudo apt-get install -y graphicsmagick
Usage
With file URL
ts
import { zerox } from "zerox";
const result = await zerox({
filePath: "https://omni-demo-data.s3.amazonaws.com/test/cs101.pdf",
credentialsTop issues
#7Research: Add bounding boxes to response17 comments · 2024-07-29#47ModuleNotFoundError for py-zerox Module11 comments · 2024-10-06#65Supporting Vision models from Groq10 comments · 2024-10-21#106Using Llama3.2-vision9 comments · 2024-11-22#57Python example script gives error on "None" select_pages6 comments · 2024-10-19#187GPT5 Model Support5 comments · 2025-08-21#173Gemini 2.5 pro support in python module5 comments · 2025-04-17#70Multi-Linguistic?4 comments · 2024-10-22
Latest release
v0.1.06 v0.1.06 2024-12-18What's Changed Fix Tesseract scheduler change by @ZeeshanZulfiqarAli in https://github.com/getomni-ai/zerox/pull/108 Use Tesseract's Orientation detection by @ZeeshanZulfiqarAli in https://github.com/getomni-ai/zerox/pull/111 allow optional density for node by @alexander-densley in https://github.com/getomni-ai/zerox/pull/116 added performance testing by @kailingding in https://github.com/getomni-ai/zerox/pull/119 Update py-zerox installation instructions for clarity by @bjlange in https://github.com/getomni-ai/zerox/pull/120 Tyler/add ignore warnings + increase default token limit