Share via

How to fix error code 404 "Resource not found" when trying to use Document Intelligence REST API

João Pedro Prediger 25 Reputation points
2024-06-05T20:28:04.5533333+00:00

Here's my current curl:

curl --location '[ENDPOINT]/documentintelligence/documentModels/prebuilt-read:analyze?api-version=2023-07-31' \

--header 'Ocp-Apim-Subscription-Key: [KEY]' \

--header 'Content-Type: application/json' \

--data '{

"urlSource": "[URL]"
```}'  
  
Endpoint and Key are the ones available in the "keys and endpoint" menu in my resource tab.
Azure Document Intelligence in Foundry Tools
Foundry Tools
Foundry Tools

Formerly known as Azure AI Services or Azure Cognitive Services is a unified collection of prebuilt AI capabilities within the Microsoft Foundry platform

0 comments No comments

Answer accepted by question author

  1. VasaviLankipalle-MSFT 18,736 Reputation points Moderator
    2024-06-05T22:23:21.6+00:00

    Hello @João Pedro Prediger , Thanks for using Microsoft Q&A Platform.

    If you are working with v3.1 API Version:2023-07-31 then the request URL contains formrecognizer. However, V4 ``2024-02-29-preview version contains documentintelligence in the URL.

    Please try to change your request

    curl --location '[ENDPOINT]/documentintelligence/documentModels/prebuilt-read:analyze?api-version=2023-07-31' \

    Replace documentintelligence with formrecognizer as described below. Here is the reference documentation: https://learn.microsoft.com/en-us/rest/api/aiservices/document-models/analyze-document?view=rest-aiservices-v3.1%20(2023-07-31)&tabs=HTTP

    {endpoint}/formrecognizer/documentModels/{modelId}:analyze?api-version=2023-07-31
    

    Here is the migration guide; https://learn.microsoft.com/en-us/azure/ai-services/document-intelligence/sdk-overview-v4-0?view=doc-intel-4.0.0&tabs=csharp#supported-clients

    I hope this helps.

    Regards,

    Vasavi

    -Please kindly accept the answer and vote 'yes' if you feel helpful to support the community, thanks.

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

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