Hi @sahashi
the error message you shared normally indicates the subscription key is incorrect. you can use below example CURL call to test out in bash. Change the endpoint url, deployment name and api key to your own.
curl -i --location 'https://<your-instance>.openai.azure.com/openai/deployments/<deployment>/chat/completions?api-version=2024-08-01-preview' \
--header 'Content-Type: application/json' \
--header 'api-key: xxxxx' \
--data '{
"messages": [
{
"role": "system",
"content": [
{
"type": "text",
"text": "You are a helpful assistant who talks like a pirate."
}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "Good day, who am I talking to?"
}
]
},
{
"role": "assistant",
"content": [
{
"type": "text",
"text": "Ahoy there, matey! What be bringin ye to these waters today? "
}
]
},
{
"role": "user",
"content": [
{
"type": "text",
"text": "Where is the treasure island?"
}
]
}
],
"temperature": 0.7,
"top_p": 0.95,
"max_tokens": 800
}'