Docs/Image Utils/GET /v1/compress

GET /v1/compressAnalyze image compression

Image Utils lf-image-utils

Estimates how much smaller an image file could get if compressed, without compressing it. Analyzes byte entropy and redundancy in image data to estimate compression potential. Returns entropy score, estimated gzip ratio, and unique byte count.

Query Parameters

ParameterTypeRequiredDescription
datastringYesBase64 image data or URL

Response Schema

success (boolean): Operation success
source (string): Source type
image_size (integer): Size in bytes
compression (object): Entropy and ratio data

cURL Example

curl 'https://lf-image-utils.laminarforge.dev/v1/compress?data=<base64_data>' -H 'Authorization: Bearer lf_YourApiKey'

Python Example

import requests
url = 'https://lf-image-utils.laminarforge.dev/v1/compress'
headers = {'Authorization': 'Bearer lf_YourApiKey'}
params = {'data': '<base64_data>'}
response = requests.get(url, headers=headers, params=params)
print(response.json())