API - Application Programming Interface


What is a API?

A API enables developers to hook the sweet Pixlr to their own web services or applications. In short it enables users of other sites to gain access to a powerful image editor.

Who may use the API?

The API is open for everyone to integrate Pixlr into any service. Oh and if you could give us a heads up before you start sending traffic our way it would be really appreciated ;)

How does it work?

Sending images to the Pixlr editor can be done in two ways either via a GET or a POST request. The same goes for the operation of getting images from Pixlr, either we send you a URL to the image or the RAW post directly to your server.

The details then .. parameters ..

General
loc: The language of the application for example "en" or "sv", default is "en"
referrer: The name of the referring service for example "Your site name" or "Facebook"
exit: The url to send the visitor if the user click exit (Without saving a image)

Importing
image: A URL to the image or the post raw data of the image to import
title: A title to give the imported image

Exporting
method: The method to save the image, "GET" or "POST", default is "GET"
target: The url wich we send the image information for you to process
redirect: The url to send the visitor after the image is saved (if not set the visitor will be sent to the target page)

Output - This is what you get from us
image: The URL to the image on our server or the raw file post of the image we send to you
type: The image type, "jpg" or "png"
state: The state of the image either "new" or "fetched"
title: The user preferred filename of the image

A quick example

http://www.pixlr.com/app?loc=sv&referrer=A_cool_site&image=http://www.pixlr.com/_gfx/introduction.jpg&title=The_image

This will open the image from our firstpage, set the default language to swedish and give the image a title.


Dont forget to URL-encode or escape the parameters.


More info will be added shortly, if you have any development questions don't hesitate to contact us!