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?

  1. Log into your account on our website or create one for free.
  2. Go to your Profile.
  3. 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:

SHELL Copied!

Minify Files /minify

Minify a Single File

If you have one file to minify (e.g., script.js), send a request like this:

SHELL Copied!

What Happens?

Response Example:

JSON Copied!

Download the Minified File

Minify Multiple Files

If you have multiple files, send them in a single request:

SHELL Copied!

What Happens?

Response Example:

JSON Copied!

Download All Minified Files at Once

Minify an Entire Folder

To minify all files inside a folder, first compress the folder into a .tar file and send it:

SHELL Copied!

What Happens?

Response Example:

JSON Copied!

Download and Extract It

SHELL Copied!

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:

SHELL Copied!

What Happens?

Response Example:

JSON Copied!

Download Compressed Files

SHELL Copied!

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:

SHELL Copied!

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:

JSON Copied!

Download and Extract:

SHELL Copied!

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.

SHELL Copied!

How to Use:

  1. Save the script as a .sh file.
  2. Run it using:
    SHELL Copied!

📌 Note: Make sure jq is installed on your system before running the script!

SHELL Copied!