I have the following code:
public async Task TestExtractionDataAsync()
{
_documentAnalysisClient = new DocumentIntelligenceClient(new Uri(endpoint), new AzureKeyCredential(key));
var documentUri = new Uri("https://raw.githubusercontent.com/Azure-Samples/cognitive-services-REST-api-samples/master/curl/form-recognizer/sample-invoice.pdf");
var analyzeDocumentContent = new AnalyzeDocumentContent()
{
UrlSource = documentUri
};
var operation = await _documentAnalysisClient.AnalyzeDocumentAsync(WaitUntil.Completed, "Test_6_Jornalera", analyzeDocumentContent);
}
And the method 'AnalyzeDocumentAsync' is throwing a '404 Not Found' exception. The file url is valid. The endpoint and the key are the sames from here: Key and endpoint
And from the ModelId is extracted from here: Models Ids
One thing I noticed is that in the Document Intelligence section in Azure AI my project doesn't appear: DIS section
I created the Document Intelligence project from here: Created in 1 Created in 2
Any ideas of what could be happening? I don't know why the method throws a 404. All the elements, urls and keys are on place.
I tried the documentation step by steps but it seems to be obsolete (Use Document Intelligence models).
Here I have created an application to interact with the Azure Form Recognizer service.
FormRecognizerService.cs:
Program.cs:
This is my Document intelligence resource.