Getting an error while calling CrossDomain call in Azure OpenAI

Harjit Singh 26 Reputation points Microsoft Employee
2023-04-18T02:38:43.0133333+00:00

We have a service which is running in APIM in a different domain .us and from that domain a service makes a call to the Open AI service which is in a different domain using the python SDK. We get this error

How can we fix this

"The current API Key is calling host 'openai-dev.openai.azure.com' with custom subdomain of 'openai-dev' which doesn't match the resource custom domain 'octofocoopennai'."
Azure OpenAI Service
Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
2,942 questions
{count} votes

2 answers

Sort by: Most helpful
  1. Harjit Singh 26 Reputation points Microsoft Employee
    2023-04-18T15:15:06.2266667+00:00

    I figured it out. Thanks @romungi-MSFT . The issue was that we had a app which I thought was an facade to the universe of azure open ai but it turns out that's not the case. I just had to change my code to point to the correct endpoint and things started working. We are doing a cross regjon call and were using APIM with express routes to access data . We have AKS container and nginix in there doing the ingress so wasn's sure where it was happeing. Once I changed the URL this are working now.

    1 person found this answer helpful.

  2. risolis 8,721 Reputation points
    2023-04-18T04:37:05.7666667+00:00

    Hello @Harjit Singh Thank you for your heads up. Thank you for posting this concern on this community. I would like to know if you are able to enable debug to trace this API call in order to get more details:

    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.