Connect to Azure OpenAI Using Postman

This blog post will show how to use Postman to request the REST API to the Azure OpenAI service platform.

Before you start, ensure you have access to the Azure OpenAI service and have resources deployed. Please visit this blog post to learn how to create OpenAI resources and deployment using Terraform.

Create Variables

To connect to Azure OpenAI from Postman, create the following two variables.

AZURE_OPENAI_KEY – Use your Security Key


You will find the above two values. Open your deployed Azure OpenAI service from the Azure portal under Azure AI Services.

Click on Keys and Secrets

Copy the values and add them to Postman variables. In our case, we are using them in a new environment.

Save the variables and create a new request with the following details.

Request type – POST

Use the URL below, but change the value of openai to your OpenAI resource name. Also, change the value of gpt-35-0613 to the name of your deployment.


The REST API request should look like this.

Use the following body to send a chat completion request in the Body section.

{"messages":[{"role": "system", "content": "You are a helpful assistant."},{"role": "user", "content": "something"},{"role": "assistant", "content": "something."},{"role": "user", "content": "something"}]}

Click on Send and review the reply.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.