The first step to troubleshoot this issue would be to check that you have provided a valid API key for the LLM model you have chosen.
If the API key is correct, then you will need to follow the instructions here https://docsearch.algolia.com/docs/v4/askai-whitelisted-domains to whitelist the page's domain on the AskAI dashboard.
If using Algolia's Ask AI playground please whitelist the url community.algolia.com
Please see https://docsearch.algolia.com/docs/v4/askai-errors#unauthorized for more information.