ImgSquash
FeaturesPricingBlog
๐Ÿ—œ๏ธ
Optimize & Squash
Compress images to smallest size
๐Ÿ”„
Convert Images
Convert between image formats
โœจ
Enhance Images
Resize, sharpen, blur, tint
๐Ÿง 
AI Upscale
Upscale images with AI
Sign InTry Free
FeaturesPricingBlog
Tools
๐Ÿ—œ๏ธOptimize & Squash๐Ÿ”„Convert ImagesโœจEnhance Images๐Ÿง AI Upscale
Sign InTry Free
Home / Developers

Image optimization API

Outcome-oriented parameters. Tell us the goal โ€” we pick the encoding. Available on the Business plan ($49/mo).

Quick start

curl -X POST https://www.imgsquash.com/api/images/optimize \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -F "image=@photo.jpg" \
  -F "format=avif" \
  -F "quality=75"

Outcome-oriented parameters

Goalformatquality
smallestavif60
balanced (default)avif75
qualitywebp85

Plus: width, height, maintainAspectRatio, preserveMetadata (Pro+), blur/sharpen/tint (Pro+).

Node.js

const fd = new FormData();
fd.append("image", new Blob([await file.arrayBuffer()]), "photo.jpg");
fd.append("format", "avif");
fd.append("quality", "75");
const res = await fetch("https://www.imgsquash.com/api/images/optimize", {
  method: "POST",
  headers: { Authorization: "Bearer " + process.env.IMGSQUASH_API_KEY },
  body: fd,
});
const pct = res.headers.get("X-Compression-Ratio");

Limits & errors

  • Business: 10,000 optimizations/hour, 100MB/file, 7680ร—4320 max.
  • 400 invalid type/size โ€” 429 rate limit (respect Retry-After) โ€” 403 tier/dimension limit โ€” 500 processing failure.
  • Response headers: X-Compression-Ratio, X-Original-Size, X-Optimized-Size.
  • Manage keys in Dashboard โ†’ API Keys. Machine docs: /llms.txt, /agents.md.

See Business plan ยท All tools ยท Benchmark methodology

ยฉ 2026 ImgSquash. All rights reserved.

Terms|Privacy