Smush it is an online compression tool for images provided by Yahoo. However, despite being maintained by a big company, it is often very slow and even offline.
In their FAQ there is a question about API:
Is there a Smush.it API I can access so that my images are automatically smushed when they are published?
The API currently is not available for public use. We are working towards making this publicly accessible.
If I recall correctly, this is the same answer I read about 2 years ago and no API has been released since then.
My question is: Is a good idea to rely on this service to compress images on fly?
Edit - You guys must be trippin or something. Smush it is simple tool provided by Yahoo that can be used by webmasters to compress images on their sites. If a question about this does not fit on Pro Webmasters, where else would it fit?