AuthenticationError: Incorrect API key provided [Azure OpenAI Services]

Bianca Ferreira dos Santos 5 Reputation points
2023-07-28T12:55:49.82+00:00

I am having the following error when calling the embeddings function:

"AuthenticationError: Incorrect API key provided: 72c536778*******************e047. You can find your API key at https://platform.openai.com/account/api-keys."

I'm using the azure machine learning notebook passing the API KEY as follows

 os.environ["OPENAI_API_KEY"] = "123..."
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
4,081 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Maui Rivera 240 Reputation points Microsoft Employee
    2024-02-14T08:09:48.9666667+00:00

    Hello, the question appears to be active again as many users are experiencing the same issue. Several API versions were retired on February 4, 2024, which is causing this issue. Please check if you are using a retired API version and kindly replace it with the GA or later preview versions. Please see following documentation for list of available API versions. https://learn.microsoft.com/en-us/azure/ai-services/openai/reference#chat-completions

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.