Here is the ready working code, but how to specify the file from the computer and not from the server var imgUrl = "http://i.imgur.com/l5OqYoZ.jpg"; ?
var clientId = "6b72b846602****"; var imgUrl = "http://i.imgur.com/l5OqYoZ.jpg"; $.ajax({ url: "https://api.imgur.com/3/upload", type: "POST", datatype: "json", data: {image: imgUrl}, success: showMe, error: showMe, beforeSend: function (xhr) { xhr.setRequestHeader("Authorization", "Client-ID " + clientId); } }); function showMe(data) { $("body").append(JSON.stringify(data)); if(data.success == true) { $("body").append("<img src='"+data.data.link+"'/>"); } } 