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.
Step 2. Fork the OpenAI API collection to your own Postman workspace using the fork menu option (highlighted in yellow in the image below).
Step 3. Generate your personal API key from https://platform.openai.com/account/api-keys and copy that for use in the next step.
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.
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.
Now you are all set! Keep exploring.