The current v1 end-point is

Items marked exclusive cannot be pipelined in a single request.

image operations

The following table details the operations for an image. Currently only a single image per request is supported operations.

operation syntax description
inforead characteristics exclusive info=1 Read image details such as dimensions and resolution.
Note: Image information is returned as a JSON array.
spritecreate CSS sprites exclusive sprite=png|jpeg|gif Create a grid with 3px padding and in the specified format.
convertchange type convert=png|jpeg|gif Convert image to specified format.
optoptimize opt=1|0 Image optimization based on it's type.
c2wcrop to width c2w=100 Crop on center to a width of 100px.
c2hcrop to height c2h=100 Crop on center to a height of 100px.
s2wscale to width s2w=100 Scale to a width of 100px.
s2hscale to height s2h=100 Scale to a height of 100px.
sw2tnscale to width as thumbnail sw2tn=100 Scale to a width of 100px and perform thumbnail optimizations.
sh2tnscale to height as thumbnail sh2tn=100 Scale to a height of 100px and perform thumbnail optimizations.
cw2tncrop to width as thumbnail cw2tn=100 Crop to a width of 100px and perform thumbnail optimizations.
ch2tncrop to height as thumbnail ch2tn=100 Crop to a height of 100px and perform thumbnail optimizations.

css & javascript operations

The following table details the operations for CSS or Javascript files. To bundle (combine) multiple CSS or Javascript files, upload multiple files at once (see Uploading Files). They will be combined in the order they're specified.

operation syntax description
minminification min=css|js Minify CSS or Javascript code.
gzipgzip output gzip=1|0 Compress output using gzip.
Note: When using gzip'd output be sure to send the proper headers. When using X-Sendfile, only nginx appears to work.
encode (beta) change encoding encode=utf-8|ascii|... Convert output to specified encoding (supported encodings).
Note: This may not work correctly and is only available when not using gzip output.

qr code maker & reader

The following table details the operations for generating and reading QR codes.

operation syntax description
qrencodeqr code maker exclusive qrencode={text-to-encode} Generate a QR code from the provided text.
Note: The text to encode should be URL encoded.
outtypeoutput format exclusive outtype=png|utf8 Set the output type for qrencode.
Note: If not specified the default is png.
qrdecodeqr code reader exclusive qrdecode=1 Read the contents of a QR code image.
Note: Normal image types are supported. The image should be uploaded in the same way as for image operations.

uploading files

The API URL's query string is used to define what operations to perform, the assets to work on must be uploaded using POST file uploads.

  • Files are uploaded using RFC-1867 techniques, i.e. multipart/form-data.
  • Files must be uploaded using the field name files. For multiple files, use files1, files2, etc.
  • Except for sprite generation, only one image at a time can be uploaded. (beta)
  • Uploading multiple CSS or Javascript files will result in the files being bundled in the order they are specified.
  • When uploading multiple files, they must all be of the same type (CSS or Javascript).

See examples for usage details.


Currently there are a few limits on public use of the API:

  • The maximum size of all uploaded files is 5mb - a single file cannot exceed 1mb.
  • Assets must be uploaded - remote URLs cannot be used.
  • doesn't perform any caching or serving of it's own - the client is responsible for caching.
  • doesn't retain any files uploaded and thus a temporary URL isn't available.
  • No more than 5 files can be uploaded at a time.

Premium versions of the API remove these limitations and add an SLA and functionality - like integration with CDNs, fulltext indexing, sprite-generation, and cache-busting URLs. Contact us over at stackware for details.

premium API

go PRO with a no-limits custom API

Need an unrestricted on-premise API with customizations and integration?

Check out the speeder image CDN.


ENHANCEMENT 2015-11-01

Updated CSS minify backend to preserve CSS's calc() whitespace.

ENHANCEMENT 2014-11-11

The API has added sprite maker support for generating CSS sprite sheets from multiple images.

ENHANCEMENT 2014-10-29

Added the info operation for retrieving image details such as dimensions and resolution.

ENHANCEMENT 2014-09-24

The API now supports QR code maker and reader operations.

ENHANCEMENT 2014-07-28

The online console for dynamic image thumbnail and manipulation is now available.

ENHANCEMENT 2014-06-04

An online console for CSS & Javascript API operations is now available.

The console displays the API calls it generates to help with debugging.

ENHANCEMENT 2014-05-31

Uploading Javascript with syntax errors will no longer cause an error.

It will be combined unchanged with the other files.

RELEASE v1 2014-05-27

First public release.