How To: Post a request to OpenAI API (ChatGPT) using Postman
#chatgpt #openai #development #ai
This is a quick video that shows you how to post a request to the OpenAI API using Postman (I use the completions endpoint, see notes below). The request will return a response from the GPT3 davinci language model. I believe this a good first step on the road to creating applications that use OpenAI as it shows you the fundamentals of authentication and forming JSON data that the API will accept. I'll also briefly discuss prompt and completion tokens which can have an effect on the cost and the quality of the response.
Sign up for OpenAI Developer account:
https://platform.openai.com/signup
OpenAI pricing:
https://openai.com/pricing
OpenAI endpoint for completions:
https://api.openai.com/v1/completions
Please Note: The completions endpoint is designed for generating text completions based on a single prompt. It takes a prompt as input and generates a text completion or continuation based on the provided context. It is ideal for tasks such as generating paragraphs, answering questions, or completing sentences.