TinyPNG
Smart compression of PNG, JPEG, WebP and AVIF images
Managed auth
Authentication
Methods your end users can connect with. Credentials are stored encrypted, and secret values are never shown again or returned by the API.
API key
Your users enter
- API keySecretRequired
Where to find them
- Sign up at tinify.com/developers with your email (includes 500 free compressions per month).
- In “API” in the dashboard copy the key.
- Each compression counts; the connection test does not.
Tools (1)
TinyPNG API request
TINYPNG_SEND_REQUESTAuthenticated call to the TinyPNG API (https://api.tinify.com). Any endpoint of the API is allowed. Examples: POST /shrink {"source": {"url": "https://…/photo.png"}} (returns the result URL in the Location header and in output.url), POST /output/{id} {"resize": {"method": "fit", "width": 800, "height": 600}}, POST /output/{id} {"convert": {"type": "image/webp"}}.
Required scopes
No scopes required
Input
TinyPNG API request input Name Type Description methodstringHTTP methodOne of: GET,POST,PUT,PATCH,DELETEDefault:"GET"pathrequiredstringPath relative to the API base URL, or a full URL on the same API (e.g. a next-page link) queryobjectQuery string parameters bodyunknownJSON body formobjectBody as application/x-www-form-urlencoded instead of JSON body_base64stringBinary body, base64 (at most 960000 characters) content_typestringContent-Type of body_base64 headersobjectExtra headers such as Accept. Authentication is added automatically.

