To test the OpenAI API in Postman, you can follow these steps:

Set up your OpenAI API credentials: Obtain an API key by signing up for OpenAI’s API access, and make sure you have the API key handy.

Open Postman: Launch the Postman application on your computer. If you don’t have Postman installed, you can download and install it from the Postman website (

Create a new collection: Click on the “New” button in Postman to create a new collection.

Create a new request: Click on the “New” button in Postman to create a new request.

Set the request URL: In the request URL field, enter the OpenAI API endpoint. For example, if you’re using the “completions” endpoint, the URL would be

Set the request body: Click on the “Body” tab in Postman, select the “raw” option, and choose the JSON (JavaScript Object Notation) format. Then, enter the JSON payload for your API request. The payload will vary depending on the specific API endpoint and the task you want to perform. Refer to OpenAI’s API documentation for the required payload structure.
  • Send the request: Click the “Send” button in Postman to send the API request to OpenAI.
  • View the response: Once the request is sent, you’ll see the response from the OpenAI API in the “Response” section of Postman. The response will contain the output or any relevant data returned by the API.

By Abhishek Singh

Software Engineer at Cotocus pvt. ltd

0 0 votes
Article Rating
Notify of
Inline Feedbacks
View all comments
Would love your thoughts, please comment.x