The web connects us, it enables our ability to share the content that matters most. The web is not just text, it is pictures, music and video. Yet as programmers we are used to considering the response of APIs as text that can be parsed by a machine in a format we can read ourselves. We are used to JSON. But APIs are the gears that connect us to the services that underly our favorite content, to Facebook videos and Tumblr images.
Now, Mashape enables a whole new generation of APIs with support for binary input and output.
Fortunately, APIs are just as capable of handling this data if the right structure is in place, and starting today, Mashape is here to help developers make that leap. We’ve enabled binary responses for APIs in our marketplace, further expanding the power of the marketplace.
Now, an app developer can add instagram-style filters to an image by sending its binary data through a Mashape API. Facial recognition tools can take a binary stream and return JSON, and a word cloud generator can take an essay and return an image.
La Gioconda Mona Lisa
Here’s an example with Ruby:
Black and white filter on La Gioconda Mona Lisa via instafilter.io
We’re incredibly excited about this update. It brings the entire community one step closer to making all APIs accessible, trustworthy, and marketable. For developers, it dramatically expands the scope of what services a Mashape-connected API can provide. It allows for greater complexity to be parsed in a manner that doesn’t overwhelm a busy coder.
With just a click of a button you can select a JSON, JSON Array, String or Binary parameter or response.
Just like with our JSON APIs, libraries in the five major languages of the web allow binary based tools to be platform independent. Binary content being used in a Rails application can be processed by an API coded in Java. As developers experiment with the power of APIs and the capacity of solid documentation and turnkey implementation, we’re excited to discover just what the next generation of APIs will enable software to do.
At Mashape we believe in the power of collaboration. Come join us in this next step.
Build amazing things together.