# Azure OpenAI API Key - how to use with Cursor?

**URL:** <https://forum.cursor.com/t/azure-openai-api-key-how-to-use-with-cursor/24586>\
**Category:** Help\
**Created:** [October 25, 2024, 1:28am UTC](https://forum.cursor.com/t/azure-openai-api-key-how-to-use-with-cursor/24586 "2024-10-25T01:28:05Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![bennyrubanov](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/bennyrubanov/32/9667_2.png) [@bennyrubanov](https://forum.cursor.com/u/bennyrubanov)\
**Post date:** [October 25, 2024, 1:28am UTC](https://forum.cursor.com/t/azure-openai-api-key-how-to-use-with-cursor/24586/1 "2024-10-25T01:28:05Z")

</div>

best practices on using my own Azure API key for Cursor? I got it to work by deploying a gpt-4o model in Azure’s AI studio, and then using that API key, but then the way it works with Cursor UI is a bit confusing. Is that key then only always going to call gpt-4o, even if I switch the model I’m using in Cursor? I assume yes, and if that’s the case, is there another configuration method to have access to multiple models within cursor while using Azure deployments?

---

<div class="post-metadata">

**Author:** ![deanrie](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/deanrie/32/1263_2.png) [@deanrie](https://forum.cursor.com/u/deanrie)\
**Post date:** [October 25, 2024, 3:51am UTC](https://forum.cursor.com/t/azure-openai-api-key-how-to-use-with-cursor/24586/2 "2024-10-25T03:51:48Z")

</div>

Hi @bennyrubanov

I don’t think so. Once the API key is on, all your connections go through it. You can also manually add any models you need that aren’t in the list. When you switch models, if they’re available in Azure, everything will work fine, and you’ll get responses from them. If you need models from the Cursor subscription, you’ll have to turn off your API key so Cursor knows how to handle requests.

---

<div class="post-metadata">

**Author:** ![suhaibking](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/suhaibking/32/38571_2.png) [@suhaibking](https://forum.cursor.com/u/suhaibking)\
**Post date:** [March 19, 2025, 11:52pm UTC](https://forum.cursor.com/t/azure-openai-api-key-how-to-use-with-cursor/24586/3 "2025-03-19T23:52:20Z")

</div>

@deanrie  
I have an doubt If i already configured Azure and turned it on and got to composer and swift to agent mode its

```auto
Agent and Edit rely on custom models that require a Pro or Business subscription. Please use a Pro or Business subscription and/or disable API keys. Ask should still work.

```

---

<div class="post-metadata">

**Author:** ![system](https://sea3.discourse-cdn.com/cursor1/user_avatar/forum.cursor.com/system/32/99069_2.png) [@system](https://forum.cursor.com/u/system)\
**Post date:** [June 18, 2026, 10:34am UTC](https://forum.cursor.com/t/azure-openai-api-key-how-to-use-with-cursor/24586/4 "2026-06-18T10:34:17Z")

</div>


