FatBabyAPIPDF Processing API for Developers
Process PDFs over REST: merge and split, compress, encrypt, watermark, convert from Office/HTML/URL/images, OCR scanned documents, and extract text or tables. Most file operations are async — submit a job, poll GET /v1/jobs/:jobId, then download the result.
Features
What this API actually supports in production today.
- Merge, split, extract, reorder, rotate, and remove pages
- Compress and optimize PDFs
- Encrypt / decrypt and watermark
- From HTML, URL, Markdown, Office, and images
- OCR and make-searchable pipelines
- Text, table, and image extraction
- Async jobs with signed downloads
Common use cases
- Document pipelines in SaaS backends
- Invoice and contract automation
- Scan-to-searchable PDF for archives
- Generating PDFs from HTML templates or URLs
API endpoints
Base URL https://thefatbaby.com/api. Authenticate with Authorization: Bearer fb_live_YOUR_KEY.
| Method | Path | Summary | Credits |
|---|---|---|---|
POST | /v1/pdf/merge | Merge multiple PDFs | From 1 credit (catalog); runtime may scale |
POST | /v1/pdf/compress | Compress a PDF | About 2 credits (catalog) |
POST | /v1/pdf/ocr | OCR a PDF (async) | Per-page OCR billing (see pricing note) |
POST | /v1/pdf/from-url | URL to PDF | About 2 credits (catalog) |
POST | /v1/pdf/from-office | Office to PDF | About 3 credits (catalog) |
POST | /v1/pdf/extract-text | Extract text | About 2 credits (catalog) |
GET | /v1/jobs/:jobId | Poll async job status | 0 credits |
Examples
Primary endpoint /v1/pdf/merge · Catalog lists fixed amounts per operation; OCR and some conversions also bill per page. Check dashboard usage after a test call.
cURL
curl -X POST https://thefatbaby.com/api/v1/pdf/merge \
-H "Authorization: Bearer fb_live_YOUR_KEY" \
-F "files=@a.pdf" -F "files=@b.pdf"
# → { "job": { "id": "JOB_ID", "status": "queued" } }
curl https://thefatbaby.com/api/v1/jobs/JOB_ID \
-H "Authorization: Bearer fb_live_YOUR_KEY"JavaScript
const form = new FormData();
form.append('files', pdfBlobA, 'a.pdf');
form.append('files', pdfBlobB, 'b.pdf');
const res = await fetch('https://thefatbaby.com/api/v1/pdf/merge', {
method: 'POST',
headers: { Authorization: 'Bearer fb_live_YOUR_KEY' },
body: form
});
const { job } = await res.json();
// poll GET /v1/jobs/${job.id}Python
import requests
r = requests.post(
'https://thefatbaby.com/api/v1/pdf/merge',
headers={'Authorization': 'Bearer fb_live_YOUR_KEY'},
files=[('files', open('a.pdf','rb')), ('files', open('b.pdf','rb'))],
)
job_id = r.json()['job']['id']
status = requests.get(
f'https://thefatbaby.com/api/v1/jobs/{job_id}',
headers={'Authorization': 'Bearer fb_live_YOUR_KEY'},
).json()Request
multipart/form-data files=@a.pdf files=@b.pdf
Response
{
"job": { "id": "JOB_ID", "status": "queued" },
"credits_used": 1,
"request_id": "req_..."
}Pricing & credits
Credits vary by operation. Catalog amounts are starting points; OCR and some conversions use per-page rates. Start with free credits after signup.
Common errors
- 400 — file_required or invalid PDF input
- 402 — insufficient_credits
- job failed — Poll status failed/error with error_message
FAQ
Are PDF operations synchronous?
Most file transforms return a job object. Poll GET /v1/jobs/:jobId until completed, then download via the job download URL.
Do you support Arabic OCR?
PDF OCR supports eng/ara language options in the PDF OCR pipeline.
Where is the product overview?
See /pdf for the PDF product hub and /apis#cat-pdf for the full endpoint list.
Try without code
Use the matching online tool, then automate the same workflow with this API.