API Documentation
This API allows you to use Minimo to minify and compress your HTML, CSS, and JavaScript files directly from your server.
Authentication – API Key
To use the API, you need an API key. This key verifies your identity and must be included in every request.
How do I get my API key?
- Log into your account on our website or create one for free.
- Go to your Profile.
- Copy your API key (never share it with others!).
How do I use my API key?
Include your API key in the request header like this:
Minify Files /minify
Minify a Single File
If you have one file to minify (e.g., script.js), send a request like this:
What Happens?
- The API minifies the JavaScript file.
- The minified version will have "-minified" added before the extension.
- You’ll receive a download link for the minified file.
Response Example:
Download the Minified File
- Copy the provided link.
- Download it manually by pasting it into your browser.
- Or use
wget
orcurl
to download it on your server.
Minify Multiple Files
If you have multiple files, send them in a single request:
What Happens?
- Each file gets minified.
- You receive separate download links for each file (renamed with "-minified" at the end).
- You also get a tar archive containing all minified files (not renamed).
Response Example:
Download All Minified Files at Once
- Copy and paste the
.tar
link into your browser OR use: - Extract the files with:
Minify an Entire Folder
To minify all files inside a folder, first compress the folder into a .tar
file and send it:
What Happens?
- The API minifies all HTML, CSS, and JS files inside the folder.
- The folder structure remains unchanged.
- Non-code files (like images) are untouched.
- You get a new
.tar
archive with the minified files.
Response Example:
Download and Extract It
Compress Files /compress
Compress Files (Gzip & Brotli)
This call works the same as /minify
, you can add one or more files adding -F
attributes like following:
What Happens?
- Files are sent to Minimo that compress the provided files in both gzip an Brotli,
- The compressed version will have "-compressed" added before the extension.
- You’ll receive a download link for the two generated files
Response Example:
Download Compressed Files
Compress all Files in a Folder
To compress all .html
, .css
and .js
files inside a folder in a single call, first compress the folder into a .tar
file and send it:
What Happens?
- Minimo will get the folder and process it compressing all
.html
,.css
and.js
files. - The folder structure remains unchanged.
- Non-code files (like images) are untouched.
- You get a new
.tar
archive with both compressed.gz
and.br
files alongside uncompressed files in their original position.
Response Example:
Download and Extract:
Extra Tip
Automate the process!
Want to minify and compress all files in your /public
folder with a single command? You can create a Bash script to streamline the process, making it faster and more efficient—especially if you need to do this regularly.
How to Use:
- Save the script as a
.sh
file. - Run it using:
📌 Note: Make sure jq
is installed on your system before running the script!