How to actually use Azure API Key

Hello

I’ve been using the OpenAI key for sometime, but I’ve now swapped over to Azure API and put in my credentials. Unfortunately im not able to delete my “OpenAI API Key”, as it keeps coming back. However I am able to disable it.

I’ve also enabled Azure API Key but I have no way of actually using it in the chat. The drop down just says gpt4o/gpt4 and even if I remove/disable Azure, I can still select and use gpt4o which leads me to believe I am actually just using my original OpenAI key.

Any thoughts or suggestions would be lovely!

2 Likes

bump

seems like this is not the way to get support… is there another way??

16 days… still waiting for a reply from literally anyone at cursor

Any luck?

  1. Delopy your model on Auzre AI Studio.
  2. Copy the deployment name and the API key to the cursor.
  3. Open Azure Portal and then open the AI resource you just created. Then scroll down, and you should see a Language APIs. Paste that to the Base URL field.

I have used the Azure API Key settings but Azure OpenAI services also provides a version number without which we can’t connect with the model.

Can this extra field also be provided under Cursor Settings > Azure API Key?

I thought I was the only one getting an issue with this but it seems there’s more.

1 Like

I cannot connect Azure OpenAI API (o1) to cursor. I get invalid credentials as I assume there arent enough boxes to type in full deployment name etc…

Hey, we are aware of an issue the Azure API settings that stops it from working with o1, but are looking into it currently to see if we can get things working.

I havent been able to make it work with gpt4o, what is the solution for this? We are missing a field called “version”, which is provided by Azure OpenAI Services as part of the credentials.

2 Likes

On my device, the chat is working with Azure’s API. Sorry if the information I wrote is not accurate.

The approximate procedure is as @endywong describes.

  1. Delopy your model on Auzre AI Studio.
  2. Copy the deployment name and the API key to the cursor.
  3. Open Azure Portal and then open the AI resource you just created. Then scroll down, and you should see a Language APIs. Paste that to the Base URL field.

The BaseURL value should be up to the point “https://XXXX.openai.azure.com/”.
No description of version information is required.

Finally, click Add Model under “Model Names” and enter the name of the deployed model.

Turn off all other models and make sure that the chat works with the model you have added.

I have the same problem.
I followed the same procedure as for Omiso90, but the validation process shows that the value is invalid.

My deployment model can be used in other ways, such as API calls. Does the configuration affect the creation of the openAI model?

I think, we just wait this. danperks

I tested a few cases.

Model: o3-mini: impossible
Model: o1: impossible
Model: gpt-4o: possible

1 Like

I was also trying to configure Azure API Key with o1-mini deployment
With gpt-4o able to config, it doesn’t work with agent mode

1 Like

i have same issue

Are there any milestones or schedules planned? I am really looking forward to this.

I actually use o3-mini tho weirdly XXXX.openai.azure.com is not working, instead from Ai foundry I created AIServices resource (not OpenAI) then I deployed o3-mini. then from that deployment details I used just the beginning of the endpoint (not the whole target URL) https://.cognitiveservices.azure.com/
then fill the key and model name in the cursor, then scroll up and add model name manually. Then start using that manual name.
Another absurd thing is it doesn’t let you change the models within the same api key either, you need to deploy different ones and change the keys each time if I want to switch between o4-mini / o3-mini. If anyone finds a solution to that please let me know.
Ps; sorry for my language, non-technical here :slight_smile: