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 AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
1,505 questions
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
2,577 questions
0 comments No comments
{count} votes

Accepted answer
  1. VasaviLankipalle-MSFT 15,836 Reputation points
    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://video2.skills-academy.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://video2.skills-academy.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