Base URL
Authentication
This API does not use bearer tokens or custom headers. Pass the API key in the request payload:POST /compress: includeapi_keyas a multipart form fieldPOST /validate: includeapi_keyin the JSON bodyGET /health: no authentication required
Compression model
- Processing is synchronous
- The compressed file is returned in the response as base64
1successful compression consumes1credit- 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, andcsharp - Request fields are prefilled from the OpenAPI examples where possible
- Responses are grouped by status codes such as
200,400, and401 - Requests can be sent directly from the page
Limits
| Limit | Value |
|---|---|
| Max file size | 10 MB |
| Allowed MIME types | image/png, image/jpeg, image/webp, image/avif |
Common error codes
| Status code | Meaning |
|---|---|
400 | Invalid request payload or unsupported file format |
401 | Invalid API key |
413 | File exceeds the maximum size |
429 | No credits remaining |
500 | Internal server error |
Endpoint list
| Method | Path | Description |
|---|---|---|
POST | /compress | Compress a single uploaded image |
POST | /validate | Validate an API key and read credits |
GET | /health | Check service health |
