Hi @ Jaya Shankar G S Same error as before.
Here are the new things I did
- string aiSvcEndpoint = "https://eastus.api.cognitive.microsoft.com/imageanalysis:analyze?api-version=2023-04-01-preview";
- My image is publicly accessible (I can access it without a VPN) but I still Created a SAS token as explained in https://learn.microsoft.com/en-us/azure/ai-services/translator/document-translation/how-to-guides/create-sas-tokens?tabs=Containers
ImageAnalysisClient client = new ImageAnalysisClient(new Uri(aiSvcEndpoint), new AzureKeyCredential(aiSvcKey));
VisualFeatures visualFeatures = VisualFeatures.Caption | VisualFeatures.DenseCaptions | VisualFeatures.Objects | VisualFeatures.Read |
VisualFeatures.Tags | VisualFeatures.People | VisualFeatures.SmartCrops;
ImageAnalysisResult result = client.Analyze(imageURL, visualFeatures, options);
Azure.RequestFailedException
HResult=0x80131500
Message=Resource not found
Status: 404 (Resource Not Found)
ErrorCode: 404
Content:
{"error":{"code":"404","message": "Resource not found"}}
Headers:
apim-request-id: REDACTED
Strict-Transport-Security: REDACTED
X-Content-Type-Options: REDACTED
Date: Tue, 18 Mar 2025 14:29:51 GMT
Content-Length: 56
Content-Type: application/json
Source=Azure.AI.Vision.ImageAnalysis
StackTrace:
at Azure.Core.HttpPipelineExtensions.ProcessMessage(HttpPipeline pipeline, HttpMessage message, RequestContext requestContext, CancellationToken cancellationToken)
at Azure.AI.Vision.ImageAnalysis.ImageAnalysisClient.AnalyzeFromUrl(IEnumerable1 visualFeatures, RequestContent content, String language, Nullable
1 genderNeutralCaption, IEnumerable`1 smartCropsAspectRatios, String modelVersion, RequestContext context)
at Azure.AI.Vision.ImageAnalysis.ImageAnalysisClient.AnalyzeFromUrl(IEnumerable1 visualFeatures, ImageUrl imageUrl, String language, Nullable
1 genderNeutralCaption, IEnumerable`1 smartCropsAspectRatios, String modelVersion, CancellationToken cancellationToken)
at Azure.AI.Vision.ImageAnalysis.ImageAnalysisClient.Analyze(Uri imageUri, VisualFeatures visualFeatures, ImageAnalysisOptions options, CancellationToken cancellationToken)
at Program.<<Main>$>g__AnalyzeImage|0_0() in C:\Nandha\R&D\AIVision\ConsoleApp2\ConsoleApp2\Program.cs:line 38
at Program.<Main>$(String[] args) in C:\Nandha\R&D\AIVision\ConsoleApp2\ConsoleApp2\Program.cs:line 8
Appreciate your help!