Validate an API key
Endpoints
POST /validate
Validate an API key and return the current credit balance.
POST
Validate an API key
Overview
Use this endpoint as a lightweight preflight check before sending compression requests.Notes
- The request body is JSON.
- The endpoint returns whether the key is valid, the current balance, and the maximum allowed file size.
- This endpoint does not consume credits.
Body
application/json
SmartPNG API key
Example:
"sp_live_abc123def456ghi789"
Response
API key is valid
Example:
true
SmartPNG user identifier
Example:
"2ef2a1c4-0b73-4fd8-b065-418f79b4fd7c"
Available options:
Free, Paid Example:
"Paid"
Remaining free and paid credits
Example:
500
Maximum upload size in bytes
Example:
10485760
