import requests import json url="YOUR_PREDICTION_ENDPOINT _ AVAIL customvision.ai" headers={'content-type':'application/octet-stream','Prediction-Key':'YOUR_PREDICTION_KEY'} r =requests.post(url,data=open("YOUR_LOCAL_IMAGE.jpg","rb"),headers=headers) print(r.content)