Search code examples
containersazure-language-understandingazure-cognitive-services

Get "Api key is invalid" after luis container is running


I run and install Luis Container in my server according tutorial https://learn.microsoft.com/en-us/azure/cognitive-services/luis/luis-container-howto?tabs=v3

I run the container, it works fine. Api is also working fine. After several mins, when I check the status(http://192.168.10.140:5000/status),I got "Api Key is invalid.", then I restart the container, everything is ok. But after several mins, "Api key is invalid" occur again.

{"service":"luis","apiStatus":"Invalid","apiStatusMessage":"Api Key is invalid."}

When error occur, Luis container is running all the time.

By the way, the price tier for the Cognitive Services is SO(standard).

Could anyone give some suggestions why I got this error?


Solution

  • The LUIS Docker container reaches out to the billing endpoint every 10-15 minutes. I would imagine that this is why everything appears to work fine initially.

    1. Ensure you're using the correct API Key
      1. Go you the LUIS portal
      2. Click your LUIS app
      3. Click Manage
      4. Click "Azure Resources" and copy your Primary key
      5. Ensure you haven't hit any limits
    2. Test your API Key in the online API tester

    I'd imagine this will help you discover the real issue. If not, let me know and I will continue to help troubleshoot and update this answer.