API Documentation:

Send a POST request as multipart/form-data encoded to https://lpix.org/api

Put the file as parameter 'file' and set these other parameters as appropriate:
* username - duh
* password - also duh
* gallery - the name of the gallery you want to put the files in
* output - json, text, html or xml. The contents are the same just formatted to one of those

The return output will either be an error code or contain the location of the image, e.g json output:

{
  "err": null,
  "hash": "md5sum",
  "filename": "filename.jpg",
  "imageurl": "https://lpix.org/12345/filename.jpg",
  "thumburl": "https://lpix.org/t/12345/filename.jpg",
  "shorturl": "https://lpix.org/12345/filename.jpg"
}

The error codes are:

* err1 - Error uploading the file, maybe missing filename or bad POST request
* err2 - Authentication failure
* err3 - File isn't recognised as an image or MP3
* err4 - File is too large
* err5 - Reserved
* err6 - Server is down for maintenance, try again later