Once you retrieve your key, you can immediately start shrinking images. You can submit a PNG or JPEG file with any HTTP client. The server will compress your image and respond with a URL where you can grab the result.
curl --user api:YOUR_API_KEY \ --data-binary @unoptimized.png -i https://api.tinify.com/shrink
Official client libraries are available for Ruby, PHP, Node.js, Python and Java. You can also use our WordPress plugin or the Magento extension to compress your JPEG and PNG images.
For documentation and more code examples you can explore the API Reference.
The API compresses PNG and JPEG images. You only have to upload your source image and download the result. Everything else happens automatically.
If you use Amazon S3, you can instruct the API to store optimized images directly in your S3 bucket.
You can create resized versions of your images, which are immediately optimized. You only have to upload the original once. Take advantage of our smart cropping algorithm to create thumbnails. The API can resize images to a specific size and crop away the parts which are visually the least interesting.