API key for a project project deployed in Azure

OpenAI has great documentation for installing API Key locally. I just call the API using:

import OpenAI from "openai";
const openai = new OpenAI();

However, I’m deploying my project to Azure. How to use API Key to call the API when it’s deployed?

It’s called AzureOpenAI :slight_smile:

2 Likes

OpenAI’s API and Microsoft Azure OpenAI’s API both essentially use the same language model. The one provided directly by OpenAI is the OpenAI API, while the one provided by Microsoft is Microsoft Azure OpenAI.
It’s hard to say which one is better, but there probably isn’t a significant difference.
If you can use it, considering the support from Microsoft, using Microsoft Azure OpenAI could be one option.

Please refer to the URL above to check which one is more suitable for your use case.

2 Likes

Thanks. This is great!
Anywhere I can find node.js conversions (OpenAI API → Azure OpenAI API) too?

1 Like

It’s kinda difficult to navigate the micosoft docs for some reason, when you go between frameworks. You gotta leave the page and use google, it’s not super well organized.

1 Like