FatBabyAPIImage Processing API for Developers
Transform images with Sharp-backed REST endpoints. Upload multipart field file and get processed bytes back synchronously for common ops like resize, compress, convert, and metadata strip — plus advanced ops like background remove and upscale.
Features
What this API actually supports in production today.
- Resize, compress, convert (JPEG/PNG/WebP/AVIF)
- Thumbnails and strip metadata
- Crop, rotate, flip, grayscale
- Background remove and upscale (higher credit cost)
- Sync responses — no job polling for standard image ops
Common use cases
- User upload pipelines and CDN prep
- Thumbnail generation for marketplaces
- Format conversion for email/web delivery
- Background removal for product photos
API endpoints
Base URL https://thefatbaby.com/api. Authenticate with Authorization: Bearer fb_live_YOUR_KEY.
| Method | Path | Summary | Credits |
|---|---|---|---|
POST | /v1/image/compress | Compress an image | Typically 1–2 credits |
POST | /v1/image/resize | Resize width/height/fit | Typically 1–2 credits |
POST | /v1/image/convert | Convert format | Typically 1–2 credits |
POST | /v1/image/info | Read image metadata | 1 credit |
POST | /v1/image/background-remove | Remove background | Higher cost (about 20 credits) |
POST | /v1/image/upscale | Upscale image | Higher cost (about 25 credits) |
Examples
Primary endpoint /v1/image/compress · Standard transforms are low single-digit credits; AI-style ops cost more. Check response credit headers.
cURL
curl -X POST https://thefatbaby.com/api/v1/image/compress \ -H "Authorization: Bearer fb_live_YOUR_KEY" \ -F "file=@photo.jpg" -F "quality=80" \ --output out.jpg
JavaScript
const form = new FormData();
form.append('file', fileInput.files[0]);
form.append('quality', '80');
const res = await fetch('https://thefatbaby.com/api/v1/image/compress', {
method: 'POST',
headers: { Authorization: 'Bearer fb_live_YOUR_KEY' },
body: form
});
const blob = await res.blob();Python
import requests
r = requests.post(
'https://thefatbaby.com/api/v1/image/compress',
headers={'Authorization': 'Bearer fb_live_YOUR_KEY'},
files={'file': open('photo.jpg','rb')},
data={'quality': '80'},
)
open('out.jpg','wb').write(r.content)Request
multipart/form-data file=@photo.jpg quality=80
Binary response: HTTP 200 image bytes with Content-Type matching the output format
Pricing & credits
Low-cost sync transforms for everyday ops; background-remove and upscale use higher credit rates.
Common errors
- 400 — file_required or unsupported image
- 402 — insufficient_credits
- 413 — file too large (about 20MB limit)
FAQ
Is image processing async?
Standard /v1/image/* transforms respond synchronously with the image body. Only heavier product flows that create jobs would differ.
What formats are supported?
Common inputs include JPEG, PNG, WebP, AVIF, and GIF. Convert supports jpeg, png, webp, and avif outputs.
Try without code
Use the matching online tool, then automate the same workflow with this API.