Trying to access API via end point for Azure Vision AI results in resource not found for image prediction

Kenneth Zhang 0 Reputation points
2025-03-14T14:43:07.05+00:00

Am trying to classify image using vision ai and the prediction end point, however it came up as "not found"Operation returned an invalid status code 'NotFound'

string predictionEndpoint = "https://visionkennyai-prediction.cognitiveservices.azure.com/customvision/v3.0/Prediction/376a473b-1158-4a74-9059-3c2b0bee2cbb/classify/iterations/HemlockPredictionAPI/image";

the training end point seems to work fine but the prediction end point isn't.

Azure AI Custom Vision
Azure AI Custom Vision
An Azure artificial intelligence service and end-to-end platform for applying computer vision to specific domains.
284 questions
{count} votes

1 answer

Sort by: Most helpful
  1. JAYA SHANKAR G S 2,430 Reputation points Microsoft External Staff
    2025-03-17T04:11:13.17+00:00

    Hi @Kenneth Zhang ,

    When you create a custom vision resource you will be creating two resources, one training and other prediction.

    enter image description here

    You need to get the keys and endpoint from Keys and Endpoint pages, under Resource Management like mentioned here from both training and prediction resource.

    Training resource

    enter image description here

    Prediction resource

    enter image description here

    So, in your case it's just

    string predictionEndpoint = "https://visionkennyai-prediction.cognitiveservices.azure.com"
    

    Please try above and let me know if you have any query.

    UPDATE

    Issue: Using prediction endpoint in C# sdk giving error Operation returned an invalid status code 'NotFound'

    Solution: Replacing the default model name with published model name resolved the issues.

    Thank you


Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.