Developers

MiniPic for developers

MiniPic offers two developer tools: an image compression API and a VS Code extension. The API is compatible with the authentication and response format of popular compression APIs, with 500 free calls a month after sign-up, and the extension compresses images right inside your editor.

Images in a code editor window passing through an API and coming out as a row of smaller images

Image compression API

Image compression API: swap the endpoint and key, and you’re in.

Compatible with the authentication and response format of popular compression APIs; 500 free calls a month after sign-up, billed only for successful compressions.

Learn about the image compression APIIntegration guide

Compatibility layer /shrink
# Compress a PNG: HTTP Basic auth, username is always api, password is your API key
curl -i https://api.minipic.cn/shrink \
  --user api:YOUR_API_KEY \
  --data-binary @input.png
# Returns 201 Created on success; download the compressed image from the result link in the response

VS Code extension

VS Code extension: compress project images without leaving your editor.

Right-click to compress one image, a selection or a whole folder, or convert to WebP and update the references in your code. The extension is free; it uses your API quota.

Learn about the VS Code extension

One capability, many ways

Same capability, wherever you work.

Web, desktop app, API or VS Code extension: pick whatever fits the way you work.

How each capability works on the web, in the desktop app, through the API and in the VS Code extension
CapabilityWebDesktop appAPIVS Code extension
Batch compressionCompress onlineBatches in the workspace/shrink, /v1/compressRight-click to compress
Convert to WebP“Convert all to WebP” in the toolbarOutput format; right-click “Convert to WebP and compress”format=webp, convert“Convert to WebP and Update References”
Auto compressionNot availableHot folder (Pro)Not availableAuto compression from the status bar
HEIC to JPGConverted automatically on dropChoose JPEG as the outputUpload HEIC, get JPEG automaticallyOutput format jpeg
Quality modesSmart / High fidelity / MaximumThree modes, plus Custom precision control (Pro)smart / high / extreme / 1-100smart / high / extreme / lossless

Docs & resources

Everything you need to integrate, in one place.

API docs

Quick start, authentication, every endpoint, quotas and rate limits, billing and error codes.

Read the API docs

Integration guide

curl, Node and Python examples to get your first request running in minutes.

View the integration guide

Migrating from TinyPNG

See how the two differ, and how to switch over by swapping the endpoint and key.

TinyPNG alternative in China

Quality benchmark

Open, reproducible compression results.

View the quality benchmark

GitHub examples

API integration examples and docs, covering curl and Node.js.

MiniPic-API/minipic

Console

Create and manage API keys, and check usage, bills and invoices.

Open the console

FAQ

Is there a free API quota?

You get 500 calls a month when you sign up; Pro includes 1,000 a month, and Team 3,000 a month (shared across the team). Beyond that, you use prepaid resource packs.

How do I get an API key?

Sign up, sign in, and create and manage your API keys in the console.

Does the VS Code extension cost anything?

The extension is free to install; compressing uses your API quota.

Can I call it from a build pipeline or a server?

Yes. You can call the API from any environment that can make HTTP requests.