Embed endpoint recieving invalid_model_endpoint_authentication error

Ben 0 Reputation points
2025-04-18T14:54:46.95+00:00

I am embedding text with an azure ai endpoint via the rest API. I get an API key that I pass through to the API.

This has been working for many months now, but as of today, with no changes to the code, I started recieving the following response.

I cannot find this error code documented anywhere. The documentation still says to authenticate with the api-key parmeter

{:error,
 %Req.Response{
   status: 500,
   headers: %{
     "apim-request-id" => ["9f122dc4-1d8d-4383-b12c-8e944e63587c"],
     "content-type" => ["application/json; charset=utf-8"],
     "date" => ["Fri, 18 Apr 2025 14:37:50 GMT"],
     "request-context" => ["appId="],
     "strict-transport-security" => ["max-age=31536000; includeSubDomains; preload"],
     "transfer-encoding" => ["chunked"],
     "x-content-type-options" => ["nosniff"],
     "x-ms-region" => ["East US 2"]
   },
   body: %{
     "error" => %{
       "code" => "invalid_model_endpoint_authentication",
       "details" => "Failed to authenticate to backend endpoint.",
       "message" => "Failed to authenticate to backend endpoint."
     }
   },
   trailers: %{},
   private: %{}
 }} 
Azure AI services
Azure AI services
A group of Azure services, SDKs, and APIs designed to make apps more intelligent, engaging, and discoverable.
3,644 questions
{count} votes

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.