Show all
Featured wiki pages:
ImageDelete ImageGallery ImageURLTransloading ImageUploading ImgurStatistics
ImageDelete ImageGallery ImageURLTransloading ImageUploading ImgurStatistics
Imgur API
Welcome to the Imgur API Documentation.
Features
Notice
The Imgur API is not to be used for commercial purposes without prior explicit consent by Imgur LLC.
Developer API Key
To upload an image file, you must have a unique developer API key. All other actions do not require one. Click here to register for a key.
Sample Upload Script
#!/usr/bin/python
import pycurl
c = pycurl.Curl()
values = [
("key", "YOUR_API_KEY"),
("image", (c.FORM_FILE, "file.png"))]
# OR: ("image", "http://example.com/example.jpg"))]
c.setopt(c.URL, "http://imgur.com/api/upload.xml")
c.setopt(c.HTTPPOST, values)
c.perform()
c.close()Sample Response
XML
<?xml version="1.0" encoding="utf-8"?> <rsp stat="ok"> <image_hash>cxmHM</image_hash> <delete_hash>NNy6VNpiAA</delete_hash> <original_image>http://imgur.com/cxmHM.png</original_image> <large_thumbnail>http://imgur.com/cxmHMl.png</large_thumbnail> <small_thumbnail>http://imgur.com/cxmHMl.png</small_thumbnail> <imgur_page>http://imgur.com/cxmHM</imgur_page> <delete_page>http://imgur.com/delete/NNy6VNpiAA</delete_page> </rsp>
JSON
{
"rsp": {
"stat": "ok",
"image": {
"image_hash": "mM84h",
"delete_hash": "CZoRTG208s",
"original_image": "http://imgur.com/mM84h.png",
"large_thumbnail": "http://imgur.com/mM84hl.png",
"small_thumbnail": "http://imgur.com/mM84hl.png",
"imgur_page": "http://imgur.com/mM84h",
"delete_page": "http://imgur.com/delete/CZoRTG208s"
}
}
}Bugs
If you find anything that may be a bug, even if it's a mispeling, please contact Alan at: alan@imgur.com.