๐Ÿ“„

Document OCR API

AI-powered OCR for images and PDFs. Extracts structured text, markdown, and tables from scanned documents, forms, invoices, receipts, and spreadsheets โ€” powered by Mistral AI.

API Docs $0.015 / request

Why AI OCR?

Traditional OCR (like Tesseract) struggles with tables, multi-column layouts, handwriting, and low-quality scans. Mistral AI OCR understands document structure, preserves table formatting in Markdown, and handles PDFs with mixed text and images โ€” including scanned Brazilian notas fiscais, contracts, and forms.

Quick Start โ€” Image URL

curl -X POST https://api.iteratools.com/document/ocr \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"image": "https://example.com/invoice.jpg"}'

Quick Start โ€” PDF URL

curl -X POST https://api.iteratools.com/document/ocr \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"pdf": "https://example.com/contract.pdf", "pages": [0, 1, 2]}'

Quick Start โ€” Base64 Image

curl -X POST https://api.iteratools.com/document/ocr \ -H "Authorization: Bearer YOUR_KEY" \ -H "Content-Type: application/json" \ -d "{\"image\": \"data:image/jpeg;base64,$(base64 -w0 invoice.jpg)\"}"

Response

{ "ok": true, "data": { "text": "Invoice #1234\nDate: 2024-01-15\nTotal: R$ 450,00", "markdown": "# Invoice #1234\n\n| Item | Qty | Price |\n|------|-----|-------|\n| Widget | 2 | R$225 |\n\n**Total: R$ 450,00**", "tables": [ { "headers": ["Item", "Qty", "Price"], "rows": [["Widget", "2", "R$225"]] } ], "pages": 1, "model": "mistral-ocr-latest" } }

Request Body

Field Type Description
image string JPEG or PNG as base64 (data:image/... prefix) or public URL. Max 10MB.
pdf string PDF as base64 (data:application/pdf;base64,...) or public URL. Max 10MB.
pages number[] Optional. Array of 0-based page indices to process. Default: all pages.

Use Cases

  • ๐Ÿ“‹ Extract data from scanned invoices and receipts (notas fiscais)
  • ๐Ÿ“Š Parse tables from PDFs into structured data
  • ๐Ÿ“ Digitize handwritten or printed forms
  • ๐Ÿ“‘ Process multi-page contracts and legal documents
  • ๐Ÿฆ Read bank statements and financial reports
  • ๐Ÿ” Make scanned PDFs searchable

vs /image/ocr

Feature /image/ocr (Tesseract) /document/ocr (Mistral AI)
Tables โŒ Plain text โœ… Structured Markdown
PDF support โŒ Images only โœ… Native PDF
Multi-column layouts โŒ Often garbled โœ… Preserves structure
Price $0.002/req $0.015/req
Best for Simple text images Complex docs, PDFs, forms

Pricing

$0.015 per request via x402 micropayment on Base (USDC). No monthly fees. Pay per use.

Full Documentation Browse All Tools