image

Image Optimization

Operational

Compress and resize images without visible quality loss

api API Docs

API Overview

The Image Optimization API reduces image file sizes dramatically while maintaining perceptual quality. Submit images as base64-encoded payloads and specify your target quality, maximum dimensions, and preferred output format. The service applies modern compression codecs (WebP, AVIF) where appropriate and strips non-essential metadata. Typical results are 60–80% file size reduction. Ideal for optimizing user-uploaded content, automating asset pipelines, and improving web performance scores.

compress

60–80% Size Reduction

Applies perceptual compression to dramatically shrink file sizes with no visible quality loss.

aspect_ratio

Smart Resizing

Resize to maximum dimensions while preserving aspect ratio — no distortion.

speed

Modern Codecs

Outputs to WebP or AVIF for the smallest possible files on modern browsers.

no_photography

Metadata Stripping

Removes EXIF, IPTC, and XMP metadata to protect privacy and reduce file size further.

integration_instructions API Reference

terminal API Playground

Live Simulation
import requests
import base64

with open("photo.jpg", "rb") as f:
    encoded = base64.b64encode(f.read()).decode()

url = "https://api.picopayd.codefission.co.uk/media/api/optimize"
headers = {
    "Content-Type": "application/json",
    "X-PAYMENT": "<402-payment-token>"
}
payload = {
    "image": encoded,
    "format": "webp",
    "quality": 80,
    "maxWidth": 1200
}

response = requests.post(url, json=payload, headers=headers)
data = response.json()
print(f"Compression ratio: {data['compressionRatio']}")
Response Body 200 OK
{
  "success": true,
  "format": "webp",
  "originalSizeBytes": 512000,
  "optimizedSizeBytes": 98304,
  "compressionRatio": 0.81,
  "image": "UklGRn...",
  "encoding": "base64"
}