Invalid doc type when analyzing with custom model (works interactively)

Mark Anderson 65 Reputation points
2023-08-21T21:57:44.6266667+00:00

Hi All

I built a custom model and tested in Doc Intelligence Studio. All worked fine; however, when I run using the API, I get this error:

Message: Invalid request.
Inner error: {
    "code": "InvalidContent",
    "message": "The file is corrupted or format is unsupported. Refer to documentation for the list of supported formats."


Here's the code that uses same model and same doc (a PDF)

User's image

any ideas why it says the PDF is unsupported?

Thanks

Mark

Azure AI Document Intelligence
{count} votes

Answer accepted by question author
  1. romungi-MSFT 49,081 Reputation points Microsoft Employee Moderator
    2023-08-22T10:20:23.8133333+00:00

    @Mark Anderson I think the most likely scenarios that this error could occur is because your URL of file is not made public for the service to read the file which is most likely due to permission settings on your container or blob or if the file is available to read it could be password-locked, you must remove the lock before submission.

    Could you check if any of the same is applicable?

    Also, From the code perspective, I would check if any publicly available form or document can be used with the same code, for example you can use the URL mentioned in the FR documentation.

    If this answers your query, do click Accept Answer and Yes for was this answer helpful. And, if you have any further query do let us know.

    1 person found this answer helpful.
    0 comments No comments

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.