Skip to main content

Overview

SmartPNG Integration API is a synchronous image compression API designed for backend services, CMS plugins, and automation flows. It exposes three endpoints:
EndpointMethodPurpose
/compressPOSTCompress an uploaded image and return the optimized file as base64
/validatePOSTValidate an API key and return the current credit balance
/healthGETCheck service availability

Quick facts

TopicValue
Base URLhttps://integration.smartpng.com/api
Authenticationapi_key passed in the request body or multipart form
File size limit10 MB per file
Supported formatsPNG, JPEG, WebP, AVIF
Credit usage1 successful compression consumes 1 credit
Free usage500 free credits per account every month

Typical flow

  1. Create a SmartPNG account and generate an API key from the dashboard.
  2. Call POST /validate to confirm the key and available credits.
  3. Call POST /compress with multipart/form-data.
  4. Decode the returned compressed_data field and write it back to a file or upload target.

Website setup guides

API reference