Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 

Repository files navigation

MassivePix

Industry-standard OCR API to convert PDFs and images into clean Markdown — with full support for math equations, tables, and structured formatting.

Features

  • Convert PDF files to well-formatted Markdown
  • Preserves LaTeX math notation ($\delta(x)$, integrals, etc.)
  • Handles tables, lists, headings, and complex layouts
  • Simple REST API via Bibcit
  • Chain with the MassiveMark API to further convert Markdown to HTML, DOCX, or RAG-optimized PDF

Quick Start

Prerequisites

Python

pip install requests
import requests

pdf_file_path = "input.pdf"

with open(pdf_file_path, "rb") as f:
    files = {"file": (pdf_file_path, f)}
    headers = {
        "Bibcit-Key": "YOUR_API_KEY",
    }
    response = requests.post(
        "https://api.bibcit.com/api/massivepix/ftom",
        headers=headers,
        files=files,
    )

with open("output.md", "w", encoding="utf-8") as f:
    f.write(response.text)

JavaScript (Node.js)

import fs from 'fs';

const formdata = new FormData();
const pdfFilePath = 'input.pdf';
const pdfContent = new Blob([fs.readFileSync(pdfFilePath)]);
formdata.append("file", pdfContent, pdfFilePath);

const response = await fetch('https://api.bibcit.com/api/massivepix/ftom', {
    method: "POST",
    headers: {
        'Bibcit-Key': 'YOUR_API_KEY',
    },
    body: formdata,
});

fs.writeFileSync('output.md', await response.text());

API Reference

POST /api/massivepix/ftom

Converts a PDF or image file to Markdown.

Parameter Type Location Description
file binary body The PDF/image to convert
Bibcit-Key string header Your API key

Response: Markdown text (text/plain)

Project Structure

js/
  f2m.js        # JavaScript example
  output.md     # Sample output
py/
  f2m.py        # Python example
  output.md     # Sample output

Sample Output

The API produces clean Markdown with LaTeX math preserved. See js/output.md or py/output.md for full examples.

License

MIT

About

OCR - industry standard OCR to convert pdf/image to markdown

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages