Azure OpenAI Service
An Azure service that provides access to OpenAI’s GPT-3 models with enterprise capabilities.
3,023 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
I'm trying to use ChatGPT through Azure OpenAI but keep encountering an 'access denied' error.
Here's what I've done so far: I added the POST URL, included the 'API_KEY' (taken from the Azure portal), and attached the JSON body, but it's not working. The key should be correct. Could anyone share a working example of an API URL that functions properly?
Here is an example of calling Auzre OpenAI via postman directly (without any libraries).
Curl payload below:
curl --location 'https://{your instance}.openai.azure.com/openai/deployments/{deployment}/chat/completions?api-version=2023-03-15-preview' \
--header 'api-key: {apikey}' \
--header 'Content-Type: application/json' \
--data '{
"messages": [
{
"role": "user",
"content": "how are you today?"
}
],
"temperature": 0.7,
"top_p": 0.95,
"frequency_penalty": 0,
"presence_penalty": 0,
"max_tokens": 800,
"stop": null
}'
To find all the endpoint and key details, you can go to the deployments
tab in Azure OpenAI Studio