Get started
Smol API documentation
One HTTPS API that makes files smaller: images, PDFs, video and audio, plus conversion between formats and metadata removal.
What it does
| Operation | Works on | What you get |
|---|---|---|
| Compress | Images, PDFs, video, audio | The same content in a smaller file, in the same or a different format |
| Convert | Images, PDFs, video, audio, office documents, tables, fonts | The file in the format you ask for |
| Strip metadata | Images, PDFs | The same file without camera, location, author and software details |
The compression follows the same standard as the Smol Mac app: the same encoders, the same quality scale, the same defaults. A file compressed through the API matches what the app produces.
Two ways to call it
Direct requests are for files up to 25 MB that finish in seconds. You send the file and get the result in the same response. Nothing is stored.
curl -X POST "https://api.smolmac.com/v1/compress" \
-H "Authorization: Bearer $SMOL_API_KEY" \
--data-binary @photo.jpg -o photo.min.jpgJobs are for anything larger, and for all video and office documents. You upload the file, start a job, and are told when it is done. The result is kept for an hour by default, then deleted. Video and HEIC output are in limited preview and have to be enabled for an account.
Where to go next
- Quickstart: your first request in a minute.
- Authentication: keys, test mode and live mode.
- Large files and jobs: uploads, in one request or in parts, and jobs.
- SDKs: TypeScript and Node.js and Python.
- API reference: every endpoint.