Azure AI DocumentIntelligence problem with resource.

Thomas Barbieri 0 Reputation points
2024-12-13T22:57:11.76+00:00

Hello,

I'm using the Python SDK for azure-ai-documentintelligence version 1.0.0b2. I'm getting a 404 error when I call the api with my key and endpoint credentials, which i'm certain are correct (no typos).

In my code, I have a property method called result, it should return an AnalyzeResult instance obtained from the document intelligence api. The 404 error is happening with the call to begin_analyze_document().

I'm lost on what the issue is here. I'm certain my key and endpoint are matching exactly what I have for my resource in the azure portal, and can confirm it is a document intelligence resource. I believe the model_id = "prebuilt-read" arguement for begin_analyze_document() is valid. I also tried running this with model_id = "prebuilt-layout" and still get a 404. Would anyone be able to help me troubleshoot this further, am I missing something? Maybe it's an issue with my AnalyzeDocumentRequest instance for the analyze_request arguement?Screenshot (392)

Help would be much appreciated.

Azure AI Document Intelligence
Azure AI Document Intelligence
An Azure service that turns documents into usable data. Previously known as Azure Form Recognizer.
2,100 questions
{count} votes

1 answer

Sort by: Most helpful
  1. navba-MSFT 27,540 Reputation points Microsoft Employee Moderator
    2024-12-16T03:52:06.2366667+00:00

    @Thomas Barbieri Welcome to Microsoft Q&A Forum, Thank you for posting your query here!

    .

    We have a SDK - API version relationship table in this doc: Azure AI Document Intelligence client library for Python | Microsoft Learn

    It just have 1.0.0b1 and 1.0.0b2 for now, will add the rest mapping in next release.

    .

    In azure-ai-documentintelligence "1.0.0b3", we target to REST API 2024-02-29-preview. You can't use later REST APIs with this package. To use REST API 2024-07-31-preview, please update Python SDK to "1.0.0b4" and no need to pass the parameter "api_version".

    .

    .

    Action Plan:

    Please remove / uninstall the existing 1.0.0b2 package and upgrade your azure-ai-documentintelligence python package to 1.0.0b4

    pip install azure-ai-documentintelligence==1.0.0b4

    .

    You can leverage the samples for using pre-built models shared here:

    https://learn.microsoft.com/en-us/python/api/overview/azure/ai-documentintelligence-readme?view=azure-python-preview#using-prebuilt-models

    .

    .

    Hope this helps. If you have any follow-up questions, please let me know. I would be happy to help.

    0 comments No comments

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.