Computer Vision API 3.0 - Get Read Result

Didrik Skantze 6 Reputation points
2020-06-30T08:54:13.467+00:00

Before getting to development, I thought I'd test the Post Read and Get Read Result via the console API.
Successfully received response from all the other computer vision API ( Analyze Image, Describe Image ... ).
When trying the same with the Read, using this example pdf https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
I do get a success response message, but when I try to use the returned apim-request-id: e4a6a9a4-e8c0-45a5-bc46-53d62308b661
( or any other request id ), I keep getting,
"Operation ID is invalid, expired or the results matching this operationId have been deleted"

Example: Read response:
Operation-Location: https://eastus.api.cognitive.microsoft.com/vision/v3.0/read/analyzeResults/e4a6a9a4-e8c0-45a5-bc46-53d62308b661
x-envoy-upstream-service-time: 229
CSP-Billing-Usage: CognitiveServices.ComputerVision.Transaction=1
apim-request-id: e4a6a9a4-e8c0-45a5-bc46-53d62308b661
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
Date: Tue, 30 Jun 2020 08:14:18 GMT
Content-Length: 0

GET https://eastus.api.cognitive.microsoft.com/vision/v3.0-preview/read/analyzeResults/e4a6a9a4-e8c0-45a5-bc46-53d62308b661 HTTP/1.1
Host: eastus.api.cognitive.microsoft.com
Ocp-Apim-Subscription-Key: ••••••••••••••••••••••••••••••••

Transfer-Encoding: chunked
x-envoy-upstream-service-time: 13
CSP-Billing-Usage: CognitiveServices.ComputerVision.Transaction=1
apim-request-id: b1dfcf4e-f820-4c21-8198-d15696eb12b4
Strict-Transport-Security: max-age=31536000; includeSubDomains; preload
x-content-type-options: nosniff
Date: Tue, 30 Jun 2020 08:14:49 GMT
Content-Type: application/json; charset=utf-8

{
"error": {
"code": "BadArgument",
"message": "Operation ID is invalid, expired or the results matching this operationId have been deleted."
}
}

I have tried this with both Free and Paid version, eastus and westus location, still receiving the Operation ID invalid response.
Any suggestion?

Azure Computer Vision
Azure Computer Vision
An Azure artificial intelligence service that analyzes content in images and video.
315 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,407 questions
0 comments No comments
{count} vote

2 answers

Sort by: Most helpful
  1. Ramr-msft 17,616 Reputation points
    2020-06-30T10:15:41.823+00:00

    @DidrikSkantze-2693 I am able to execute the Computer Vision API 3.0 Read and Get Read Result via the console API using this example pdf in westus location. https://www.w3.org/WAI/ER/tests/xhtml/testfiles/resources/pdf/dummy.pdf
    Can you please add more details about the API type you have created in the azure portal.

    https://westus.dev.cognitive.microsoft.com/docs/services/computer-vision-v3-ga/operations/5d986960601faab4bf452005

    Here is the snapshot for the same, Could you please retry once again with the key.
    10954-screenshot-163.png.

    1 person found this answer helpful.

  2. Doru 1 Reputation point
    2021-02-05T10:06:23.37+00:00

    I hit the same issue.
    The problem was that on the website the generated code is sill using the preview urls (v3.0-preview):

    https://eastus.api.cognitive.microsoft.com/vision/v3.0-preview/read/analyzeResults/e4a6a9a4-e8c0-45a5-bc46-53d62308b661

    Or when you POST you used the GA url (note the v3.0):
    https://eastus.api.cognitive.microsoft.com/vision/v3.0/read/analyzeResults/e4a6a9a4-e8c0-45a5-bc46-53d62308b661

    In my case once I used v3.1 in both cases
    /vision/v3.1/read/analyzeResults
    everything worked.

    0 comments No comments