Thursday, April 27, 2023

Building Applications Using the ChatGPT API

Step 0: Create an OpenAI account and log into an account

Step 1: After login,  click on PERSONAL on the top-right and then click "View API keys"


Step 2: After following step 2 a page of API keys is opened and we can see the button ‘Create new secret key’ click on that and a secret key is generated copy that key and save it on Notepad or anywhere else because it is required in upcoming steps.


Step 3: Perform API call to url: https://api.openai.com/v1/chat/completions , you can provide "model"  (GPT 3.5 or 4) as params