Image compression API
that just works
Batch compress JPEG, PNG, and WebP images via a simple REST API. 100 images free every month — no credit card required.
One endpoint, done
curl -X POST https://pixsqueeze-api-production.up.railway.app/compress/batch \ -H "Authorization: Bearer psx_your_key_here" \ -F "files=@photo1.jpg" \ -F "files=@photo2.heic" \ -F "quality=0.7" \ -F "maxWidth=1280"
Everything you need
- Fast batch processingSend multiple images in a single API call. We handle compression in parallel and return results in seconds.
- Full controlSet quality, max dimensions, and output format per request — JPEG, PNG, or WebP.
- Secure & privateImages are processed in-memory and never stored on our servers. Your files stay yours.
- Simple integrationOne endpoint, one API key. Works with any language or framework — curl, Node, Python, you name it.
- Usage dashboardSee exactly how many images you've processed this month. Upgrade or downgrade any time.
- Open-source coreBuilt on PixSqueeze, a battle-tested open-source library with millions of downloads.
Production recipes
Compress and store user uploads in your Node backend
The problem: You want to shrink every uploaded image before it hits storage, without bundling an image library or a native codec into your API.
import { writeFile } from 'node:fs/promises'
// Forward an upload to PixSqueeze, then persist the compressed result.
const form = new FormData()
form.append('files', new Blob([buffer]), 'upload.jpg')
form.append('quality', '0.7')
form.append('maxWidth', '1600')
const res = await fetch('https://pixsqueeze-api-production.up.railway.app/compress/batch', {
method: 'POST',
headers: { Authorization: 'Bearer ' + process.env.PIXSQUEEZE_KEY },
body: form
})
const { results, usage } = await res.json()
for (const img of results) {
await writeFile(img.name, Buffer.from(img.data, 'base64'))
}
console.log(usage.remaining + ' compressions left this month')Why it works: The batch endpoint returns each compressed image as base64 plus a live usage counter in one round-trip, so you compress, persist and track quota without a second call or any image library in your own stack.
Convert iPhone HEIC uploads to WebP on the fly
The problem: Phones upload HEIC, cameras shoot RAW, scanners output TIFF — formats browsers cannot display — and decoding them client-side is a non-starter.
// Browsers can't decode HEIC — let PixSqueeze convert + compress server-side.
const form = new FormData()
form.append('files', heicFile) // a .heic straight from an iPhone
form.append('mimeType', 'image/webp') // request WebP output
form.append('quality', '0.8')
const res = await fetch('https://pixsqueeze-api-production.up.railway.app/compress/batch', {
method: 'POST',
headers: { Authorization: 'Bearer ' + apiKey },
body: form
})
const { results } = await res.json()
const src = 'data:image/webp;base64,' + results[0].data // ready for <img src>Why it works: PixSqueeze decodes HEIC, TIFF and camera RAW server-side and re-encodes to JPEG, PNG or WebP in the same request, so you accept whatever a device produces and hand the browser an image it can actually render — no client-side codec.
Built to pass a dependency review
| Metric / concern | What ships |
|---|---|
| Data isolation | In-memory, never stored |
| Formats | JPEG · PNG · WebP · GIF · HEIC · TIFF · RAW in |
| Integration | One endpoint, Bearer key |
| Free tier | 100 images / mo, no card |
| Usage | Live quota in every response |
| Licensing | MIT (core) |
Simple, transparent pricing
For personal projects and testing.
- 100 images / month
- Batch up to 10 images
- JPEG · PNG · WebP
- API key included
- Community support
For small apps and side projects.
- 2,000 images / month
- Batch up to 100 images
- JPEG · PNG · WebP
- API key included
- Email support
For production apps with real traffic.
- 20,000 images / month
- Batch up to 500 images
- JPEG · PNG · WebP
- Priority processing
- Priority support
For high-volume workloads.
- Unlimited images
- Batch up to 1,000 images
- JPEG · PNG · WebP
- Priority processing
- Dedicated support