API live · 100 images free every month

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

Send images, get compressed images back. That's it.
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

Built for developers who want compression handled and out of the way.
  • Fast batch processing
    Send multiple images in a single API call. We handle compression in parallel and return results in seconds.
  • Full control
    Set quality, max dimensions, and output format per request — JPEG, PNG, or WebP.
  • Secure & private
    Images are processed in-memory and never stored on our servers. Your files stay yours.
  • Simple integration
    One endpoint, one API key. Works with any language or framework — curl, Node, Python, you name it.
  • Usage dashboard
    See exactly how many images you've processed this month. Upgrade or downgrade any time.
  • Open-source core
    Built on PixSqueeze, a battle-tested open-source library with millions of downloads.

Production recipes

Drop-in solutions to the image problems every app eventually hits.

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

The questions a CTO asks before adding a package to production — answered up front.
Metric / concern What ships
Data isolationIn-memory, never stored
FormatsJPEG · PNG · WebP · GIF · HEIC · TIFF · RAW in
IntegrationOne endpoint, Bearer key
Free tier100 images / mo, no card
UsageLive quota in every response
LicensingMIT (core)

Simple, transparent pricing

Start free. Upgrade when you need more.
Free
$0/mo

For personal projects and testing.

  • 100 images / month
  • Batch up to 10 images
  • JPEG · PNG · WebP
  • API key included
  • Community support
Starter
$9/mo

For small apps and side projects.

  • 2,000 images / month
  • Batch up to 100 images
  • JPEG · PNG · WebP
  • API key included
  • Email support
Pro Popular
$29/mo

For production apps with real traffic.

  • 20,000 images / month
  • Batch up to 500 images
  • JPEG · PNG · WebP
  • Priority processing
  • Priority support
Business
$99/mo

For high-volume workloads.

  • Unlimited images
  • Batch up to 1,000 images
  • JPEG · PNG · WebP
  • Priority processing
  • Dedicated support

Start compressing in minutes

Sign up, grab your API key, and make your first batch call. Free forever on the starter tier.