FatBabyAPIOfficial FatBaby SDKs
Thin, typed clients for the production API at https://thefatbaby.com/api. Same auth, credits, and job model as the REST docs — no invented endpoints.
Install
Packages ship as @thefatbaby/sdk (npm) and thefatbaby (PyPI). Links go live when the public packages are published; source lives in this monorepo under packages/sdk-js and packages/sdk-python.
Node.js 18+
npm install @thefatbaby/sdk
Quick start
Authenticate with fb_live_… or fb_test_…. POSTs that charge credits are never auto-retried (the API has no idempotency keys).
import { writeFile } from 'node:fs/promises';
import { FatBaby } from '@thefatbaby/sdk';
const fb = new FatBaby({ apiKey: process.env.FATBABY_API_KEY });
const shot = await fb.web.screenshot({ url: 'https://example.com' });
await writeFile(shot.filename || 'shot.png', Buffer.from(shot.data));
const job = await fb.pdf.compress({ file: './doc.pdf' });
await job.wait();
await job.downloadTo('./doc-compressed.pdf');What's covered
web— screenshot, to-pdf, scrape, link preview, DNS/SSL helpersimage— resize, compress, convert, rembg, upscale, …pdf/video/audio— async jobs withwait()+download()ocr,sheets,tools,email,jobs
Escape hatch: fb.requestJson({ method, path, … }) for any live /v1 path not yet wrapped.
Try an API landing
Each landing includes cURL plus official SDK tabs.