Documentation

API Reference

API Basics

Host URLs

The simplest model of integration is using Host URLs with the Transform API. The Transform API allows you to resize, crop and convert your images however you like.

Host URLs have the following format:

http://[hostname].imagefly.io/options/URL to Image

  1. Hostname - The hostame determines your unique imagefly.io subdomain that is used as a prefix for your image URLs.

  2. Options - a comma-separated, key-value string that is API specific. For example "w_100,h_100".

    See the Transform API for specifics.

  3. URL to Image - The URL to the image to resize.

Example

If you have a retina image located at http://yoursite.com/big-picture.jpg, you could generate a scaled down image with a width of 200px, and maintain the aspect ratio with:

http://[hostname].imagefly.io/w_200/http://yoursite.com/big-picture.jpg

Try the API Explorer to experiment with the URL API.

Signed Requests

Signed requests are an advanced integration option and require code to generate a signature. This is a good option if you need to resize arbitrary images on the web from a mobile app or backend application.

Signed requests have the following format:

http://[hostname].imagefly.io/1/Options/API Key/Signature/UrlSafeBase64 URL

Once a URL is signed, you can change the options without re-signing the URL.

Take a look at the Transform API to see the available transformation options.