FatBabyAPIOCR API for Images & PDFs
Run OCR on images via POST /v1/ocr (sync JSON text) and on PDFs via async /v1/pdf/ocr or make-searchable flows. Image OCR uses Tesseract with a language parameter; PDF OCR supports eng/ara in the PDF pipeline.
Features
What this API actually supports in production today.
- Image OCR: multipart file + lang (default eng)
- PDF OCR async jobs
- Make-searchable PDF pipeline
- Related document extract / invoice scan tools
- Same API key as other FatBaby products
Common use cases
- Digitize scans and receipts
- Searchable archives from scanned PDFs
- Pre-processing for document workflows
API endpoints
Base URL https://thefatbaby.com/api. Authenticate with Authorization: Bearer fb_live_YOUR_KEY.
| Method | Path | Summary | Credits |
|---|---|---|---|
POST | /v1/ocr | OCR an image to text | 3 credits default |
POST | /v1/pdf/ocr | OCR a PDF (async) | Per-page OCR billing |
POST | /v1/pdf/make-searchable | Make PDF searchable | OCR-related billing |
Examples
Primary endpoint /v1/ocr · Image OCR default 3 credits; PDF OCR billed per page (runtime rates apply).
cURL
curl -X POST https://thefatbaby.com/api/v1/ocr \ -H "Authorization: Bearer fb_live_YOUR_KEY" \ -F "file=@scan.png" -F "lang=eng"
JavaScript
const form = new FormData();
form.append('file', imageFile);
form.append('lang', 'eng');
const res = await fetch('https://thefatbaby.com/api/v1/ocr', {
method: 'POST',
headers: { Authorization: 'Bearer fb_live_YOUR_KEY' },
body: form
});
const data = await res.json();Python
import requests
r = requests.post(
'https://thefatbaby.com/api/v1/ocr',
headers={'Authorization': 'Bearer fb_live_YOUR_KEY'},
files={'file': open('scan.png','rb')},
data={'lang': 'eng'},
).json()
print(r.get('text') or r)Request
multipart/form-data file=@scan.png lang=eng
Response
{
"text": "...",
"credits_used": 3,
"request_id": "req_..."
}Pricing & credits
Image OCR ~3 credits; PDF OCR uses per-page pricing.
Common errors
- 400 — Unsupported image or missing file
- 402 — insufficient_credits
FAQ
Is accuracy guaranteed?
OCR quality depends on scan quality and language. We do not claim 100% accuracy.
Image vs PDF?
Use /v1/ocr for images. Use /v1/pdf/ocr for multi-page PDFs (async job).
Try without code
Use the matching online tool, then automate the same workflow with this API.