a cell phone sitting on top of a laptop computer
Machine Learning

Exploring OpenAI APIs

Exploring the OpenAI APIs is a great way to start learning about different models and their capabilities, and find inspiration for your tasks and use cases. 

If you are already familiar with the fundamental concepts of APIs and the Postman tool, you will be able to follow the steps below to set up your environment for exploring these APIs within a few minutes.

Step 1. OpenAI already provides a Postman collection for interacting with the APIs. Let’s navigate to that: https://www.postman.com/devrel/workspace/openai.

OpenAI Postman Collection

Step 2. Fork the OpenAI API collection to your own Postman workspace using the fork menu option (highlighted in yellow in the image below).

Creating a fork of the Postman collection

Step 3. Generate your personal API key from https://platform.openai.com/account/api-keys and copy that for use in the next step.

Generating OpenAI API key

Step 4. Return to your own forked Postman workspace. Select the root item OpenAI on the left navigation tree. Under the Variables tab populate your API key for the token variable. Under the Authorization tab select Bearer Token for Type and enter {{token}} for the Token field.

Setting up authorization

Step 5. Let’s try out the Completions API. On the Authorization tab for this API, select Inherit from parent for the Type field. Finally, modify the request Body for this API by entering a prompt and sending the request by hitting the Send button.

Sending an API request

Now you are all set! Keep exploring.