How to use Microsoft Computer vision API in Uipath

How can I use Microsoft computer vision API in Uipath?

Want to know the correct syntax of calling the API.

I have tried using it like this inside Microsoft cloud ocr activity “https://westcentralus.api.cognitive.microsoft.com/vision/v2.0/ocr?language=ja&detectOrientation =true&Ocp-Apim-Subscription-Key=<API key>”

But the above is not working.

can anyone hare an example.

Regards

Hello,

You need to set your API key not in GET argument but in HTTP header.

Please see the following.
https://westus.dev.cognitive.microsoft.com/docs/services/56f91f2d778daf23d8ec6739/operations/56f91f2e778daf14a499e1fa

Regards,

@Yoichi Yoichi san,

Thank you for your suggestion, I have tried it on microsoft website it worked but my question is how can I use it Inside Uipath like in picture below.

Regards

Hi,

I use HTTP Request activity to call MS Vision API and it works well.
I’ll try MS cloud OCR activity later.

Regards,

@Yoichi
Yoichi San,

Can you share example of HTTP Request?

Thanks

@Samurai
Sure.

I’ll share example for HTTP Request for MS Vision API as follows:
HTTP_Request_sample


We should set Mime-type as Application/octet-stream and send raw binary data of the image in HTTP body, but I send the image data as attachment because it seems difficult to set raw binary data in HTTP body in UiPath. Fortunately, it works at this time.

I’ll also share example for MS cloud OCR Activity as follows:

It worked with my small test image.

Regards,

2 Likes

@Yoichi san

Thanks I will try it !

Best Regards