# PennyOCR > OCR API for developers and agents: POST a document (PDF/PNG/JPEG/WebP/TIFF), > get its full text back as markdown (tables preserved) or plain text. > $0.75 per 1,000 pages, first 50 pages free. Documents are not stored by default. ## MCP server (recommended for agents) Add to mcpServers: {"pennyocr": {"url": "https://mcp.pennyocr.com", "headers": {"Authorization": "Bearer pk_live_..."}}} Tools: read_document {url, pages?, output?, max_pages?, max_cost_usd?} -> {content, pages, cost_usd, citations[]} · estimate_cost {url, pages?} (free). Clients without header support: https://mcp.pennyocr.com/?key=pk_live_... ## API (base: https://api.pennyocr.com) - POST /v1/ocr — multipart form, field `file`; query `?format=markdown|text`; header `Authorization: Bearer pk_live_...`. Response JSON: {id, pages, text, page_results[], cost_usd, model}. Errors: 401 bad key, 402 out of credits, 413 too large (50MB/500 pages), 422 unreadable. - POST /v1/chat/completions — OpenAI Chat Completions compatible. Send image_url content parts (data: or https URLs); model "pennyocr-markdown" or "pennyocr-text". - GET /v1/models — OpenAI-style model list. - POST /v1/ocr/url — JSON {url, format?, pages?, max_pages?, max_cost_usd?}; fetches the document server-side. 413 (with exact numbers) if a cap would be exceeded — decide, then retry. - POST /v1/estimate — JSON {url, pages?} -> {total_pages, selected_pages, cost_usd}. Free. - GET /v1/balance — (Authorization: Bearer pk_live_...) your key's budget: {credit_pages, credit_value_usd, free_pages_available_now, price_per_1k_usd}. Free. Check this before spending; the first 50 pages on an account are free. - POST /v1/billing/checkout — (Authorization: Bearer pk_live_...) JSON {pack: "10k"|"100k"|"1m"} -> {url} to buy prepaid credits with just the API key (no session token). A human finishes payment in the browser. - GET /health — status, no auth. - Machine-readable spec: https://api.pennyocr.com/openapi.yaml (and /openapi.json) ## Signup for agents (no browser needed) 1. POST https://api.pennyocr.com/auth/request-code {"email": "you@example.com"} 2. Read the 6-digit code from that inbox, then POST https://api.pennyocr.com/auth/verify {"email": "...", "code": "123456"} -> {"session_token": "sk_session_..."} 3. POST https://api.pennyocr.com/dashboard/keys (Authorization: Bearer ) -> {"api_key": "pk_live_..."} (shown once) 4. Your first 50 pages are free. To buy prepaid credits: POST https://api.pennyocr.com/dashboard/billing/checkout {"pack": "10k" | "100k" | "1m"} (Authorization: Bearer ) -> {"url": "https://checkout.stripe.com/..."} (complete payment there; a human card holder must finish Stripe checkout) Or, once you hold the API key: POST /v1/billing/checkout {"pack": "..."}. 5. Balance (with the API key): GET /v1/balance. Session usage: GET /dashboard/usage · daily series: GET /dashboard/usage/daily ## Pricing - /pricing.txt: plain-text pricing summary - https://pennyocr.com/ocr-api-pricing/: pricing comparison page ## Docs - https://pennyocr.com/docs/: full API reference - https://pennyocr.com/blog/receipt-ocr-benchmark/: measured accuracy benchmark ## Contact - hello@pennyocr.com (a human replies fast) ## Chrome extension PennyOCR Snip — snip any region of a page (or right-click an image) and get the text. Install: https://chromewebstore.google.com/detail/pennyocr-snip/mpbmgjggnjmembmagibkgeldehgcipgn Source: https://github.com/imiraoui/pennyocr-snip 3 free snips/month with no account; email sign-in raises it to 30/month. ## Guides (runnable code) - [How to OCR a receipt in Python](https://pennyocr.com/guides/ocr-receipt-python/): Extract text from receipt photos in Python with three lines of code — handles crumple, blur and skew. Includes parsing totals and a full runnable example. - [Convert a PDF to Markdown in Python](https://pennyocr.com/guides/pdf-to-markdown-python/): Convert scanned PDF pages to Markdown in Python. Download a synthetic invoice, the actual OCR output and a dependency-free script to test your RAG ingestion step. - [Extract text from invoices in Node.js](https://pennyocr.com/guides/ocr-invoice-node/): Read PDF and scanned invoices in Node.js with a few lines: full text or markdown with line-item tables, then parse amounts. Runnable example included. - [OCR a PDF from the command line](https://pennyocr.com/guides/ocr-pdf-curl/): Turn a scanned PDF into text or markdown from your terminal with a single curl command. Plus jq recipes for extracting pages and piping into other tools. - [Parse Indian GST invoices in Python](https://pennyocr.com/guides/parse-gst-invoice-python/): OCR Indian GST invoices in Python, extract GSTINs and line items from markdown tables, and catch misreads with the GSTIN checksum and a totals check. - [Convert a bank statement PDF to CSV in Python](https://pennyocr.com/guides/bank-statement-to-csv-python/): OCR scanned or PDF bank statements in Python, parse the transaction tables into CSV, and verify every row against the running balance. - [Validate container numbers from shipping documents](https://pennyocr.com/guides/validate-container-numbers-python/): Extract container numbers from OCR'd bills of lading and packing lists in Python, then catch misreads with the ISO 6346 check digit. - [Extract tables from a PDF into pandas](https://pennyocr.com/guides/pdf-tables-to-pandas/): Turn tables in scanned or digital PDFs into pandas DataFrames and CSV files in Python, from OCR markdown output. No ruling lines or text layer needed. ## Use cases and document types - [Receipt OCR API](https://pennyocr.com/receipt-ocr-api/): Turn photos and scans of receipts into text with one API call. $0.75 per 1,000 pages, first 50 pages free. No minimums, no sales calls. - [Invoice OCR API](https://pennyocr.com/invoice-ocr-api/): Extract text from PDF and scanned invoices with one API call. $0.75 per 1,000 pages, first 50 free. Built for AP automation and bookkeeping tools. - [Document OCR API](https://pennyocr.com/document-ocr-api/): One endpoint to turn any document into text: PDFs, scans, photos. $0.75 per 1,000 pages, half the price of AWS, Google and Azure. First 50 pages free. - [PDF OCR API](https://pennyocr.com/pdf-ocr-api/): Extract text from scanned and image-based PDFs with one API call. Billed per page: $0.75 per 1,000. Up to 500 pages per request. First 50 pages free. - [Image to Text API](https://pennyocr.com/image-to-text-api/): Convert images to text with one API call: photos, screenshots, scans. PNG, JPEG, WebP, TIFF. $0.75 per 1,000 images, first 50 pages free. - [Handwriting OCR API](https://pennyocr.com/handwriting-ocr-api/): Read handwritten notes, forms and letters with a vision-language model API. $0.75 per 1,000 pages, first 50 free. Classic OCR fails at handwriting; VLMs don't. - [Cheap OCR API](https://pennyocr.com/cheap-ocr-api/): The cheapest serious OCR API: $0.75 per 1,000 pages vs $1.50 at AWS Textract, Google Vision and Azure. No minimums, no seats, first 50 pages free. - [OCR API Pricing, Compared](https://pennyocr.com/ocr-api-pricing/): OCR API pricing in one table: PennyOCR $0.75 per 1,000 pages vs AWS Textract, Google Cloud Vision and Azure at $1.50. Free tiers, billing models, the math. - [A Mistral OCR Alternative](https://pennyocr.com/mistral-ocr-alternative/): Looking at Mistral OCR? PennyOCR does document-to-markdown OCR at $0.75 per 1,000 pages with a real free tier, prepaid credits and zero retention by default. - [Mistral OCR Pricing, Decoded](https://pennyocr.com/mistral-ocr-pricing/): Mistral OCR costs about $1 per 1,000 pages (batch ~$0.50). Here's the full pricing picture and how PennyOCR's $0.75 per 1,000 with the first 50 pages free compares. - [A Google Vision OCR Alternative](https://pennyocr.com/google-vision-ocr-alternative/): PennyOCR replaces Google Cloud Vision document text detection at $0.75 per 1,000 pages vs $1.50 — markdown with tables instead of raw word boxes, no GCP setup. - [An AWS Textract Alternative](https://pennyocr.com/textract-alternative/): PennyOCR is a Textract alternative at half the price: $0.75 per 1,000 pages with tables included, vs $1.50 base plus ~$15/1k for Textract's Tables feature. - [A Mathpix Alternative](https://pennyocr.com/mathpix-alternative/): Mathpix is the math specialist at specialist prices. For everyday documents — receipts, invoices, contracts — PennyOCR does markdown OCR at $0.75 per 1,000 pages. - [PDF to Markdown API](https://pennyocr.com/pdf-to-markdown-api/): Convert PDFs to clean markdown via API: headings, tables, reading order preserved. $0.75 per 1,000 pages, first 50 free. Built for RAG and LLM pipelines. - [The Best OCR API, Honestly](https://pennyocr.com/best-ocr-api/): Textract, Google Vision, Azure, Mistral OCR, Mathpix, PaddleOCR or PennyOCR? An honest guide to picking the best OCR API by use case and budget in 2026. - [PaddleOCR as an API](https://pennyocr.com/paddleocr-api/): PaddleOCR is excellent free software — that you have to serve. Compare running your own PaddleOCR API against a hosted endpoint at $0.75 per 1,000 pages. - [OCR API for Python](https://pennyocr.com/ocr-api-python/): Python OCR API in three lines: pip install pennyocr, client.ocr('file.pdf'), done. $0.75 per 1,000 pages, first 50 free. Markdown or plain text out. - [OCR Built for AI Agents](https://pennyocr.com/ocr-for-agents/): Agent-native OCR: a remote MCP server, exact cost before you run, max_pages/max_cost caps, deterministic errors and prepaid credits an agent can't overrun. - [The PennyOCR MCP Server](https://pennyocr.com/mcp/): Add https://mcp.pennyocr.com to your mcpServers and your agent can read any PDF or image as markdown with exact cost reporting. Setup, tools and examples. - [PDF to Markdown, for LLM Context](https://pennyocr.com/pdf-to-markdown-for-llms/): Stop pasting PDF soup into prompts. Convert any PDF to LLM-ready markdown — tables preserved, reading order preserved, page citations — at $0.75 per 1,000 pages. - [A Document Reader MCP Server](https://pennyocr.com/document-reader-mcp/): A document reader MCP server your agent can call: read any PDF or image by URL, get markdown with page citations and an exact cost. Free tier included. - [PennyOCR with LangChain](https://pennyocr.com/langchain/): Use PennyOCR in LangChain pipelines: load scanned PDFs and images as markdown Documents with page metadata, at $0.75 per 1,000 pages. Code included. - [PennyOCR with LlamaIndex](https://pennyocr.com/llamaindex/): Ingest scanned PDFs and images into LlamaIndex as markdown nodes with page metadata using PennyOCR at $0.75 per 1,000 pages. Reader code included. - [OCR in n8n Workflows](https://pennyocr.com/n8n/): Download n8n file and URL OCR workflow templates. Connect a Header Auth credential, read a synthetic PDF and get Markdown with page results. Setup and error handling included. - [PennyOCR with CrewAI](https://pennyocr.com/crewai/): Add document reading to CrewAI agents: a PennyOCR tool in ten lines or via MCP, with exact per-call costs so crews stay on budget. $0.75 per 1,000 pages. - [PennyOCR with Pydantic AI](https://pennyocr.com/pydantic-ai/): Wire PennyOCR into Pydantic AI as a typed tool: documents in, validated markdown out, exact cost per call. $0.75 per 1,000 pages, first 50 free. - [A Tesseract Alternative](https://pennyocr.com/tesseract-alternative/): Outgrowing Tesseract? PennyOCR is a hosted vision-language OCR API that handles the scans, tables and handwriting Tesseract can't — $0.75 per 1,000 pages, first 50 pages free. - [A LlamaParse Alternative](https://pennyocr.com/llamaparse-alternative/): Comparing LlamaParse? PennyOCR converts PDFs and scans to LLM-ready markdown with flat per-page pricing ($0.75/1k), zero retention by default and no credit math. - [A Free OCR API (With Honest Fine Print)](https://pennyocr.com/free-ocr-api/): A genuinely free OCR API tier: your first 50 pages free, markdown or plain text output, no card required. And honest guidance on the other free options. - [Chinese OCR API](https://pennyocr.com/chinese-ocr-api/): OCR Chinese documents — Simplified or Traditional, mixed with English — into clean text or markdown. $0.75 per 1,000 pages, first 50 pages free. - [GST Invoice OCR API](https://pennyocr.com/gst-invoice-ocr-api/): OCR Indian GST tax invoices — GSTIN, HSN/SAC, CGST/SGST/IGST and line items — into markdown tables. $0.75 per 1,000 pages, first 50 free. - [Bank Statement OCR API](https://pennyocr.com/bank-statement-ocr-api/): Convert scanned and PDF bank statements into markdown transaction tables with one API call. $0.75 per 1,000 pages, first 50 pages free. - [PDF Table Extraction API](https://pennyocr.com/pdf-table-extraction-api/): Extract tables from scanned or digital PDFs and images as markdown tables, merged cells and line breaks included. $0.75 per 1,000 pages, first 50 free. - [Purchase Order OCR API](https://pennyocr.com/purchase-order-ocr-api/): Read purchase orders — PO number, vendor, line items, quantities and prices — from PDFs and scans with one API call. First 50 pages free. - [Bill of Lading OCR API](https://pennyocr.com/bill-of-lading-ocr-api/): OCR bills of lading, packing lists, delivery notes and customs paperwork into clean text and tables. $0.75 per 1,000 pages, first 50 pages free. ## Comparisons - [PennyOCR vs AWS Textract](https://pennyocr.com/vs/pennyocr-vs-aws-textract/) - [PennyOCR vs Google Cloud Vision](https://pennyocr.com/vs/pennyocr-vs-google-cloud-vision/) - [PennyOCR vs Azure Document Intelligence](https://pennyocr.com/vs/pennyocr-vs-azure-document-intelligence/) ## Downloadable examples - [PDF input and actual Markdown](https://pennyocr.com/pdf-to-markdown-api/): synthetic invoice, Python script, returned output and measured timing - [n8n file and URL templates](https://pennyocr.com/n8n/): importable manual workflows, Header Auth setup and error guidance ## Research - [Receipt OCR benchmark](https://pennyocr.com/blog/receipt-ocr-benchmark/): measured accuracy and price per 1,000 pages