PicMonkey's online photo editor API allows you to add best-of-breed photo editing tools to your web site without lifting a finger. (You can type a few lines of code with your toes, right?) Your users will be able to unleash their inner genius, have a feeding frenzy on crazy-awesome effects, and save their final edited photo back to your servers, all while singing your praises for providing them with the photo goodness. Let us know if you have trouble at firstname.lastname@example.org
All of the examples here will use 00112233445566778899aabbccddeeff as the API key. For example: http://www.picmonkey.com/service?_apikey=00112233445566778899aabbccddeeff
In most use cases, you’ll want to have PicMonkey automatically load an image. The key to making this happen is the _import parameter. You can either specify a URL or a POST form field containing the image you wish to open.
<form method="post" action="http://www.picmonkey.com/service/" enctype='multipart/form-data'>
<input type="hidden" name="_import" value="image_file"/>
<input type="file" name="image_file" size="30">
<input type="submit" value="Upload this image"/>
<input type="hidden" name="_apikey" value="00112233445566778899aabbccddeeff"/>
PicMonkey provides two main ways to get the edited image back to your servers. We can send it directly via a POST, or we can send a temporary URL (via GET or POST) that you can use to fetch the image. The POST method is generally the most efficient. The default is the ‘direct POST’ method.
To receive a direct POST of the edited image, pass the following parameters to the API:
_export = <the url to POST data to (make sure this is URL encoded!)>
_export_agent = “server”
_export_method = “POST”
After the post is complete, the browser itself will navigate to the _export url. If you’d like to go to a different URL, pass it along in the _redirect parameter.
To receive a temporary URL, pass these parameters:
_export = <the url to POST data to (again, make sure this is URL encoded)>
_export_agent = “browser”
_export_method = “POST” or “GET”
You may want to ask the user if it’s OK to overwrite an image when saving. This feature is controlled via the _replace and _imageid parameters. The _replace parameter can take four possible values. The combination of those values and the user’s actions control whether or not _imageid is included as a parameter on the export request.
There is no requirement that _imageid actually be the ID of anything. For example, you could always pass a constant, and simply use its existence to determine whether or not to replace the image.
Specifies the image to load
Desktop software can POST an image to the API and pass _returntype=text to receive a URL that can then be loaded in a browser.
Pass a title to be used when saving an image to a user's computer.
URL to use for exporting an image
Where should the export originate from
Name of the field to contain the exported image
Should the export be via HTTP GET or POST?
The 'id' of the image being edited. See above for more information.
Optionally ask the user before overwriting. See above for more information.
The output file format (png or jpg). jpg is the default.
The output compression quality (1-10). The default is 8.
Maximum output width in pixels.
Maximum output height in pixels.
URL for a destination when the user selects "close"
URL to redirect the browser to after export.
UI elements to disable. Currently, only the value of ‘in’ is supported. If specified, the upload button will be hidden.