API Documentation

Integrate Advanced Compression

Scale your image infrastructure with our powerful neural processing engine. Simple, fast, and optimized for developers.

Turbo Processing

Average processing time under 400ms for high-resolution assets.

Secure Auth

Standardized API Key headers with rolling rotation support.

Endpoint Overview

POSThttps://shrinkify.dev/api/v1/process

Parameters

fileBinary
The image file (FormData)
formatsString
Comma-separated (e.g. webp,avif)
resize_widthInteger
Target width in pixels (Optional)
quality_valueInteger
Compression level 1-100 (Optional)
implementation.sh

// Node.js (using Fetch API)
const fs = require('fs');
const FormData = require('form-data');

async function compressImage() {
    const formData = new FormData();
    formData.append('file', fs.createReadStream('original.jpg'));
    formData.append('formats', 'webp,avif');
    formData.append('resize_enabled', 'true');
    formData.append('resize_width', '1920');

    const response = await fetch('https://shrinkify.dev/api/v1/process', {
        method: 'POST',
        headers: {
            'x-api-key': 'YOUR_API_KEY_HERE'
        },
        body: formData
    });

    const data = await response.json();
    console.log(data);
}
        
Response Payload
{
  "status": "success",
  "results": {
    "webp": { "size": 45.2, "savings": 82.5, "url": "..." },
    "avif": { "size": 38.1, "savings": 85.3, "url": "..." }
  }
}
Compress Images Online – WebP, AVIF, JPG, PNG | Shrinkify