FlashFoto Logo




API Overview

This is version 2 of the FlashFoto Image Processing API. The API currently takes most input as either json values or path parameters, and returns output in either json images or raw image data.

Core Concepts

In the API, we have a unique way of categorizing images and the processing results. In your progress through the API you will hear mention of 2 distinct objects (An Image and an ImageVersion) Lets define the 2:

Image: An image is reference to an jpeg or png that you may want to do some processing on. An image can have multiple versions.

ImageVersion: An image version is a distinct version of an image. You can find a full list of versions here.

When you add an image both models are created. Other methods will create additional versions. For example, mugshot will generate a MugshotMask and MugshotMasked version of the image. These outputs can then be retrieved using the get api call and specifying the version.

API Variables

The API documentation will refer to 2 types of parameters: Path Parameters and Query Parameters. Path parameters exist as a part of the URL itself, whereas query parameters exist as name value pairs after the "?" part of the URL. In the method documentation, Path Parameters will be highlighted in the URL section.

  \__/   \_________/ \__/ \_/ \_____/ \___/ \____________/
   |         |        |    |      |     |            |
protocol  hostname   port  |    Method  |       Query Parameter
                           |            |
                        Base URL  Path Parameter


Authentication is now performed using a username and api key. The API Key is a 32 character alpha numeric key provided by FlashFoto. The username and password is passed over the api through 2 url parameters (partner_username and partner_apikey). All API calls require authentication with the exception of get, which does not require authentication for images that are flagged as public.

Example Request

POST api/info/21?partner_username=testuser&partner_apikey=DEADBEAFDEADBEAFDEADBEAFDEADBEAF

Error Handling

Error handling has been upgraded in this vesion. Successfull api responses will return an HTTP status code of 200 OK; errors will return a different HTTP status code. Check the Error Handling page for a list of errors and their corresponding codes.

Errors are returned as JSON encoded objects with 2 keys. These keys are the message and a unique error code. The message may contain additional troubleshooting information.

Future Development

As this API continues to grow, we are relying on our partners to provide invaluable feedback on the what features would make their lives easier, or what features are hardest to use. Your comments are always welcome. Feel free to contact us at admin@flashfotoinc.com.