Here is the working code in Python (using cURL):
#!/usr/bin/python import pycurl c = pycurl.Curl() values = [ (\"key\", \"YOUR_API_KEY\"),
Try changing :-
"application/x-www-form-urlencoded"
to
"multipart/form-data"