Skip to main content

Base URL

https://integration.smartpng.com/api

Authentication

This API does not use bearer tokens or custom headers. Pass the API key in the request payload:
  • POST /compress: include api_key as a multipart form field
  • POST /validate: include api_key in the JSON body
  • GET /health: no authentication required

Compression model

  • Processing is synchronous
  • The compressed file is returned in the response as base64
  • 1 successful compression consumes 1 credit
  • Failed requests do not produce a successful compression result

Interactive reference

Each endpoint page uses Mintlify’s OpenAPI playground:
  • Request examples appear in the right panel with language tabs
  • The available languages are curl, python, javascript, php, java, and csharp
  • Request fields are prefilled from the OpenAPI examples where possible
  • Responses are grouped by status codes such as 200, 400, and 401
  • Requests can be sent directly from the page

Limits

LimitValue
Max file size10 MB
Allowed MIME typesimage/png, image/jpeg, image/webp, image/avif

Common error codes

Status codeMeaning
400Invalid request payload or unsupported file format
401Invalid API key
413File exceeds the maximum size
429No credits remaining
500Internal server error

Endpoint list

MethodPathDescription
POST/compressCompress a single uploaded image
POST/validateValidate an API key and read credits
GET/healthCheck service health