I made a image classification using custom vision and published it. After that I got this publishing url and prediction key. Now I am literally confused how to use this as a api in a website that I am making using MERN.
Also the prediction url doesnt work- "{"error":{"code":"404","message": "Resource not found"}}"
This is the ouput details after publishing:
If you have an image URL:
Set Prediction-Key Header to : ***
Set Content-Type Header to : application/json
Set Body to : {"Url": "https://example.com/image.png"}
I reproduced the same thing in my environment. When you are request via GET method you will get a 404 error for predication. You can use prediction call by using the POST method as per MS document
To resolve the above use POST method and follow the steps. You can use both image and Image URL.
Syntax of my prediction URL
https://democustv-prediction.cognitiveservices.azure.com/customvision/v3.0/Prediction/ecsxx /classify/iterations/Iteration1/image
Select your image down here
Now everting is working fine 200 OK.