(Update 11/20/2017: Luis Cabrera from Microsoft product team responded in the comments section. Don’t forget to read his response, and please contact him, if you were surprised by the change, and got charged)

 

I have been working for more than a year now on Power BI integration with Microsoft Cognitive Services Text Analytics APIs, and the sentiment analysis in specific (You may have read my initial work on Microsoft Power BI blog here).

I have been using the free tier, which allowed us (till recently) to pass 5M messages each month, and enjoy the free service. With 5M messages per month we could explore the service, and demonstrate its value. Unfortunately, two weeks ago, I started getting lots of errors from the Text Analytics service. Others started to report the same issues as well (Check the latest comments here).

It seems that Microsoft have recently changed the way that a transaction is counted by the service. According to their pricing page here, 1000 messages in a single API call will be counted as 1000 transactions:

What constitutes a transaction in the Text Analytics API?
Any annotation to a document counts as a transaction. Batch scoring calls will also take into consideration the number of documents that need to be scored in that transaction. So for instance, if 1,000 documents are sent for sentiment analysis in a single API call, that will count for 1,000 transactions. If an API supports more than one annotation operation, that will also be considered. Let’s say an API call performs both sentiment analysis and key-phrase extraction on 1,000 documents, that will count for 2,000 transactions (2 annotations * 1,000 documents).

If you are using Power BI with the Text Analytics API, and receive Forbidden Access errors – Welcome to the club.

If you are already a paying custom, and you have grouped the messages to subsets of 1000 messages per API call, as I have shown here, you will reach your transaction limit of your tier 1000 times faster 🙁

Grouping the messages to 1000 per call will only help you to reduce the number of API calls and avoid reaching the API rate limits of 100 calls/minute.

Note that the Metric on Azure portal still count the usage by API calls, and not by the transactions – so don’t trust on this reporting element to warn you in advance when you are getting near your transaction limit in the tier you are using.

 

Let me know what you think about this change, in the comments below. Hope that Microsoft will reconsider the change. For now, it’s time to move to a higher pricing tier… or send lots of support tickets to Microsoft, complaining about this change.