📡 Docs

API Documentation

Everything you need to integrate our image optimizer into your application, pipeline, or workflow.

Get Your Free API Key

Authentication

All requests to the API require your API key passed in the Authorization header using the Bearer token scheme.

Authorization Header
Authorization: Bearer D0117cmprs_your_api_key_here

Don't have a key yet? Join our Discord server and sign in on the homepage to get your free API key instantly.

Get API Key

Endpoints

Base URL https://compressor.dannny0117.com/api/v1/
POST /api/v1/compress

Submit one or more images for compression and optional format conversion. Returns JSON with results and download session info.

Content-Type
multipart/form-data

Request Parameters

Parameter Type Required Description
images[] file required One or more image files to compress. Up to 30 files per request. Max 32 MB each.
mode string optional Compression mode. lossy (default) best file size reduction with invisible quality change. lossless removes metadata and bloat with zero visual change. expert full quality control (use with quality parameter).
format string optional Output format. keep (default), jpeg, png, webp, avif, gif, jxl. WebP and AVIF deliver the best web compression ratios.
quality integer optional Quality level 1–100, used only in expert mode. Lower values = smaller files, higher = better quality.
resize_strategy string optional Resize strategy. none (default), fit (maintain aspect ratio), fill (pad to exact size), crop (crop from center), scale (scale by percentage).
resize_width integer optional Target width in pixels. Required when resize_strategy is not none.
resize_height integer optional Target height in pixels. Required when resize_strategy is not none.

Response

All responses are JSON. A successful compression returns an array of result objects, one per image.

{ "ok": true, "session": "a1b2c3d4e5f6", "results": [ { "ok": true, "original_name": "photo.jpg", "output_name": "photo_opt.jpg", "original_size": 2048576, "optimized_size": 614400, "savings_percent": 70 } ] }
Download URL format:
https://compressor.dannny0117.com/api/download.php?s={session}&f={output_name}

Error Codes

CodeMeaning
401 Invalid or missing API key.
403 Forbidden API key is disabled or suspended.
405 Method not allowed use POST.
413 File too large maximum 32 MB per image.
415 Unsupported file type submit image files only.
429 Rate limit exceeded 200 images per day per key. Resets at midnight UTC.
500 Internal server error try again or contact support.

Rate Limits

200
images per day per key
30
images per request
32 MB
max per image

Daily limit resets at midnight UTC.

Need higher limits? Join the Discord and ask in the support channel.

Supported Formats

Input (accepted uploads)
JPEG PNG WebP AVIF GIF HEIC HEIF SVG JXL
Output (conversion targets)
JPEG PNG WebP AVIF GIF JXL Keep Original

Code Examples

# Compress a single image (lossy, keep format) curl -X POST https://compressor.dannny0117.com/api/v1/compress \ -H "Authorization: Bearer D0117cmprs_your_key_here" \ -F "mode=lossy" \ -F "images[]=@/path/to/photo.jpg" # Convert to WebP with resize curl -X POST https://compressor.dannny0117.com/api/v1/compress \ -H "Authorization: Bearer D0117cmprs_your_key_here" \ -F "format=webp" \ -F "resize_strategy=fit" \ -F "resize_width=1280" \ -F "images[]=@/path/to/banner.png"
Ready to Build?

Join our Discord and sign in to get your free API key — no credit card, no expiry, no limits on the free tier except the daily request quota.

Get Your Free API Key
Dannny0117's Free Online Image Optimizer
For testing purposes only. Build 0.0.132 (private/lab0117_dev(danny).071920290000)