Overview
SmartPNG Integration API is a synchronous image compression API designed for backend services, CMS plugins, and automation flows. It exposes three endpoints:| Endpoint | Method | Purpose |
|---|---|---|
/compress | POST | Compress an uploaded image and return the optimized file as base64 |
/validate | POST | Validate an API key and return the current credit balance |
/health | GET | Check service availability |
Quick facts
| Topic | Value |
|---|---|
| Base URL | https://integration.smartpng.com/api |
| Authentication | api_key passed in the request body or multipart form |
| File size limit | 10 MB per file |
| Supported formats | PNG, JPEG, WebP, AVIF |
| Credit usage | 1 successful compression consumes 1 credit |
| Free usage | 500 free credits per account every month |
Typical flow
- Create a SmartPNG account and generate an API key from the dashboard.
- Call
POST /validateto confirm the key and available credits. - Call
POST /compresswithmultipart/form-data. - Decode the returned
compressed_datafield and write it back to a file or upload target.
Website setup guides
- Follow Get API Key to see the exact
smartpng-vuewebsite flow. - Follow Send Your First Request to validate a key and compress a file.
API reference
- Start with API Overview.
- Use the endpoint pages for request and response details:
